Skip to content

Instantly share code, notes, and snippets.

@yousufansa
Last active December 1, 2020 13:19
Show Gist options
  • Select an option

  • Save yousufansa/07e24633fb66ffce8e1fe68882f8ba7b to your computer and use it in GitHub Desktop.

Select an option

Save yousufansa/07e24633fb66ffce8e1fe68882f8ba7b to your computer and use it in GitHub Desktop.
Electro - Display custom data below short description on single product page
if( ! function_exists( 'ec_child_single_product_summary_custom_content' ) ) {
function ec_child_single_product_summary_custom_content() {
$static_block_id = 0;
if ( ! empty( $static_block_id ) && $static_block_id > 0 ) {
$static_block = get_post( $static_block_id );
if( is_wp_error( $static_block ) ) return;
echo do_shortcode( $static_block->post_content );
}
}
}
add_action( 'woocommerce_single_product_summary', 'ec_child_single_product_summary_custom_content', 23 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment