相关疑难解决方法(0)

免费送货标签的WooCommerce自定义功能

当我将以下内容放入我的functions.php时,它会崩溃我的整个网站.这个功能的目的是改变

elseif ( $method->id !== 'free_shipping' ) {
    $label .= ' (' . __( '**Free**', 'woocommerce' ) . ')';
Run Code Online (Sandbox Code Playgroud)

对...

elseif ( $method->id !== 'free_shipping' ) {
    $label .= ' (' . __( '**To Be Calculated**', 'woocommerce' ) . ')';
Run Code Online (Sandbox Code Playgroud)

当我更改原始woocommerce/includes/wc-cart-functions.php中的一个单词时,它可以完美地运行.我不希望它被更新覆盖.

/**
* Get a shipping methods full label including price
* @param  object $method
* @return string
*/
function wc_cart_totals_shipping_method_label( $method ) {
$label = $method->label;

if ( $method->cost > 0 ) {
    if ( WC()->cart->tax_display_cart == 'excl' ) …
Run Code Online (Sandbox Code Playgroud)

php wordpress wordpress-plugin woocommerce

6
推荐指数
1
解决办法
4618
查看次数

标签 统计

php ×1

woocommerce ×1

wordpress ×1

wordpress-plugin ×1