• Hello i want show coupon subtotal price, i’m getting crazy but I found a way

    if( $cart_item[‘data’]->get_type() == woosb){
    $post_id= $cart_item[‘data’]->get_id();
    $product = wc_get_product( $post_id );
    $newsubtotal = wc_price( $product->get_sale_price() * ( 1 – ( ‘0.’ . $coupon->get_amount() ) ) * $cart_item[‘quantity’] );
    }

    there’s a faster way?
    cause in the not woobs product :
    $newsubtotal = wc_price( $cart_item[‘data’]->get_price() * ( 1 – ( ‘0.’ . $coupon->get_amount() ) ) * $cart_item[‘quantity’] );
    }
    work very well, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WPClever

    (@wpclever)

    Hi @forna91,

    Thanks for reaching out to us. I think it’s the best way for you to achieve that on our plugin until now.

    Best regards.

    Thread Starter forna91

    (@forna91)

    really bad, I saw it for you, you risk to have a lot of incompatibility if you don’t answer right with the standar woo hooks, plugin is fantastic! But if you need some costumization this plugin can get you some headhake…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How get_price()’ is closed to new replies.