Hi there,
You mean another has content area element too and when you switch the theme it works? Woocommerce checkout shortcode is supposed to be added alone in the editor and not with the builder for the reason that it’s the hook to let Woocommerce that it’s one of its default pages.
The issue here is not the theme or server, but the combination of shortcodes and it usually happens in Wordpress. Let’s take this a sample,
add_filter('the_content', 'share_me');
function share_me ( $content ) {
return $content.do_shortcode('blah bla blah ..... so on');
}
This could actually cause internal server error since it can create loops. The the_content
itself has do_shortcode()
and you’re calling another do_shortcode()
within it.
In the builder, all element with text processing as do_shortcode()
to allow shortcode processing within the content, all editor are supposed to have do_shortcode()
, else, your added shortcode will not be executed.
Now, [woocommerce_checkout]
has many filters and hooks, and internal shortcodes as well. Calling it with content is the element or any text element will result in 500 internal server error.
Then we have 3 options
-
When you said fix it on the builder side, then remove do_shortcode
in all type of text element, but doing that will remove the shortcode capability of the editor (example, [acf field="name"]
will stay [acf field="name"]
instead of displaying the value of that shortcode.
-
Remove the filter, hooks, and internal shortcodes or Woocommerce’s [woocommerce_checkout]
but that will kill the real purpose of the checkout page
-
Don’t use the builder in Woocommerce’s default pages.
BUT these are just assuming that the issue is related to the builder and [woocommerce_checkout]
since your reply to me and Christian is a bit confusing:
As long as you manually insert the Shortcode somewhere on your website, Woocommerce recognizes that page and under status will give it the proper page ID.
But if you use the new Content Area element to insert the Shortcode, Woocommerce can’t seem to automatically find the Shortcode anywehre on the site.
- Does that mean it works in PRO (no 500 internal server error ) and just can’t recognize the shortcode, then you said:
The reason why the 500 error disappeared and the Checkout page is now full width is because as mentioned in my last post, I inserted the checkout Shortcode through the standard WordPress Text editor instead of using the Pro editor.
I checked again your woocommerce’s checkout pages and I’m not getting any 500 internal server error. But, I’ll continue checking.
Thanks!