To add reCAPTCHA to the offer form in Name Your Price: Make Your Own Offer for WooCommerce, create Google reCAPTCHA v2 checkbox keys, then go to WPFactory > Price Offers > Form, add reCAPTCHA to Enabled fields, enter your site key and secret key, and save changes. This feature is free.
Before you start #
- WooCommerce, active.
- A Google reCAPTCHA v2 site key and secret key (free from Google).
Step 1: Create reCAPTCHA keys #
- Go to the Google reCAPTCHA admin.
- Choose Challenge (v2), then “I’m not a robot” Checkbox.
- Add your domain and submit to get a site key and a secret key.
Step 2: Enable the reCAPTCHA field #
- Go to WPFactory > Price Offers (also reachable at WooCommerce > Settings > Price Offers) and open the Form section.
- Add reCAPTCHA to Enabled fields (
alg_wc_price_offerings_form[enabled_fields]). - Enter your keys in reCAPTCHA (
alg_wc_price_offerings_form[recaptcha_site_key]) and Secret key (alg_wc_price_offerings_form[recaptcha_secret_key]). - Optionally change the Error message (
alg_wc_price_offerings_form[recaptcha_error_msg], default “reCAPTCHA check failed.”). - Save changes.
How it works #
Once enabled, the offer form shows the reCAPTCHA checkbox and loads Google’s reCAPTCHA script. When a customer submits an offer, the plugin verifies the response with Google’s servers. If the check fails, the offer is not submitted and the error message is shown. The reCAPTCHA field only loads when it is enabled, so there is no performance impact if you leave it off.
Options reference #
| Label | Option ID | Default |
|---|---|---|
| reCAPTCHA site key | alg_wc_price_offerings_form[recaptcha_site_key] |
Empty |
| Secret key | alg_wc_price_offerings_form[recaptcha_secret_key] |
Empty |
| Error message | alg_wc_price_offerings_form[recaptcha_error_msg] |
reCAPTCHA check failed. |
Get more from Name Your Price #
reCAPTCHA on the offer form is free. Name Your Price: Make Your Own Offer for WooCommerce Pro adds per-product targeting and automatic accept/reject rules. See what Pro unlocks.