woocommerce offtopic - currentURL is not defined

admin2025-06-02  1

I'm using Woocommerce with Sensei. When I go to Checkout the payment method keep loading with spining and don't let me finish the payment. In the console I get the error:

Uncaught (in promise) ReferenceError: currentURL is not defined at then.catch.e (content_script_bundle.js:13)

I tried others plugins for payment method, but the error persist.

Someone already got this error before?

Thanks!

I'm using Woocommerce with Sensei. When I go to Checkout the payment method keep loading with spining and don't let me finish the payment. In the console I get the error:

Uncaught (in promise) ReferenceError: currentURL is not defined at then.catch.e (content_script_bundle.js:13)

I tried others plugins for payment method, but the error persist.

Someone already got this error before?

Thanks!

Share Improve this question asked Mar 14, 2019 at 12:46 Fernando AurelianoFernando Aureliano 1032 bronze badges 2
  • Is there any chance this is from your theme or another plugin? There's no "currentURL" with that casing in WordPress or Woocommerce or Storefront, so I'd guess it's come from Sensei then. So you're probably best talking to Woocommerce about it since it sounds like all the code you're running is theirs, and you'll have support with Sensei. – Rup Commented Mar 14, 2019 at 13:03
  • 1 But if you want to debug this yourself, try defining SCRIPT_DEBUG in wp-config and it should use unminified scripts that will be easier to pick through and see where currentURL is referenced and where it should be set. – Rup Commented Mar 14, 2019 at 13:06
Add a comment  | 

1 Answer 1

Reset to default 0

The way I found at the moment to fix that was disabling the ajax from checkout

/** Disable Ajax Call from WooCommerce added in functions.php*/
add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_cart_fragments', 11); 
function dequeue_woocommerce_cart_fragments() { if (is_front_page()) wp_dequeue_script('wc-cart-fragments'); }
function disable_checkout_script(){
wp_dequeue_script( 'wc-checkout' );
}
add_action( 'wp_enqueue_scripts', 'disable_checkout_script' );
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748806291a313874.html

最新回复(0)