Snippet: Load WooCommerce plus/minus button script site wide.
IMPORTANT: Since Total 4.9+ this script is loaded in globally by default inside the theme's main WooCommerce script.
add_action( 'wp_enqueue_scripts', function() {
if ( ! defined( 'WPEX_THEME_VERSION' ) ) {
return;
}
wp_enqueue_script(
'wpex-wc-quantity-increment',
wpex_asset_url( 'js/dynamic/woocommerce/wc-quantity-increment.min.js' ),
array( 'jquery' ),
WPEX_THEME_VERSION,
true
);
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend WPCode)