WordPress filter hook
advanced_woo_discount_rules_get_product_discount_price_from_custom_price
Fired by 13 WordPress plugins, running on 736K+ sites between them.
“Ask Flycart what this product's price discounts to.”
How to use advanced_woo_discount_rules_get_product_discount_price_from_custom_price
It's a filter: your callback receives the value and 6 more arguments, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', function( $price, $product, $arg3, $price2, $arg5, $arg6, $arg7 ) {
// Change $price here.
return $price;
}, 10, 7 );Argument names come from Discount Rules for WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
13 plugins that fire advanced_woo_discount_rules_get_product_discount_price_from_custom_price
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
PixelYourSite400,000+ installs
apply_filters( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', $price, $product, $qty, 0, 'discounted_price', true, false )includes/functions-woo-discounts.php:160 -
Discount Rules for WooCommerce100,000+ installs
apply_filters( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', $price, $product, 1, $price, 'discounted_price', true, true )v2/App/Compatibility/ExtraProductOptionsProByThemeHigh.php:30 -
Product Feed Manager for WooCommerce90,000+ installs
apply_filters( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', false, $product, 1, $price, 'discounted_price', true, true )compatibility/Shims/Wdr_ConfigurationCompatibility.php:125 -
Product Feed PRO for WooCommerce by AdTribes80,000+ installs
apply_filters( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', false, $product, 1, $product_data['sale_price'] ?? 0, 'discounted_price', true, true )classes/class-get-products.php:4606 -
FunnelKit30,000+ installs
apply_filters( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', $base, $product, $qty, $base, 'discounted_price', true, false )modules/bundles/includes/compat/discount/wdr.php:255 -
Klarna for WooCommerce20,000+ installs
apply_filters( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', $purchase_amount, $product, 1, $purchase_amount, 'discounted_price', true )src/OnsiteMessaging/Utility.php:71 -
Advanced Woo Labels10,000+ installs
apply_filters( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', $price, $product, 1, $price, 'discounted_price', true, true )includes/modules/class-awl-wdr.php:54 -
UpsellWP5,000+ installs
apply_filters( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', false, $product, 1, 0, 'discounted_price', true, ($context == 'cart') )app/Modules/Compatibilities/WDRv2.php:62 -
Extra Product Options for WooCommerce600+ installs
apply_filters( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', false, $product_data, 1, (float) $product_price, 'discounted_price', true, true )includes/compatibility/plugins/class-epofw-plugin-woo-discount-rules.php:113 -
Paykoko100+ installs
apply_filters( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', $price, $product, 1, 0, 'discounted_price', true, false )product_display.php:54 -
avecdo for WooCommerce100+ installs
apply_filters( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', (float)$product->get_price(), $product, 1, 0, 'discounted_price', true, false )src/Models/WooQueries.php:319 -
Product Feed Manager by Conversios: Google Shopping, TikTok, Meta & 100+ Channels100+ installs
apply_filters( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', false, $product, 1, $product_data['sale_price'], 'discounted_price', true, true )includes/setup/GenerateFile/classes/class-get-products.php:3268 -
AdScale AI Ads Meta/Google Ads30+ installs
apply_filters( 'advanced_woo_discount_rules_get_product_discount_price_from_custom_price', $display_regular_price, $product, 1, 0, 'discounted_price', true, false )src/PluginApi/Products.php:450
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.