Exclude external product from price rounding
-
Hi,
I’m using the following piece of code based on the one I found here to round down prices:
add_filter('woocs_raw_woocommerce_price', function($price) { return 100 * floor($price / 100); // redondea para abajo en 100 }); add_filter('woocs_woocommerce_variation_prices', function($price) { return 100 * floor($price / 100); });
but I need to exclude external products from this. Is there a way to do it?
I tried using
if( $product->is_type( 'external' )
but I’m getting PHP errors.The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Exclude external product from price rounding’ is closed to new replies.