如果用户选择了特定的送货方式,例如自行收款,如何在Woocommerce结帐页面隐藏“送货”和“开票”字段 . 对于自我收集,这些字段是多余的 .
这可能是您查询的可能解决方案
add_filter('woocommerce_checkout_fields','your_fun_name'); function your_fun_name( $needs_address ) { if($payment_method == 'self-collection') { $needs_address = false; } return $needs_address; }
1 回答
这可能是您查询的可能解决方案