Hooks and Filters (API)

The Bulk Pricing for WooCommerce plugin contains various action and filter hooks which can be used to customize its behavior.

How to add a contact us link

The following code will modify the discount info table visible on the product page and replace last column with link to your contact page:

// replace last column with link to contact page
function my_custom_bulk_pricing_table_value( $value, $original_price, $rule, $rules, $post_id, $col_index ) {

    $link_url   = "http://www.example.com/contact/";
    $link_title = "EXAMPLE TEXT";
    $link       = '<a href="'.$link_url.'">'.$link_title.'</a>';

    if ( $col_index == sizeof($rules) - 1 ) {
        $value = $link;
    }

    return $value;
}
add_filter( 'woocommerce_bulk_pricing_table_value', 'my_custom_bulk_pricing_table_value', 10, 6);

More code snippets will follow.