Use custom field to set fee
-
Is it possible to use the value of a custom field to set the value of a fee using WC’s fee function?
function woo_add_cart_fee() { global $woocommerce; $woocommerce->cart->add_fee( __('Custom', 'woocommerce'), 5 ); } add_action( 'woocommerce_cart_calculate_fees', 'woo_add_cart_fee' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Use custom field to set fee’ is closed to new replies.