• Olá, gostaria de saber se tem alguma forma de reconhecer o pagamento em uma parcela (x1) e dar o desconto de 10% apenas por filtro

    exemplo: se installment = 1 : total -10%

    // define the woocommerce_cart_product_subtotal callback
    function filter_woocommerce_cart_product_subtotal( $product_subtotal, $product, $quantity, $instance ) {

    if ( $installment < 2 (
    // Calculate Total Price
    $discount = 10;
    $discounted_total = $product_subtotal – ($product_subtotal* ($discount/100));

    };

    // add the filter
    add_filter( ‘woocommerce_cart_product_subtotal’, ‘filter_woocommerce_cart_product_subtotal’, 10, 4 );

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Desconto de 10 % no pagamento em 1x no cart?o’ is closed to new replies.