I’m interested in creating shortcodes that basically fill in template parts of the WooCommerce checkout. For example, in functions.php of my child theme:

function shortcode_review_order() {
    //get the template part from woocommerce/templates/checkout/review-order.php
    wc_get_template_part('checkout/review-order');
}
add_shortcode( 'custom_review_order', 'shortcode_review_order' );

…and then in my page…

<div>[custom_review_order]</div>

When I tried this, nothing appeared in my checkout page.

Is this even possible?

Read more here: Can you make WooCommerce shortcodes from template parts?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: