Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Last active July 24, 2017 09:49
Show Gist options
  • Save xlplugins/f9d9b455c12cad2b6b24ba258b386f7e to your computer and use it in GitHub Desktop.
Save xlplugins/f9d9b455c12cad2b6b24ba258b386f7e to your computer and use it in GitHub Desktop.
nutrabay.com site specific snippets
<?php
/**
* Add This whole code in working theme functions.php inside php tag to alter woocommerce native positions
* Site: nutrabay.com
* XL WooCommerce Sales Trigger Class Instance
*/
add_action('wp', 'theme_wcst_modify_positions', 90);
if (!function_exists('theme_wcst_modify_positions')) {
function theme_wcst_modify_positions() {
if (class_exists('WCST_Core') && is_singular('product')) {
$wcst_core = WCST_Core::get_instance();
remove_action('woocommerce_single_product_summary', array($wcst_core, 'wcst_position_below_short_desc'), 21.2);
remove_action('woocommerce_single_product_summary', array($wcst_core, 'wcst_position_below_add_cart'), 39.2);
add_action('woocommerce_single_product_summary', array($wcst_core, 'wcst_position_below_short_desc'), 52.2);
add_action('woocommerce_single_product_summary', array($wcst_core, 'wcst_position_below_add_cart'), 32.2);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment