Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter olehellhound

    (@olehellhound)

    Alrighty folks, it turns out that the emails for “Completed Orders” was causing the script to hang because I noticed the WooCommerce Orders page doing the same exact thing. I disabled email notices for Completed Orders and the script runs instantly.

    Thread Starter olehellhound

    (@olehellhound)

    Update:

    I removed all that code and replaced my “Complete Order” link href to this variable:

    $sg_url = wp_nonce_url( admin_url( 'admin-ajax.php?action=woocommerce-mark-order-complete&order_id=' . $the_order["orderid"] ), 'woocommerce-mark-order-complete' );

    The same thing happened though. When I click the complete button in my plugin the script takes 60 seconds to execute but when I click the complete button from the WooCommerce orders page it will process instantly.

    Thanks again for any assistance.

    Forum: Hacks
    In reply to: Toolbar Roles
    Thread Starter olehellhound

    (@olehellhound)

    User error, I was programming way too late last night. My above posted code correctly adds a menu item to the admin bar for subscribers.

    I was developing in my dev server and testing the feature on my production server instead of my dev server for some reason. That’s what 3am programming does to you.

    Thanks for your help, the current_user_can() function will allow me to use the roles that I will be creating for determining if a certain “subscriber”, or field rep, has access to certain forms or not.

Viewing 3 replies - 1 through 3 (of 3 total)