add_action('woocommerce_checkout_process', 'block_checkout_if_total_not_zero');
function block_checkout_if_total_not_zero() {
// Verificar si el total del carrito es diferente de 0
if (WC()->cart->total != 0) {
wc_add_notice('No es posible realizar la compra porque no te dan los puntos.', 'error');
}
}
0 Comentarios