tekst knop Opties selecteren aanpassen

Author: 

stackoverflow


Description: 

op de categorie overzicht en product pagina




Kind:

PHP, woocommerce


PHP:

add_filter( 'gettext', 'prefix_translate_woocommerce', 20, 3 );
add_filter( 'woocommerce_product_add_to_cart_text', function( $text ) {
global $product;
if ( $product->is_type( 'variable' ) ) {
$text = $product->is_purchasable() ? __( 'Maak uw keuze', 'woocommerce' ) : __( 'Read more', 'woocommerce' );
}
return $text;
}, 10 );
add_filter('woocommerce_dropdown_variation_attribute_options_args', 'custom_woocommerce_product_add_to_cart_text', 10, 2);
/**
* Voor op de product pagina
*/
function custom_woocommerce_product_add_to_cart_text($args){
$args['show_option_none'] = __( 'Maak uw keuze', 'woocommerce' );
return $args;
}


URL: