Regular price not proper
-
Hello
We have the issue with getting the regular price with API. the HTML price formate working proper.
We have used below code for getting the price. please check.
$product = wc_get_product( $product_id );
$price_html = $product->get_price_html();
$regular_price = $product->get_regular_price();
$sale_price = $product->get_sale_price();
$get_price = $product->get_price();
$price = array(‘regular_price’ => $regular_price,
‘sale_price’ => $sale_price,
‘price’ => $get_price,
);Please check below links.
https://prntscr.com/kavrv4
https://prntscr.com/kavp1q
https://prntscr.com/kavpuv
https://prntscr.com/kavrffThanks
- The topic ‘Regular price not proper’ is closed to new replies.