-
Hi there
I’m trying editing the layout of WC Single Product Page from scratch, and I’m using GP Element Block, where I’m using shortcodes from below snippet – I have set Displays rules pointing on Products.
I’m nearly get it working, but get an error “Update failed” when saving Elements Block, using below snippet.
It is working when I exchanges “woocommerce_show_product_images” with for example “woocommerce_template_single_price”.Snippet to insert shortcode in GP Element Block
function single_product_column_1() {
// Start output buffering (optional, useful if your hooked functions echo content).
ob_start();
do_action( ‘wc_single_product_column_1’ );
return ob_get_clean();
}
add_shortcode( ‘sc_single_product_column_1’, ‘single_product_column_1’ );remove_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_images’, 20 );
add_action( ‘wc_single_product_column_1’, ‘woocommerce_show_product_images’, 20 );Hope you can help 🙂
-
Hi there,
please check with Woocommerce’s support for this, your code might have some issue.
-
I’ll try that 🙂
-
Hope they can fix the code for you 🙂
- You must be logged in to reply to this topic.