I am trying to add content next to add to cart button in woocommerce for specific product, I have used the bellow woocommerce hook,But unfortunately it didn’t work any one can help me out

add_action( 'woocommerce_after_add_to_cart_button', 'add_content_after_addtocart_button_func' );

function add_content_after_addtocart_button_func() {
$current_product = $product->id;
        if($current_product === '13333') {

echo '<div class="second_content">Place your content here!</div>';
}

}

Read more here: Add Content In Next To Cart In To Specif Product


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: