Title: ukndoit's Replies | WordPress.org

---

# ukndoit

  [  ](https://wordpress.org/support/users/ukndoit/)

 *   [Profile](https://wordpress.org/support/users/ukndoit/)
 *   [Topics Started](https://wordpress.org/support/users/ukndoit/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ukndoit/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ukndoit/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ukndoit/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ukndoit/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ukndoit/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 63 total)

1 [2](https://wordpress.org/support/users/ukndoit/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/ukndoit/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/ukndoit/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/ukndoit/replies/page/5/?output_format=md)
[→](https://wordpress.org/support/users/ukndoit/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Emailing orders in rich text](https://wordpress.org/support/topic/emailing-orders-in-rich-text/)
 *  [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/emailing-orders-in-rich-text/#post-17411325)
 * Have you checked out MailPoet?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Small issue and harder one with woocommerce](https://wordpress.org/support/topic/small-issue-and-harder-one-with-woocommerce/)
 *  Thread Starter [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/small-issue-and-harder-one-with-woocommerce/#post-17411306)
 * I just tried an invalid coupon on the cart and it still vanished just trying 
   to add anything… very odd.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Small issue and harder one with woocommerce](https://wordpress.org/support/topic/small-issue-and-harder-one-with-woocommerce/)
 *  Thread Starter [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/small-issue-and-harder-one-with-woocommerce/#post-17411304)
 * Here is a product with a coupon you can see: [https://secure.actuatedmarketing.com/look/product/professional-video-production-team/](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](https://secure.actuatedmarketing.com/look/cart)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Checking Options and sending email if one does not match](https://wordpress.org/support/topic/checking-options-and-sending-email-if-one-does-not-match/)
 *  Thread Starter [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/checking-options-and-sending-email-if-one-does-not-match/#post-17302838)
 * so do I do:
 *     ```wp-block-code
       $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](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Checking Options and sending email if one does not match](https://wordpress.org/support/topic/checking-options-and-sending-email-if-one-does-not-match/)
 *  Thread Starter [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/checking-options-and-sending-email-if-one-does-not-match/#post-17302835)
 * I 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.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Checkout Field Editor (Checkout Manager) for WooCommerce] Error activating plugin](https://wordpress.org/support/topic/error-activating-plugin-52/)
 *  Thread Starter [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/error-activating-plugin-52/#post-16907113)
 * 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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Add a surcharge to cart and checkout – uses fees API](https://wordpress.org/support/topic/add-a-surcharge-to-cart-and-checkout-uses-fees-api/)
 *  Thread Starter [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/add-a-surcharge-to-cart-and-checkout-uses-fees-api/#post-16878541)
 * I found it! in the filters… that worked. 🙂
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Flexia] Custom Hook for WP](https://wordpress.org/support/topic/custom-hook-for-wp/)
 *  Thread Starter [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/custom-hook-for-wp/#post-16120335)
 * how 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](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Must Use Plugins – mu-plugins help](https://wordpress.org/support/topic/must-use-plugins-mu-plugins-help/)
 *  Thread Starter [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/must-use-plugins-mu-plugins-help/#post-11956536)
 * I 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](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [get_userdata still works?](https://wordpress.org/support/topic/get_userdata-still-works/)
 *  Thread Starter [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/get_userdata-still-works/#post-11955511)
 * 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](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [get_userdata still works?](https://wordpress.org/support/topic/get_userdata-still-works/)
 *  Thread Starter [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/get_userdata-still-works/#post-11955455)
 * 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,
    -Richard
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Popup Trigger URL for Elementor Pro] Can Only Click-Open 1 out of 3 Links on page](https://wordpress.org/support/topic/can-only-click-open-1-out-of-3-links-on-page/)
 *  [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/can-only-click-open-1-out-of-3-links-on-page/#post-11927099)
 * how did you resolve?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Published Page shows “Page not found”](https://wordpress.org/support/topic/published-page-shows-page-not-found/)
 *  Thread Starter [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/published-page-shows-page-not-found/#post-10835395)
 * wow, this is very odd. I made a random new page:
 * /trusted-times
    then added another random page: /trusted-times/days-of-old
 * and 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](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Published Page shows “Page not found”](https://wordpress.org/support/topic/published-page-shows-page-not-found/)
 *  Thread Starter [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/published-page-shows-page-not-found/#post-10834018)
 * 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?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] setting role not working for create_user after I create the user](https://wordpress.org/support/topic/setting-role-not-working-for-create_user-after-i-create-the-user/)
 *  Thread Starter [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/setting-role-not-working-for-create_user-after-i-create-the-user/#post-7598113)
 * 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.

Viewing 15 replies - 1 through 15 (of 63 total)

1 [2](https://wordpress.org/support/users/ukndoit/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/ukndoit/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/ukndoit/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/ukndoit/replies/page/5/?output_format=md)
[→](https://wordpress.org/support/users/ukndoit/replies/page/2/?output_format=md)