Keywords: WordPress + NGINX + SSL - Windows - Technical issue - Domain Name (DNS)
Description:
hello,
I am developing a 1 page order like single page application style in WordPress using Woocommerce as platform. After successfully adding an item to cart, the checkout form will appear without reloading the page.
The checkout page in woocommerce requires a wpnonce field and _wphttp_referer.
My checkout form will appear after successfuly adding to cart.
Do you know how can i generate a dynamic _wpnonce number?
It is required to be submitted as one of the fields to checkout.
if( $the_products->have_posts() ) {
while( $the_products->have_posts() ) {
$the_products->the_post();
$nonce = wp_create_nonce( 'my-nonce' );
echo '
<form name="checkout" method="post" class="checkout woocommerce-checkout epo-checkout" enctype="multipart/form-data" novalidate="novalidate">
<div class="form-control">
<input type="submit" value="" class="epo-checkout-btn">
<!-- _wpnonce help protect URLs and forms from certain types of misuse -->
<input type="hidden" id="_wpnonce" name="_wpnonce" value="'.$nonce.'">
<input type="hidden" name="_wp_http_referer" value="/mywebsite/?wc-ajax=update_order_review">
</div>
</form>
';
} // end while
wp_reset_postdata();
UC Browser Apk SHAREit Apk