如何为woocommerce结帐生成安全代码/密钥?

I am developing a one page order in WordPress with woocommerce as platform. I use jquery ajax to submit the details.

Before I can successfully submit the details of checkout, I must fist go through a url https://www.mywebsite.com/?wc-ajax=update_order_review and initialize these values:

security: hf7f684bw1
postcode: 8000
city: asdas
address: adasd
s_postcode: 8000
s_city: asdas
s_address: asdas
has_full_address: true
post_data: billing_customer_type=Company&billing_company_name=Test&billing_org_nr=123213&billing_address_1=adasd&billing_city=asdas&billing_postcode=8000&billing_phone=1213123&billing_email2=aaa%40gmail.com&_wpnonce=3c1080kf3&_wp_http_referer=%mywebsite%2Fcheckout%2F

This security: hf7f684bw1 value is important so I can submit successfully the checkout details.

Do you know how can I dynamically generate the checkout key/code so that I don't have to manually set it every 24 hours?

I was able to solve this issue with the code below:

<?php
wp_nonce_field( 'update-order-review', 'update_order_review_nonce', false, true );
?>

The code will generate a code with update_order_review_nonce as the name property of the input element.

Simple explanation:
The first parameter is a unique name of the action that woocommerce plugin uses. Second parameter is the name of the element. Third parameter ignores the referrer field so I can place and use the key on the page that I prefer.

The code above can be found on: \woocommerce\includes\class-wc-frontend scripts.php and just find the line 'update_order_review_nonce' => wp_create_nonce( 'update-order-review' ),

You can use jquery to get the value or whatever will be your purpose.