php 为Finale更改WooCommerce单一产品页面位置为TheGem主题:WooCommerce销售倒数计时器和折扣插件
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 为Finale更改WooCommerce单一产品页面位置为TheGem主题:WooCommerce销售倒数计时器和折扣插件相关的知识,希望对你有一定的参考价值。
<?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);
}
}
}
以上是关于php 为Finale更改WooCommerce单一产品页面位置为TheGem主题:WooCommerce销售倒数计时器和折扣插件的主要内容,如果未能解决你的问题,请参考以下文章
php 此代码与Finale:WooCommerce Countdown Timer插件一起运行。取消原生'woocommerce_after_shop_loop_item上的网格显示功能
php 为XL WooCommerce销售触发插件更改Oxygen主题的WooCommerce单品页面位置
php 为XL WooCommerce销售触发插件更改Eva主题的WooCommerce单一产品页面位置
php 更改WooCommerce单个产品页面位置为结局的商人主题:WooCommerce销售倒计时计时器和折扣插件
php woocommerce自定义模板单页
php 改变商店循环功能的动作钩位置并在Finale倒数计时器或计数器栏中挂钩