【发布时间】:2021-03-19 19:00:09
【问题描述】:
我目前在functions.php 文件中使用以下代码。
add_action( 'woocommerce_after_shipping_rate', 'action_after_shipping_rate', 20, 2 );
function action_after_shipping_rate ( $method, $index ) {
// Targeting checkout page only:
if( is_cart() ) return; // Exit on cart page
if( 'flat_rate:3' ) {
echo __("<p>Delivery will take place tomorrow</br> morning between 8-12</p>");
}
}
现在我想获取客户邮政编码,然后将其添加到我预先存在的代码中。
谁能帮我解决这个问题?
【问题讨论】:
标签: php wordpress woocommerce checkout shipping-method