// CHANGE TEXT AFTER ITEM HAS BEEN ADDED TO CART/QUOTE
function my_add_to_cart_function( $message, $product_id ) {
$message = sprintf(esc_html__(' "%s" has been added to your quote.','woocommerce'), get_the_title( $product_id ) );
return $message;
}
add_filter( 'wc_add_to_cart_message', 'my_add_to_cart_function', 10, 2 );
// CHANGE TEXT TO ADD TO CART/QUOTE ON PRODUCT ARCHIVES PAGE BASED ON PRODUCT TYPE
function custom_woocommerce_product_add_to_cart_text() {
global $product;
$product_type = $product->product_type;
switch ( $product_type ) {
// case 'external':
// return __( 'Take me to their site!', 'woocommerce' );
// break;
// case 'grouped':
// return __( 'VIEW THE GOOD STUFF', 'woocommerce' );
// break;
case 'simple':
return __( 'Add to Quote', 'woocommerce' );
break;
case 'variable':
return __( 'View Options', 'woocommerce' );
}
}
add_filter( 'woocommerce_product_add_to_cart_text', 'custom_woocommerce_product_add_to_cart_text' );
// CHANGE TEXT ON SINGLE PRODUCT PAGES ADD TO QUOTE
function woo_custom_cart_button_text() {
return __('Add to Quote', 'woocommerce');
}
add_filter('woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text');