Created
March 3, 2020 05:43
-
-
Save Musilda/6e16f80467732f8fbd6eef86747e03e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'toret_xml_feeds_get_price', 'musilda_sale_price_xml_feeds', 10, 2 ); | |
function musilda_sale_price_xml_feeds( $price, $product ){ | |
$sale_price = $product->get_sale_price(); | |
if ( $sale_price ) { | |
return $sale_price; | |
} | |
return $price; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment