Replace jQuery.ready function with recommended way since jQuery 3.0 closes #27945
This commit is contained in:
parent
ad59064c69
commit
8c73c5f2f8
|
@ -565,7 +565,7 @@ class WC_Shortcodes {
|
||||||
$single_product = new WP_Query( $args );
|
$single_product = new WP_Query( $args );
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery( document ).ready( function( $ ) {
|
jQuery( function( $ ) {
|
||||||
var $variations_form = $( '[data-product-page-preselected-id="<?php echo esc_attr( $preselected_id ); ?>"]' ).find( 'form.variations_form' );
|
var $variations_form = $( '[data-product-page-preselected-id="<?php echo esc_attr( $preselected_id ); ?>"]' ).find( 'form.variations_form' );
|
||||||
|
|
||||||
<?php foreach ( $attributes as $attr => $value ) { ?>
|
<?php foreach ( $attributes as $attr => $value ) { ?>
|
||||||
|
|
|
@ -102,7 +102,7 @@ class WC_Shop_Customizer {
|
||||||
$max_notice = __( 'The maximum allowed setting is %d', 'woocommerce' );
|
$max_notice = __( 'The maximum allowed setting is %d', 'woocommerce' );
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery( document ).ready( function( $ ) {
|
jQuery( function( $ ) {
|
||||||
$( document.body ).on( 'change', '.woocommerce-cropping-control input[type="radio"]', function() {
|
$( document.body ).on( 'change', '.woocommerce-cropping-control input[type="radio"]', function() {
|
||||||
var $wrapper = $( this ).closest( '.woocommerce-cropping-control' ),
|
var $wrapper = $( this ).closest( '.woocommerce-cropping-control' ),
|
||||||
value = $wrapper.find( 'input:checked' ).val();
|
value = $wrapper.find( 'input:checked' ).val();
|
||||||
|
|
Loading…
Reference in New Issue