Get the add to cart button text for the single page.
Obtenir le texte du bouton "Ajouter au panier" pour la page unique.
__( 'Add to cart', 'woocommerce'
Sortie :
@return string
// Texte bouton panier page produit
add_filter('woocommerce_product_single_add_to_cart_text', 'texte_bouton_produit');
function texte_bouton_produit($text) {
global $product;
if ($product->is_type('variable')) {
return 'Choisir les options';
}
if ($product->is_in_stock()) {
return 'Ajouter au panier - ' . wc_price($product->get_price());
}
return $text;
}
Chargement des actualités...