Tagged: Product page, social share
Hi Support,
we try this solution: https://kriesi.at/support/topic/social-share-buttons-product-page/#post-656271 and this https://kriesi.at/support/topic/social-share-buttons-product-page/#post-654586 but both hooks don’t work anymore since the Enfold update.
How can we fix it?
Thanks for help!
Best regards!
Tobias
Hey Tobias,
Please use following code instead
add_action('woocommerce_after_single_product_summary', 'avia_add_social_toolbar', 1);
function avia_add_social_toolbar()
{
if( is_singular( 'product' ) ) {
$content = '<div class="share_heading">Share this Product</div>';
$content .= avia_social_share_links_single_post(array(), false, '', false);
}
echo $content;
}
Best regards,
Yigit
Hi Yigit,
thanks a lot. This was enough:
/*Social Share Buttons on Product Page*/
add_action('woocommerce_after_single_product_summary', 'avia_add_social_toolbar', 1);
function avia_add_social_toolbar()
{
if( is_singular( 'product' ) ) {
$content .= avia_social_share_links_single_post(array(), false, '', false);
}
echo $content;
}
Thanks for your help!
Best regards!
Tobias