Update deprecated jQuery functions for meta-boxes-product-variation.js

This commit is contained in:
roykho 2021-02-04 08:40:24 -08:00 committed by Jonathan Sadowski
parent 18797493b3
commit afb9656561
1 changed files with 5 additions and 5 deletions

View File

@ -116,8 +116,8 @@ jQuery( function( $ ) {
} }
// Init TipTip // Init TipTip
$( '#tiptip_holder' ).removeAttr( 'style' ); $( '#tiptip_holder' )[0].removeAttribute( 'style' );
$( '#tiptip_arrow' ).removeAttr( 'style' ); $( '#tiptip_arrow' )[0].removeAttribute( 'style' );
$( '.woocommerce_variations .tips, .woocommerce_variations .help_tip, .woocommerce_variations .woocommerce-help-tip', wrapper ) $( '.woocommerce_variations .tips, .woocommerce_variations .help_tip, .woocommerce_variations .woocommerce-help-tip', wrapper )
.tipTip({ .tipTip({
'attribute': 'data-tip', 'attribute': 'data-tip',
@ -594,7 +594,7 @@ jQuery( function( $ ) {
$( '.woocommerce-notice-invalid-variation' ).remove(); $( '.woocommerce-notice-invalid-variation' ).remove();
$( '#variable_product_options' ).find( '.woocommerce_variations' ).prepend( variation ); $( '#variable_product_options' ).find( '.woocommerce_variations' ).prepend( variation );
$( 'button.cancel-variation-changes, button.save-variation-changes' ).removeAttr( 'disabled' ); $( 'button.cancel-variation-changes, button.save-variation-changes' )[0].removeAttribute( 'disabled' );
$( '#variable_product_options' ).trigger( 'woocommerce_variations_added', 1 ); $( '#variable_product_options' ).trigger( 'woocommerce_variations_added', 1 );
wc_meta_boxes_product_variations_ajax.unblock(); wc_meta_boxes_product_variations_ajax.unblock();
}); });
@ -700,7 +700,7 @@ jQuery( function( $ ) {
.closest( '.woocommerce_variation' ) .closest( '.woocommerce_variation' )
.addClass( 'variation-needs-update' ); .addClass( 'variation-needs-update' );
$( 'button.cancel-variation-changes, button.save-variation-changes' ).removeAttr( 'disabled' ); $( 'button.cancel-variation-changes, button.save-variation-changes' )[0].removeAttribute( 'disabled' );
$( '#variable_product_options' ).trigger( 'woocommerce_variations_input_changed' ); $( '#variable_product_options' ).trigger( 'woocommerce_variations_input_changed' );
}, },
@ -714,7 +714,7 @@ jQuery( function( $ ) {
.find( '.woocommerce_variation:first' ) .find( '.woocommerce_variation:first' )
.addClass( 'variation-needs-update' ); .addClass( 'variation-needs-update' );
$( 'button.cancel-variation-changes, button.save-variation-changes' ).removeAttr( 'disabled' ); $( 'button.cancel-variation-changes, button.save-variation-changes' )[0].removeAttribute( 'disabled' );
$( '#variable_product_options' ).trigger( 'woocommerce_variations_defaults_changed' ); $( '#variable_product_options' ).trigger( 'woocommerce_variations_defaults_changed' );
}, },