• During checkout, I get the infinite spinner, but only when I’m not logged in a admin.
    The woocommerce_update_order_review call returns fragments when in admin, but not otherwise, so the unblock() call never happens.

    Does anybody know why data.fragments is empty when not logged in as admin?

    I’ve increased WP’s memory to 120M, PHP Max Post size to 64M. The only plugins I have active are WooCommerce, WooCommerce Subscriptions and WP Better Emails (I’ve tried with this plugin deactivated, but did nothing).

    Thanks in advance.
    Tom

    https://www.ads-software.com/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter gtvracer

    (@gtvracer)

    I dug around further, but doesn’t make much sense. Down in woocommerce/includes/class-wc-ajax.php, line 319, it makes a call to wp_send_json(). As a non-admin user, the response is actually correct, and has the fragments element. wp_send_json() calls “echo wp_json_encode( $response );”, so you’d expect the $.ajax() call gets this JSON structure, right? But no….

    It gets basically a copy of the XML of the checkout page and nothing that was supposed to have been echo’ed from wp_json_encode(). In both admin and non-admin cases the blog_charset for the header() is UTF-8. I don’t see any difference between the two scenarios, but the fact is, $.ajax() doesn’t get the JSON object back when calling it as a regular user.

    Any ideas?

    Thread Starter gtvracer

    (@gtvracer)

    Ok, it gets stranger. Between the time the $.ajax() is called and response received, something is issuing a request to reload the home page. So what I end up getting as a response is the XML for the home page, not the JSON structure that was supposed to have been received.

    So know, I would want to know what action or callback is getting triggered for a non-admin user that is causing this during checkout, but not for the admin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘woocommerce_update_order_review only works with admin’ is closed to new replies.