get_sale_price
-
I think a get_sale_price should be added to WC_Product_Woosb class otherwise some components will be getting the wrong sale price from the parent, eg:
//FIX: add sale price so other components using sale price get correct sale price public function get_sale_price( $context = 'view' ) { $product_id = $this->id; if ( ( $woosb_price_percent = get_post_meta( $product_id, 'woosb_price_percent', true ) ) && is_numeric( $woosb_price_percent ) && ( intval( $woosb_price_percent ) < 100 ) && ( intval( $woosb_price_percent ) > 0 ) ) { return $woosb_price_percent * parent::get_regular_price() / 100; } return parent::get_sale_price( $context ); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘get_sale_price’ is closed to new replies.