P
P
Pavel2017-07-24 10:38:26
WordPress
Pavel, 2017-07-24 10:38:26

How to automatically fill in the field in WooCommerce when placing an order from cookies?

There is a roystat field that must be filled in automatically at the stage of order formation from a cookie file.
How can this be implemented?
thank.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WordPress WooCommerce, 2017-07-25
@neon51r

there is a hook that is called when a new order is formed. like this woocommerce_new_order
you hang a function on it. next you have order_id and $_COOKIE array.
You can do whatever is legal with them.

P
Pavel, 2017-07-25
@neon51r

yes, I decided through substitution on the page through js in the field. decided that way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question