Last active
June 14, 2022 09:12
-
-
Save mircobabini/389a762a3ce23dda7c20573d6d1af957 to your computer and use it in GitHub Desktop.
UPDATE: useless from 2.0.4+ thanks to the new filter disable_variation_duplicator_for_woocommerce_image_clone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Duplicate Variations for WooCommerce (Disable Image Duplicator) | |
* Description: Disattiva la funzionalità di "image duplicator" che rallenta il loading delle variazioni | |
* Author: Mirco Babini | |
* Domain Path: /languages | |
* Version: 2.0.3 | |
* Author URI: https://sedweb.com/ | |
*/ | |
add_action( 'variation_duplicator_for_woocommerce_variation_image_clone_loaded', function ( $instance ) { | |
remove_action( 'woocommerce_product_after_variable_attributes', array( $instance, 'form' ), 10 ); | |
remove_action( 'woocommerce_save_product_variation', array( $instance, 'prepare' ) ); | |
remove_action( 'woo_variation_duplicator_load_variations', array( $instance, 'notice' ) ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment