jquery - Woocommerce: Go to order-pay page via ajax -


i'm developing online store woocommerce right i'm struggling following thing: can go cart , checkout page using shortcodes order-pay page has no shortcode. has idea how achieve this?

this how work shortcodes:

jquery:

$.ajax({     type: "post",     url: myajax.ajaxurl,     data: { action: 'getshortcode', shortcode: 'cart' },     success: function( response ){         // replace content     } }); 

functions.php

add_action("wp_ajax_getshortcode", "getshortcode"); add_action("wp_ajax_nopriv_getshortcode", "getshortcode");  function getshortcode(){         echo '<div class="wrapper">';         echo do_shortcode( '['. $_post['shortcode'] .']' );     echo '</div>'; } 


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -