Add missing dependencies to generate variation script in classic product form (#49595)

* Add missing dependencies for product meta box script

* Add changelog
This commit is contained in:
louwie17 2024-07-17 04:22:43 -03:00 committed by GitHub
parent a6cd46e971
commit b698e07930
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: fix
Add missing script dependencies to product variation generation script.

View File

@ -276,7 +276,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) :
if ( in_array( $screen_id, array( 'product', 'edit-product' ) ) ) { if ( in_array( $screen_id, array( 'product', 'edit-product' ) ) ) {
wp_enqueue_media(); wp_enqueue_media();
wp_register_script( 'wc-admin-product-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product' . $suffix . '.js', array( 'wc-admin-meta-boxes', 'media-models' ), $version ); wp_register_script( 'wc-admin-product-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product' . $suffix . '.js', array( 'wc-admin-meta-boxes', 'media-models' ), $version );
wp_register_script( 'wc-admin-variation-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product-variation' . $suffix . '.js', array( 'wc-admin-meta-boxes', 'serializejson', 'media-models', 'backbone', 'jquery-ui-sortable', 'wc-backbone-modal' ), $version ); wp_register_script( 'wc-admin-variation-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product-variation' . $suffix . '.js', array( 'wc-admin-meta-boxes', 'serializejson', 'media-models', 'backbone', 'jquery-ui-sortable', 'wc-backbone-modal', 'wp-data', 'wp-notices' ), $version );
wp_enqueue_script( 'wc-admin-product-meta-boxes' ); wp_enqueue_script( 'wc-admin-product-meta-boxes' );
wp_enqueue_script( 'wc-admin-variation-meta-boxes' ); wp_enqueue_script( 'wc-admin-variation-meta-boxes' );