add_fee with variable value
-
Hi, I have this code:
function woo_add_cart_fee() {
$name = ‘Valor de envío’;
$fee = $_GET[“costoenvio”];
WC()->cart->add_fee( $name, $fee, false );
}
add_action( ‘woocommerce_cart_calculate_fees’, ‘woo_add_cart_fee’ );The value take from input text in the checkout page, in review order the value is add to total, but when I click in pay this value is lose. If I use a Fixed value in $fee work, but not with a variable value.
Somebody have any idea?
Thanks!
The page I need help with: [log in to see the link]
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘add_fee with variable value’ is closed to new replies.