Skip to content

Commit 05019d2

Browse files
authored
Merge pull request #76 from saucal/bugfix/wrong-regular-price-onsale
we should always return the regular price in the price field.
2 parents 89e091f + 0e8eb4f commit 05019d2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ProductsXmlFeed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ private static function get_property_g_availability( $product, $property ) {
237237
private static function get_property_g_price( $product, $property ) {
238238

239239
if ( ! $product->get_parent_id() && method_exists( $product, 'get_variation_price' ) ) {
240-
$price = $product->get_variation_price();
240+
$price = $product->get_variation_regular_price();
241241
} else {
242-
$price = $product->get_price();
242+
$price = $product->get_regular_price();
243243
}
244244

245245
if ( empty( $price ) ) {

0 commit comments

Comments
 (0)