Checkout form fields are not loaded on custom post type

Hi,

I understand you would like the shortcode [woocommerce_checkout] on posts and pages, this is the expected behavior, and you would like to use it on custom post type, can you provide more details about this? That way, we can better understand your goal.

Thanks.

Thread Starter
jas

(@jaskaranpreetsingh)

Hi!

Thanks for your reply. I have now found the filter and able to work it as required.

add_filter('woocommerce_is_checkout','override_status_on_post_page');

function override_status_on_post_page($is_checkout){

// modified is_checkout variable according to my requirements

return $is_checkout;

}

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer