$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>woocommerce offtopic - currentURL is not defined|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

woocommerce offtopic - currentURL is not defined

matteradmin9PV0评论

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' );

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far