Merge pull request #28005 from woocommerce/fix/issue-27945
Replace jQuery.ready function with recommended way since jQuery 3.0 c…
This commit is contained in:
commit
e38d0dfdb1
|
@ -565,7 +565,7 @@ class WC_Shortcodes {
|
|||
$single_product = new WP_Query( $args );
|
||||
?>
|
||||
<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' );
|
||||
|
||||
<?php foreach ( $attributes as $attr => $value ) { ?>
|
||||
|
|
|
@ -102,7 +102,7 @@ class WC_Shop_Customizer {
|
|||
$max_notice = __( 'The maximum allowed setting is %d', 'woocommerce' );
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery( document ).ready( function( $ ) {
|
||||
jQuery( function( $ ) {
|
||||
$( document.body ).on( 'change', '.woocommerce-cropping-control input[type="radio"]', function() {
|
||||
var $wrapper = $( this ).closest( '.woocommerce-cropping-control' ),
|
||||
value = $wrapper.find( 'input:checked' ).val();
|
||||
|
|
Loading…
Reference in New Issue