ukndoit
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Emailing orders in rich textHave you checked out MailPoet?
Forum: Plugins
In reply to: [WooCommerce] Small issue and harder one with woocommerceI just tried an invalid coupon on the cart and it still vanished just trying to add anything… very odd.
Forum: Plugins
In reply to: [WooCommerce] Small issue and harder one with woocommerceHere is a product with a coupon you can see: https://secure.actuatedmarketing.com/look/product/professional-video-production-team/ the coupon is on the page… the problem is only on the cart: https://secure.actuatedmarketing.com/look/cart
Forum: Fixing WordPress
In reply to: Checking Options and sending email if one does not matchso do I do:
$siteurlvalue = get_option( 'siteurl' ); if($siteurlvalue != "https://airdefensebadge.com/") { // send email }
Like that? or do I have to do something with the $siteurlvalue first?
Forum: Fixing WordPress
In reply to: Checking Options and sending email if one does not matchI am using Cpanel, it has wp-toolkit too, and it manages and secures my wordpress. but I use different cpanels on the same server (dedicated server)… with wp-toolkit and no other has this issue.
I noticed another plugin name in the fatal error, I disabled it, then activated this one, and it worked, then activated the other one again and it worked. So I guess I could not activate this while that one was active. but they are both active now and working.
Forum: Plugins
In reply to: [WooCommerce] Add a surcharge to cart and checkout – uses fees APII found it! in the filters… that worked. ??
Forum: Themes and Templates
In reply to: [Flexia] Custom Hook for WPhow about add a widget that can put a hook in the function if we want it. ?? then anyone can add hooks they want ?? that would be amazing, just make it a widget for function hooks.
Forum: Developing with WordPress
In reply to: Must Use Plugins – mu-plugins helpI FIXED IT ?? ?? ??
used the add_action to create a function…
that fixed it.
not sure if it prints the header 200 ok or not… the way it needs to, and not sure how to test that, but so far so good.
Forum: Fixing WordPress
In reply to: get_userdata still works?I think I got it…
foreach ($_muser->roles as $urol) { echo "Role is: " . $urol . "<br />\n"; break; }
$urol now has their role… the first role is their level, right?
if they have custom capabilities roles from like S2member, they would also be listed in their roles, correct? so first one is their actual role?Not sure why there would be roleS if only one… so must be there are other ones if they have different roles or something.
Forum: Fixing WordPress
In reply to: get_userdata still works?I reinstalled WordPress 5.2.3… by going to updates and clicking re-install…
still does not work.
So let me share what I’m doing, maybe that is affecting it.
I created a mu-plugin.
TO listen for a webhook that gets posted from another site.
That webhook wants a 200 ok returned to it, so I did it like this, at the end of when I finish what I need to do with the data in the webhook, I run this function: leaveOkFine();
the code of which is below:
function leaveOkFine() { eval(header("HTTP/1.1 200 OK")); exit; }
I have it eval in case other stuff already ran, so that there are no other headers and it will just print the header 200 ok and exit.
this is the last thing though, I don’t run it until after I process stuff.
I have it right now, echo printing data and it does work, I see data process until it hits that, and then it stops right where it is supposed to.
So how can I tell if wp files are being loaded?
Is there something I can add in the code that is getting executed to see if wp is loaded?I run this code, in part:
if($_REQUEST['somekey'] == "webhookvalue") { // webhook is POSTING data... take over... $_cfirstname = $_REQUEST['customer']['first_name']; $_lfirstname = $_REQUEST['customer']['last_name']; $_cemail = $_REQUEST['customer']['email']; $_cip = $_REQUEST['customer']['ip_address']; $_addyline1 = $_REQUEST['customer']['address']['line1']; $_addyline2 = $_REQUEST['customer']['address']['line2']; $_addycity = $_REQUEST['customer']['address']['city']; $_addystate = $_REQUEST['customer']['address']['state']; $_addycountry = $_REQUEST['customer']['address']['country']; $_addyzip = $_REQUEST['customer']['address']['zip']; echo "Visitor First Name is: " . $_cfirstname . "<br />\n"; echo "Visitor Last Name is: " . $_lfirstname . "<br />\n"; echo "Visitor EMail is: " . $_cemail . "<br />\n"; echo "Visitor IP is: " . $_cip . "<br />\n"; echo "line1 is: " . $_addyline1 . "<br />\n"; echo "line2 is: " . $_addyline2 . "<br />\n"; echo "city is: " . $_addycity . "<br />\n"; echo "state is: " . $_addystate . "<br />\n"; echo "country is: " . $_addycountry . "<br />\n"; echo "zip is: " . $_addyzip . "<br />\n"; echo "Checking for email...<br />"; $_userloginemail = $_cemail; $_muser = get_user_by( 'email', $_userloginemail ); if($_muser->ID) { echo 'User is ' . $_muser->user_login . "( " . $_muser->ID . " )" . " - " . $_muser->first_name . ' ' . $_muser->last_name; echo "<br />";
…
That all works.
but, did wordpress load the files it uses before this? or does it do it AFTER, and I preempt it by doing the eval and printing the header with 200 ok…?
Is that way that ‘get_userdata’ function is saying it does not exist?If it is preempting it, then is there a way to call it without it printing headers, so I can print the header with 200 ok for the response?
Thanks,
-Richardhow did you resolve?
Forum: Fixing WordPress
In reply to: Published Page shows “Page not found”wow, this is very odd. I made a random new page:
/trusted-times
then added another random page:
/trusted-times/days-of-oldand that worked.
so I went to the one that did not work, and updated the parent to the /trusted-times
and it works.So does wordpress just not like the /mailers since it has /mail in the path?
is that possible?
very odd.
Forum: Fixing WordPress
In reply to: Published Page shows “Page not found”I did that, and it did not work. ??
I updated the page that had the /mailers as the parent page and the /mailers page works, but the child page did not work, when I made it NO Parent, then it worked, when I put it back on the /mailers as the parent, it does not work again. So seems like it is only when there is a parent page, not just any page. ??
any other idea?
I found it. It was “subscriber”… just that. Nothing else.
When I hovered over that role on the users, I noticed in the statusbar in the url, the role said “subscriber” so I did that and it worked. So it works now. Tested it successfully.