Hide Price Pro: Actions & Filters

Filter: Modify Hidden Price Output

add_filter( 'caz_hpp_replacement_html', function( $html, $product_id, $rule ) {
    // Customize the HTML that replaces the hidden price
    return $html;
}, 10, 3 );

Filter: Override Rule Matching

add_filter( 'caz_hpp_should_hide_price', function( $should_hide, $product_id, $user_id ) {
    // Return true to force hide, false to force show, or null for default behavior
    return $should_hide;
}, 10, 3 );

Action: After Inquiry Submitted

add_action( 'caz_hpp_inquiry_submitted', function( $inquiry_data ) {
    // $inquiry_data contains: name, email, phone, message, product_id, rule_id
    // Send to CRM, Slack, etc.
}, 10, 1 );

Filter: Modify Inquiry Form Fields

add_filter( 'caz_hpp_inquiry_fields', function( $fields ) {
    // Add custom fields to the inquiry form
    $fields['company'] = array(
        'label'    => 'Company Name',
        'type'     => 'text',
        'required' => false,
    );
    return $fields;
} );

Filter: Customize Geo-IP Lookup

add_filter( 'caz_hpp_visitor_country', function( $country_code ) {
    // Override the detected country code
    return $country_code;
} );

Was this article helpful?