Here’s a partial solution that has worked for me so far:
If you use the full do_shortcode()
as in your example, and you also put the basic [woocommerce_one_page_checkout]
shortcode (even without any attributes) into the content field, that seems to be enough to load the missing scripts and load the checkout form.
Not ideal but better than nothing because at least you can still programatically build out the do_shortcode()
function in PHP to do whatever you need.
This probably works because of what is stated in this part of the documentation:
To display a working checkout form, One Page Checkout needs to enqueue a variety of scripts and styles prior to outputting the content on the page. In order to do this, it will check if the current post content to determine if it contains the One Page Checkout shortcode, and only add the require styles and scripts when it does (to avoid loading them on all pages)
Related Posts:
- Redirect to another page using contact form 7? [closed]
- Make the product page as homepage WooCommerce
- WP Customer Reviews call short code on another page [closed]
- WooCommerce – Load Templates From Plugin For All Template Files
- Autogenerate wordpress shortcodes using array?
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- WooCommerce create new product and add to cart on form submit
- Shortcode under a Shortcode Multiple times Possible?
- How to set value/term of a Woocommerce attribute text field in admin panel?
- How does WooCommerce display a custom comment_type in Comment Admin?
- Get product attribute for Simple product in WooCommerce
- Over write plugin templates
- how to show database content in wordpress post
- How to prevent action in ajax request, when in admin side?
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- echo do_shortcode is not working on theme’s template
- How To Hide Filters On Specific Categories with WooCommerce Products Filter(WOOF)
- Shortcode to generate and save password in a file
- Overriding Attributes values in Shortcode Plugins
- Woocommerce email template customization [closed]
- Demystifying and understanding shortcode nomenclature
- How to modify shortcode attributes with data from current post
- Remove specific product from shop in woocommerce [closed]
- Add htmlentities and/or shortcode into data-attributes
- Any Short code Availble for Get Post List With Thumbnail Plugin?
- Where to call add_shortcode function in WordPress Plugin Boilerplate?
- Absolute Image URL in srcset is appended to the upload dir
- Plugin echos text from shortcode function in gutenberg page editor
- Integrating non-WooCommerce and WooCommerce Orders together [closed]
- wordpress prevent multiple shortcodes
- Creating a Callback URL for WordPress Woocommerce to update Order Status
- Best place for short bio,image and button [closed]
- Want to Show Sub categories under Categories section using Woo Commerce [closed]
- Unable to add TAB character to post?
- How do I apply style to each category of a list?
- How can I insert thousands of Woocommerce products by batch with PHP? [closed]
- How to use add_submenu_page() for editors?
- Anyway to convert a plugin to become a shortcode?
- How can I run a custom shortcode function on a live site and only run if the viewer is a specific machine?
- Restrict content based on buy woocommerce product
- Flipping Book PHP Code? Any experience?
- Product count in archive page Title in WooCommerce [closed]
- WordPress Stock Update Programatically
- Woocomerce add info after order email prouct item
- Getting a ressource ID, from a WC_Order_Item_Product/Order
- shortcode – multiple instances of same parameter name in one shortcode instance
- Function call in wordpress short code handler fails
- How to remove products-links after the product title using remove_action
- get_term_meta returns false in widget
- Custom search search does not work?
- WordPress custom plugin that uses woocommerce enabled payment gateway for payment [closed]
- Is there any way to inject text onto pages?
- grab or load text on demand
- How can I replace content on site generated from plugin without changing plugin
- Woocommerce Export and import Orders
- How to use a shortcode or an application to dynamically embed content from one WordPress site to another?
- Sold out Label for variable products which are partially sold out
- Managing and deleting transients with dynamically generated transient names
- Create category for each user
- Translations not appended even strings are edited
- How to get brand children with woocommerce brands
- Thumbnail image doesn’t show up in Shortcode output
- list of custom post by custom field in frontend
- get_post_meta shortcode returns empty field
- Make downloadable ebook read online without download option
- JS working when used normally but not in wordpress
- WordPress Shortcodes – Return $Variable
- Woocommerce convert simple products to variations
- shortcodes not working [dt_carousel & [dt_fancy_image
- Easiest way to load/fire a handful of functions, IF checkbox is checked?
- WooCommerce Product Table – filter query on attributes
- Disable WC Bookings automatic order completion [closed]
- Programmatically generate new pages for a site based on page template and content elements accessed via DB
- Display Woocommerce attribute name above product title
- In woocommerce, is there any way to empty wordpress default mini cart when order placed?
- In woocommerce, is it possible to make payment of one customer order by another customer?
- Woocommerce budget search
- Tracking sales/conversions in Woocommerce using Google Analytics
- Not displaying Woocommerce product page in lightbox
- Change (replace) word in metabox
- Allow vendors on a WordPress site to pick from a gallery of pre-selected images when choosing product’s featured image
- Change pricing in Woocommerce based on Category and Product [closed]
- wordpress Shortocode running twice?
- Shortcode in a blog post, footer and related products stop working
- Woocommerce: deleted single-product.php, everything still works. How is it possible?
- Using “excerpt_more” filter for a specific post type
- Strip shortcode from excerpt [duplicate]
- Next and Previous Pagination button not displaying in WordPress
- is_plugin_active() not defined on active plugin, in the thumbnails.php file
- Send Processing Order Email from custom payment plugin
- Order shipped by which driver[hook for woocoomerce order staus changed and popup in admin panel ] [closed]
- Predefine Product Variations for specific custom product type [closed]
- Console errors after WordPress Update 6.1
- How can I get the permalink of a page on which shortcode has been used
- how to add meta for order in woocommerce
- WooCommerce REST API aborts connection [closed]
- Product customizing quiz – quiz adding products to the cart
- Show WooCommerce products based on query parameters on redirect
- How to use `$order->get_discount_total()`, avoiding defoult WC decimal rounding?
- How to create different woocommerce single_product.php pages for each product? [closed]