WooCommerce: sottrarre un importo al totale del carrello
In WooCommerce possiamo sottrarre un importo al totale del carrello.
In WooCommerce possiamo sottrarre un importo al totale del carrello.
La soluzione รจ la seguente:
function my_sub_amount {
global $woocommerce;
$amount = -50;
WC()->cart->add_fee( 'Fee', $amount );
}
add_action( 'woocommerce_cart_calculate_fees', 'my_sub_amount' );
Commenti