Request Quote Plugin - Actions and Filters

Request Quote For WooCommerce offers a range of action and filter hooks that empower you to customize the plugin's functionality. Keep in mind that this code is intended for developers, so if you're not familiar with coding, it's best to seek assistance from a developer.

Actions:

  • dsrqw_add_to_quote_button_before

Fires before the request quote button is rendered.

Example:

add_action( 'dsrqw_add_to_quote_button_before', 'my_dsrqw_add_to_quote_button_before' );
function my_dsrqw_add_to_quote_button_before() {
	// Your code here...
}

  • dsrqw_request_quote_view_before

Fires before the quote items table is rendered on the request quote page.

Example:

add_action( 'dsrqw_request_quote_view_before', 'my_dsrqw_request_quote_view_before' );
function my_dsrqw_request_quote_view_before() {
	// Your code here...
}
  • dsrqw_request_quote_form_before

Fires before the quote submission form is rendered on the request quote page.

Example:

add_action( 'dsrqw_request_quote_form_before', 'my_dsrqw_request_quote_form_before' );
function my_dsrqw_request_quote_form_before() {
	// Your code here...
}
  • dsrqw_my_account_quote_details_before

Fires before the quote details are rendered on the My Account page.

Example:

add_action( 'dsrqw_my_account_quote_details_before', 'my_dsrqw_my_account_quote_details_before' );
function my_dsrqw_my_account_quote_details_before() {
	// Your code here...
}
  • dsrqw_pdf_template_start

Fires before the quote PDF file header is rendered.

Arguments:

$quote_id - The current quote id. Useful for customizing the PDF template for specific quote requests.

Example:

add_action( 'dsrqw_pdf_template_start', 'my_dsrqw_pdf_template_start' );
function my_dsrqw_pdf_template_start( $quote_id ) {
	// Your code here...
}
  • dsrqw_quote_pdf_template_custom_styles

Fires when the quote PDF file styles are rendered. Use this filter to apply your own styles for the Quote PDF file.

Arguments:

$quote_id - The current quote id. Helpful for customizing PDF file styles for specific quote requests.

Example:

add_action( 'dsrqw_quote_pdf_template_custom_styles', 'my_dsrqw_quote_pdf_template_custom_styles' );
function my_dsrqw_quote_pdf_template_custom_styles( $quote_id ) {
	// Your code here...
}

Filters:

  • dsrqw_single_product_quote_button_position

Set a custom position for the request quote button on the single product page.

Example:

function my_dsrqw_single_product_button_position() {
	return array( 'woocommerce_before_add_to_cart_button', 10 );
}
add_filter( 'dsrqw_single_product_quote_button_position', 'my_dsrqw_single_product_button_position' );
  • dsrqw_shop_page_quote_button_position

Set a custom position for the request quote button on Shop/Archive pages.

Example:

function my_dsrqw_shop_page_button_position() {
	return array( 'woocommerce_shop_loop_item_title', 1 );
}
add_filter( 'dsrqw_shop_page_quote_button_position', 'my_dsrqw_shop_page_button_position' );
  • dsrqw_display_button_even_if_product_exists

Show the quote button on product pages always, even if the product is already in the quote list.

Example:

function my_dsrqw_display_quote_button_always() {
	return true;
}
add_filter( 'dsrqw_display_button_even_if_product_exists', 'my_dsrqw_display_quote_button_always' );
  • dsrqw_hide_accept_reject_link_in_email

Hide the Accept and Reject buttons from the quote email sent to customers by the admin.

Example:

function my_dsrqw_hide_accept_reject_link_in_email() {
	return true;
}
add_filter( 'dsrqw_hide_accept_reject_link_in_email', 'my_dsrqw_hide_accept_reject_link_in_email' );
  • dsrqw_hide_accept_reject_link_in_pdf

Hide the Accept and Reject buttons from the quote PDF file.

Example:

function my_dsrqw_hide_accept_reject_link_in_pdf() {
	return true;
}
add_filter( 'dsrqw_hide_accept_reject_link_in_pdf', 'my_dsrqw_hide_accept_reject_link_in_pdf' );
  • dsrqw_request_quote_submit_form_fields

Customize the Request quote form fields. You can add new fields or modify existing ones.

Arguments:

$form_fields - Contains all the form fields.

Example:

function my_dsrqw_request_quote_submit_form_fields( $form_fields ) {
	if ( ! isset( $form_fields['phone'] ) ) {
		$form_fields['phone'] = array(
			'label' => 'Phone',
			'type' => 'text',
			'require' => true,
			'placeholder' => 'Enter your phone number.',
			'value' => '',
			'field_order' => 2
		);
	}

	return $form_fields;
}
add_filter( 'dsrqw_request_quote_submit_form_fields', 'my_dsrqw_request_quote_submit_form_fields' );

Explore the versatility of Request Quote For WooCommerce by harnessing the power of its extensive actions and filters to tailor the plugin to your precise needs!

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.