Zum Inhalt springen

Configuration

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

All of Enquire’s options live on one screen: WooCommerce → Enquire. The page is split into four sections, General, Trigger button, Form fields and Messaging, and everything is stored in a single array option, enquire_settings. The menu and the save handler both require the manage_woocommerce capability, so shop managers can configure it, not just administrators.

Every text field shows its packaged default as a greyed placeholder. Clear a field and save, and that default is written back, so you cannot accidentally end up with a blank label or an empty button.

The master switch, on by default. When off, the button, dialog and AJAX handler are not registered and no front-end CSS or JavaScript is enqueued, the product page is untouched. Your other settings stay saved for when you turn it back on.

Where enquiries are sent. Leave it empty to use your site’s admin email, the placeholder shows that address. The value is run through sanitize_email on save; if it is empty or invalid, delivery falls back to the admin email at send time. The shopper’s own address is always set as the message Reply-To, so replying from your inbox reaches them directly.

The wording on the “Ask a question” button, for example Ask about this product or Enquire now. The button is rendered on the woocommerce_after_add_to_cart_form hook and always appears there, its position is fixed by design and is not a setting. (The old documentation listed a “Placement” option with before/after/end-of-summary choices; no such setting exists.)

These control the dialog’s labels and which fields a shopper must complete.

  • Form title, the heading at the top of the dialog (default Ask a question about this product).
  • Name field label, sits above the name input (default Your name).
  • Email field label, sits above the email input (default Your email). This address becomes the Reply-To.
  • Message field label, sits above the message box (default Your question).
  • Submit button label, the send button inside the dialog (default Send enquiry).
  • Require name / Require email / Require message, each toggled independently; all three are on by default.

One validation rule is not a toggle: when an email is entered it must be a valid format, even if Require email is off. Leaving email optional means a shopper can send without one, but then you have no Reply-To and may not be able to answer.

  • Success message, shown inline the moment an enquiry sends (default Thanks! Your question has been sent. We will get back to you shortly.).
  • Error message, shown if the send fails, the nonce is stale, or the rate limit blocks the submit.
  • Email subject, the subject line of the email you receive. The token {product} is replaced with the product name; the default is Product enquiry: {product}, so enquiries are easy to scan in your inbox.
  • The button is always placed by woocommerce_after_add_to_cart_form, there is no placement setting.
  • Spam screening (nonce, honeypot, 30-second rate limit) is always on and has no options. See How enquiries work.
  • No enquiry data is stored, submissions are emailed only.

Enquire fires one action after an enquiry has been emailed successfully. There are no merchant-facing filters in the free edition, and no shortcode.

/**
* @param WC_Product $product The product the enquiry is about.
* @param array $enquiry Sanitised submission: name, email, message.
*/
add_action( 'enquire/enquiry_sent', function ( $product, $enquiry ) {
// e.g. push the enquiry to a CRM or log it yourself.
error_log( sprintf(
'Enquiry on %s from %s',
$product->get_name(),
$enquiry['email']
) );
}, 10, 2 );

This hook fires only after wp_mail() returns success and after the rate limit is recorded, a honeypot hit or a failed send does not fire it. Enquire Pro’s auto-reply is built on this hook.

Settings live in the enquire_settings option; Enquire also keeps a enquire_db_version marker. There is no enquiry table, nothing is written per submission. Deleting the plugin from wp-admin runs uninstall.php, which deletes both options. WooCommerce data is never touched, and Enquire contacts no external service.