Skip to content

Instantly share code, notes, and snippets.

@Musilda
Created March 3, 2020 05:43
Show Gist options
  • Save Musilda/6e16f80467732f8fbd6eef86747e03e2 to your computer and use it in GitHub Desktop.
Save Musilda/6e16f80467732f8fbd6eef86747e03e2 to your computer and use it in GitHub Desktop.
<?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