N
N
Nikolai Kovalev2020-05-21 20:13:30
WooCommerce
Nikolai Kovalev, 2020-05-21 20:13:30

How to submit a WooCommerce category title from a CF7 contact form located on that category?

By installing the plugin Contact Form 7 - Dynamic Text Extension , you can send the title (title) of the product through the form using the hidden field [dynamichidden example "CF7_get_post_var key='title'"].

I'm interested in submitting the WooCommerce category title, how can I submit the title in the form?

You can substitute the current URL, bloginfo, etc. but I haven’t dug up anything about categories and other taxonomies. I understand that through JS, it is necessary to send by ID, or do I not understand it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pychev Anatoly, 2020-05-21
@pton

As an option
Catch the hook wpcf7_before_send_mail. It is called before the mail is sent.
Use Referer to find out from which page the landing came from.
Insert text at the right place in the letter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question