The woocs_fixed_raw_woocommerce_price filter passes the fixed per-currency price of a product at the moment FOX decides to use it instead of a converted one. It fires only when a fixed price actually exists for the current currency.
This is the attachment point for making a third-party pricing plugin respect fixed prices. Plugins that calculate their own discounts usually work from the base price and never learn that this product has its own amount in this currency — reading it here is how they find out.
add_filter('woocs_fixed_raw_woocommerce_price', function ($fixed_price, $product, $original_price) {
// apply a wholesale discount to the fixed price too
if (in_array('wholesale', (array) wp_get_current_user()->roles)) {
return floatval($fixed_price) * 0.9;
}
return $fixed_price;
}, 10, 3);
Parameters:
$fixed_price - the fixed price found for the current currency
$product (WC_Product) - the product it belongs to
$original_price - the price before the fixed value replaced it
Returns: