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]
- Replacing a plugin function with a custom renamed function doesn’t work
- CampaignMonitor for WooCommerce – Move subscribe button [closed]
- SEO Friendly URL on dynamic product page produced via shortcode
- Multiple Billing forms in WooCommerce (one billing form per product)
- Creating a Callback URL for WordPress Woocommerce to update Order Status
- Change Product Addon price based on select Variation
- WooCommerce – Maximum qty per line per product
- Woocommerce Create custom product type with variations
- Shortcode Plugin to dynamically build a shortcode via `do_shortcode` not working
- Remove /product/ from url. I want only category name then product name
- Pre booking doesn’t work with custom bootstrap modul in woocommerce [closed]
- WooCommerce specifc variations for specific user role [closed]
- Save custom attributes of product in woocommerce
- Making sure that a plugin’s scripts and stylesheets are included for dynamicaly loaded content
- Nested shortcode functions accessing variable
- Filtering WooCommerce Orders by Category
- Calling an attribute from a plugin shortcode
- Best place for short bio,image and button [closed]
- trying to get product category image in woo-coomerce
- How to add checkboxes for a woocommerce product? [closed]
- Insert content of a post into another
- Why am I getting ( WooCommerce Services could not be installed (Could not create directory.). ) error and how to solve it ?
- Product queue for my subscription box
- Want to Show Sub categories under Categories section using Woo Commerce [closed]
- how to do login using woocommerce rest api From android
- Custom Pages for Woocommerce Product-Category Pages
- Woocommerce Minimum Price for a Composite Product to add in cart
- accessing wp.media api from a tinymce plugin
- creating a custom shop page display on archive woocommerce
- Creating shortcodes in plugin
- Visual Composer shortcode for child theme dir
- get_post_title is not working on homepage
- Some code in shortcode function being ignored
- How to create a custom shortcode based on the layout?
- Unable to add TAB character to post?
- plugin shortcode output
- How to Create a shortcode to this php function
- Inject HTML meta tag inside wordpress tag using add_shortcode
- Woocommerce Shop page variation product button replace with add to cart button
- How do I apply style to each category of a list?
- Create shortcode to echo javascript
- How can I insert thousands of Woocommerce products by batch with PHP? [closed]
- WooCommerce search products between price range using WP_Query
- What is @Action in WordPress?
- Custom Shortcode Broken in WordPress 3.1
- Use $_GET inside a shortcode print empty Array
- Namespaced shortcode?
- How to use add_submenu_page() for editors?
- PHP Error When a plugin is active
- woocommerce with custom post type
- Where are theme codes located for WordPress?
- My plugin won’t return anything [closed]
- Anyway to convert a plugin to become a shortcode?
- Render Modula Plugin Shortcode On Ajax Request
- Shortcode to update user meta
- Is there a way to get plugins and themes not built for multisite to work on a network subsite?
- Exact Hook to payment methods
- Why shortcode always displayed after footer not in body
- How to have sample page for each new register users in a membership website
- 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
- using do_shortcode
- Why am I unable to load scripts in head in plugin?
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- Deactivate JS Script in Plugin Shortcode
- How to get a list of bundled products using wp_query in woocommerce
- Adding Static Image to WooCommerce Content-Single-Product template
- plugin shortcode not working on ajax request call
- Displayed content disappears when adding attributes to shortcode
- Modify page title and subtitle with a plugin
- How do I pass custom shortcode-extracted variables (taxonomy) into a query function for WordPress RoyalSlider?
- Where to find the code used to render a page that has a shortcode and a template defined?
- Shortcode not working after move wordpress website files
- Shortcode not getting replaced
- Hide a Menu Item on Login
- How to activate a plugin on the activation of a theme?
- Add Shortcode tag in Widget/Sidebar
- Flipping Book PHP Code? Any experience?
- WPTouch – how to remove shortcodes or make shortcodes function
- convert more tag to shortcode
- Shortcode does not expand in Facebook like
- Plugin that provides the [edit] shortcode?
- Product count in archive page Title in WooCommerce [closed]
- Add item to the woocommerce dashboard menu from a plugin
- WooCommerce – set session with new cart item meta when updating cart item quantity [closed]
- How to get the particular product quantity in orders in Woocommerce [closed]
- Custom shortcode for displaying user based on a role parameter
- WordPress Plugin Insert Html Code with Shortcode
- Return multiple values in a shortcode attribute
- Get Every Key & Value from Array then Display All in New Line
- Woocommerce Coupon Menu and Marketing Menu missing After “Coupons can now be managed from Marketing > Coupons.” [closed]
- IF condition based on wp_remote_get output
- shortcode not return any thing in Gutnburg
- Get orders of a specific customer woocommerce
- Shortcode Attributes to Return different $_POST
- WooCommerce: Force coupon for existing/registered customers [closed]
- Add_rewrite_endpoint doesn’t work with post name permalink structure