add_action( ‘woocommerce_before_single_product_summary’, ‘add_custom_content_for_specific_product’, 25 );
function add_custom_content_for_specific_product() {
global $product;
// Limit to a specific product ID only (Set your product ID below )
if( $product->get_id() != 65 ) return;
// The content start below (with translatables texts)
?>
<div class="custom-content product-id-<?php echo $product->get_id(); ?>">
<h3><?php _e("My custom content title", "woocommerce"); ?></h3>
<p><?php _e("This is my custom content text, this is my custom content text, this is my custom content text…", "woocommerce"); ?></p>
</div>
<?php
// End of content
}
add_action(‘woocommerce_single_product_summary’, ‘customizing_single_product_summary_hooks’, 2 );
function customizing_single_product_summary_hooks(){
remove_action(‘woocommerce_single_product_summary’,’woocommerce_template_single_title’, 5 );
}
remove_action(‘woocommerce_single_product_summary’, ‘woocommerce_template_single_title’, 5);
add_action(‘woocommerce_before_single_product_summary’, ‘woocommerce_template_single_title’, 5);