Hi, I’m using Woocommerce 9.4.3. After submitting the checkout, the confirmation page only shows the string [woocommerce_checkout] instead of the usual content for that page.
I found that’s handled in this file /wp-content/plugins/woocommerce/src/Blocks/BlockTypes/Checkout.php
at this point (line ~152)
protected function render( $attributes, $content, $block ) {
if ( $this->is_checkout_endpoint() ) {
// Note: Currently the block only takes care of the main checkout form -- if an endpoint is set, refer to the
// legacy shortcode instead and do not render block.
return wc_current_theme_is_fse_theme() ? do_shortcode( '[woocommerce_checkout]' ) : '[woocommerce_checkout]';
}
...
If I replace the return line with this return do_shortcode( '[woocommerce_checkout]' );
it works but I don’t want to modify core file. I’d like to understand why this happens and if anyone already have solution for this
That function must return true, but it does not.
It checks whether the current theme is a FSE theme.
You may find this Sage 10 FSE example theme helpful:
Mh, let me undestand. Nowadays this is the official Sage theme to use with Wordpress/Woocommerce? I completely lost it. Is it mantained by the Roots crew? Please could you briefly help me understand what is this?
We always worked with the official one. Porting the official to this one I suppose is a lot of work we can’t do on low -budget project. Are you aware of a dirty workaround to solve my issue, excluding editing core files? Thanks
Sorry for the late reply. The checkout page is using Gutenberg, as Woocommerce default (the checkout in Woocommerce now is a block, not a shortcode anymore)