Skip to content

Commit

Permalink
Add regenerator-runtime as script dependency.
Browse files Browse the repository at this point in the history
This is a quick fix for a breaking change in WordPress 6.6.
  • Loading branch information
ecgan committed Jul 5, 2024
1 parent f3b5c5f commit 078393b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/admin/class-pinterest-for-woocommerce-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@ public function load_setup_guide_scripts() {
'version' => PINTEREST_FOR_WOOCOMMERCE_VERSION,
);

// This is a quick fix for a breaking change in WP 6.6.
// We may not need this in the future when we update `@wordpress/*` packages to newer versions.
$script_info['dependencies'][] = 'regenerator-runtime';

$script_info['dependencies'][] = 'wc-settings';

wp_register_script(
Expand Down Expand Up @@ -503,7 +507,7 @@ public function maybe_redirect_to_middleware() {

wp_safe_redirect( Pinterest_For_Woocommerce()::get_middleware_url( $context, $args ) );
exit;

}

/**
Expand Down

0 comments on commit 078393b

Please sign in to comment.