woocs_raw_woocommerce_price
- /how-to-round-price-to-50-cents/ – rundet Preise auf die nächsten 50 Cent
add_filter('woocs_raw_woocommerce_price', function($price) { return round($price * 2, 0) / 2; }); - /round-prices-500/ – So runden Sie Preise auf 500
add_filter('woocs_raw_woocommerce_price', function($price) { global $WOOCS; /* if ($WOOCS->current_currency === 'USD') { $price = round($price + 0.01) - 0.01; } */ if (($price <= 1000)) { $price = round($price / 1000, 0) * 1000; return $price; } else { $price = ceil($price / 500) * 500; return $price; } }); - /how-to-round-price-to-99-cents/ – So runden Sie Preise auf x.99
Lesen Sie auch: /hook/woocs_woocommerce_variation_prices/