Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Sirvijver/36d675967f61f4c04d18bdbe1c5c70f8 to your computer and use it in GitHub Desktop.

Select an option

Save Sirvijver/36d675967f61f4c04d18bdbe1c5c70f8 to your computer and use it in GitHub Desktop.
Change Zettle synced price from discount to normal price
function return_custom_price($price, $product)
{
if ($product instanceof WC_Product_Variable) {
return $price;
}
return $product->get_regular_price();
}
add_filter('woocommerce_product_get_price', 'return_custom_price', 20, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment