Tekst na in winkelmand knop WooCommerce

Wil je een tekst toevoegen na de ‘in winkelmand’ knop in je webshop? Met deze code realiseer je dit.

add_action( ‘woocommerce_after_add_to_cart_button’, ‘add_content_after_addtocart_button_func’ );

function add_content_after_addtocart_button_func() {

// Echo content.

echo ‘<div class=”second_content”><a href=”#tab-title-vraag_tab” id=”second_tab”>Stel een vraag</a></div>’;

echo ‘<script>
jQuery( document ).ready(function($) {
$(“#second_tab” ).click(function() {
$( “#tab-title-vraag_tab a” ).click();
});
});
</script>’;

}

Wil jij gratis WordPress tips in je inbox ontvangen?

Wij sturen maximaal 2 e-mails per maand. Beloofd!

Voornaam
Dit veld is bedoeld voor validatiedoeleinden en moet niet worden gewijzigd.