woocommerce / pinterest-for-woocommerce

A native Pinterest integration for WooCommerce. Development is managed by Ventures.
https://woocommerce.com/products/pinterest-for-woocommerce/
GNU General Public License v3.0
22 stars 9 forks source link

Add regenerator-runtime as script dependency (quick fix for WordPress 6.6 breaking change) #1032

Closed ecgan closed 1 month ago

ecgan commented 1 month ago

Changes proposed in this Pull Request:

Closes https://github.com/woocommerce/pinterest-for-woocommerce/issues/1031. For the cause of issue and related readings on regenerator-runtime, see https://github.com/woocommerce/pinterest-for-woocommerce/issues/1031#issuecomment-2210937988.

In this PR, we add regenerator-runtime as a script dependency. This is a quick fix for a breaking change in WordPress 6.6.

I believe we may not need this quick fix in the future when we update the @wordpress/* packages and rely on Dependency Extraction (without bundling the packages).

Detailed test instructions:

  1. Use WordPress 6.6.
  2. Install and activate Pinterest extension with this PR.
  3. Go to the Pinterest plugin landing page: /wp-admin/admin.php?page=wc-admin&path=%2Fpinterest%2Flanding. You should see the landing page nicely. There should be no console error.
  4. Downgrade to WordPress 6.5.
  5. Go to the Pinterest plugin landing page: /wp-admin/admin.php?page=wc-admin&path=%2Fpinterest%2Flanding. You should see the landing page nicely. There should be no console error.

image