Created
September 13, 2017 10:56
-
-
Save xlplugins/a3a1b6c8538654ef7e5c1cc5eacd9dfd to your computer and use it in GitHub Desktop.
Change WooCommerce single product page positions for TheGem theme for Finale: WooCommerce Sales Countdown Timer & Discount Plugin
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 | |
/** | |
* Add This whole code in working theme functions.php inside php tag to alter woocommerce native positions | |
* Theme: https://themeforest.net/item/thegem-creative-multipurpose-highperformance-wordpress-theme/16061685 | |
* Finale: WooCommerce Sales Countdown Timer & Discount Plugin | |
*/ | |
add_action('wp', 'thegem_wcct_modify_positions', 90); | |
if (!function_exists('thegem_wcct_modify_positions')) { | |
function thegem_wcct_modify_positions() { | |
if (function_exists('WCCT_Core')) { | |
$wcct_core = WCCT_Core()->appearance; | |
// removing wcct action hooks on theme | |
remove_action('woocommerce_single_product_summary', array($wcct_core, 'wcct_position_above_title'), 2.3); | |
remove_action('woocommerce_single_product_summary', array($wcct_core, 'wcct_position_below_title'), 9.3); | |
remove_action('woocommerce_single_product_summary', array($wcct_core, 'wcct_position_below_review'), 11.3); | |
remove_action('woocommerce_single_product_summary', array($wcct_core, 'wcct_position_below_price'), 17.3); | |
remove_action('woocommerce_single_product_summary', array($wcct_core, 'wcct_position_below_short_desc'), 21.3); | |
remove_action('woocommerce_single_product_summary', array($wcct_core, 'wcct_position_below_add_cart'), 39.3); | |
add_action('thegem_woocommerce_single_product_right', array($wcct_core, 'wcct_position_above_title'), 8.3); | |
add_action('thegem_woocommerce_single_product_right', array($wcct_core, 'wcct_position_below_title'), 12.3); | |
add_action('thegem_woocommerce_single_product_right', array($wcct_core, 'wcct_position_below_review'), 22.3); | |
add_action('thegem_woocommerce_single_product_right', array($wcct_core, 'wcct_position_below_price'), 32.3); | |
add_action('thegem_woocommerce_single_product_right', array($wcct_core, 'wcct_position_below_short_desc'), 37.3); | |
add_action('thegem_woocommerce_single_product_right', array($wcct_core, 'wcct_position_below_add_cart'), 47.3); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you, XLPlugins!