View Categories

Name Your Price: Developer Hooks and Filters Reference

Name Your Price: Make Your Own Offer for WooCommerce exposes actions, filters, and shortcodes so you can change its behavior in code without editing plugin files. This reference lists the hooks that ship in the current version, with their arguments verified against source.

Filters #

Filter Filtered value Arguments
alg_wc_price_offerings_is_enabled_for_product Whether offers are enabled for a product $enabled, $product_id
alg_wc_price_offerings_is_enabled_per_product Whether per-product mode is active $is_per_product
alg_wc_po_show_offer_price_button Whether to show the Make an offer button $show, $product_id
alg_wc_po_form_field_{$field} The data array for a single form field $data
alg_wc_po_price_offer The offer data array before it is saved $price_offer, $product
alg_wc_po_accepted_price The price used when an offer is accepted or countered $accepted_price, $action, $args, $offer
alg_wc_po_duplicate_query_args The WP_Query args used to detect duplicate offers $query_args

The alg_wc_po_form_field_{$field} filter is dynamic: {$field} is one of price, quantity, customer_email, customer_name, customer_phone, customer_message, recaptcha, button, or customer_copy. Return an empty value to skip the field.

Note: the plugin also uses an internal alg_wc_price_offerings_settings filter to gate Pro-only settings fields. It is not intended for store customization.

Hide the button for a specific product #

add_filter( 'alg_wc_po_show_offer_price_button', function ( $show, $product_id ) {
    return ( 1234 === (int) $product_id ) ? false : $show;
}, 10, 2 );

Adjust the saved offer data #

add_filter( 'alg_wc_po_price_offer', function ( $offer, $product ) {
    // e.g. tag every offer with the current sale campaign
    $offer['customer_message'] = trim( $offer['customer_message'] . ' [summer-sale]' );
    return $offer;
}, 10, 2 );

Actions #

Action Fires when Arguments
alg_wc_po_price_offer_created A new offer has been created $offer_id
alg_wc_po_before_offer_price_button Just before the button is output $product_id
alg_wc_po_after_offer_price_button Just after the button is output $product_id
alg_wc_po_offer_price_button_disabled The button is skipped for a product (not enabled or excluded) $product_id
alg_wc_price_offerings_core_loaded The core class has loaded $core
alg_wc_price_offerings_admin_loaded The admin side has loaded $core
alg_wc_price_offerings_frontend_loaded The frontend class has loaded $frontend
alg_wc_price_offerings_version_updated After the stored version is updated $version

Notify an external service when an offer is created #

add_action( 'alg_wc_po_price_offer_created', function ( $offer_id ) {
    $offer = new Alg_WC_Price_Offer( $offer_id );
    wp_remote_post( 'https://example.com/webhook', array(
        'body' => array(
            'offer_id' => $offer_id,
            'price'    => $offer->get_price(),
        ),
    ) );
} );

Note that in the Pro version the auto-accept and auto-reject features are also attached to alg_wc_po_price_offer_created.

Shortcodes #

  • [alg_wc_price_offers_button] – outputs the Make an offer button for the current product. No parameters.
  • [alg_wc_price_offers_translate] (and its alias [alg_wc_price_offerings_translate]) – shows or hides content by active language. Parameters: lang, not_lang, lang_text, not_lang_text.

See the Shortcodes guide for full usage.

REST API #

When enabled, offers are exposed under wc/v3/alg_wc_price_offers. See the Offers REST API reference.

Need help? #

If a hook does not behave as you expect, contact us on the Name Your Price support forum with the hook name and a short code sample.