Php 在woocommerce中的单个产品摘要上回显自定义装运类标题
我试图在woocommerce中的“添加到购物车”按钮之后,在单个产品页面上回应定制配送的标题 我在这里使用了定制的shipping类插件() 我可以在购物车页面回显标题,但无法在单个产品页面上回显标题 通过使用上述功能:Php 在woocommerce中的单个产品摘要上回显自定义装运类标题,php,wordpress,class,woocommerce,shipping,Php,Wordpress,Class,Woocommerce,Shipping,我试图在woocommerce中的“添加到购物车”按钮之后,在单个产品页面上回应定制配送的标题 我在这里使用了定制的shipping类插件() 我可以在购物车页面回显标题,但无法在单个产品页面上回显标题 通过使用上述功能: add_action('woocommerce_single_product_summary','echo_shipping_title',35); function echo_shipping_title(){ $ttl = $this->ti
add_action('woocommerce_single_product_summary','echo_shipping_title',35);
function echo_shipping_title(){
$ttl = $this->title;
$ttlg = get_option('title');
$TutsPlus_Shipping_Method = new TutsPlus_Shipping_Method();
$ttlt = $TutsPlus_Shipping_Method->title;
echo $ttl; //failed
echo $ttlg; // also failed
echo $ttlt; // also failed
}
我可以挂在购物车页面,但不能挂在产品页面
我不知道我哪里做错了什么
谢谢你的帮助
谢谢