bobbingwide / oik-loader

WordPress Must Use plugin to load required plugins
0 stars 0 forks source link

Add-to-cart links never finish #18

Open bobbingwide opened 2 years ago

bobbingwide commented 2 years ago

On https://blocks.wp.a2z/block/accepted-payment-methods-woocommerce-cart-accepted-payment-methods-block/ when you click on the link to add an item to the cart the spinner starts spinning but never stops.

This is probably due to oik-loader NOT loading WooCommerce for the request which appears to be a request to URL https://blocks.wp.a2z/block/accepted-payment-methods-woocommerce-cart-accepted-payment-methods-block/?add-to-cart=2184

This request also fails to return the expected result.

https://blocks.wp.a2z/?wc-ajax=get_refreshed_fragments

bobbingwide commented 2 years ago

The request is actually directed to the site URL

Request URL: https://blocks.wp.a2z/?wc-ajax=add_to_cart
Request Method: POST
Status Code: 200 
Remote Address: 127.0.0.1:443
Referrer Policy: strict-origin-when-cross-origi

But because WooCommerce is not loaded for this request then the wc-ajax query parameter isn't processed by WooCommerce.

image

Note that the spinner also looks quite wrong in this screen capture.