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?


  • 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 Mar 14 '19 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 Mar 14 '19 at 13:06

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' );
  • AFAICS neither of those scripts reference currentURL though: cart-fragments.js checkout.js. So there must be more to it than that. – Rup Mar 14 '19 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.