現在我正在使用需要用於驗證/分段的自定義字段的mailchimp插件。 對於這個細分市場,我想檢查使用什麼樣的優惠券。所以我清除下面的代碼應該填補我的自定義字段中使用的優惠券: add_action('woocommerce_checkout_update_order_meta',
'my_custom_checkout_field_update_order_meta');
function
我正在使用rails的條紋寶石,我試圖檢查用戶的優惠券代碼是否無效。如果代碼是無效的,那麼用戶會被重定向到users/show.html.haml 這裏是我的代碼 if Stripe::Coupon.retrieve(current_user.coupon_code) == nil
redirect_to user_path(current_user)
end
我認爲檢索從條紋的代
我想要在頁面頂部輸入優惠券的位置,以便在woocommerce結帳頁面上的頁面(訂單摘要下方)中放低。 Where &我該怎麼辦? 在此先感謝! 這裏是在結賬的文件夾形式,coupon.php的情況下,代碼是有幫助: if (! defined('ABSPATH')) {
exit; // Exit if accessed directly
}
if (! wc_coupons_enabl