Untitled
unknown
plain_text
a year ago
622 B
14
Indexable
function custom_text_for_logged_out_users( $translated_text, $text, $domain ) {
if ( !is_user_logged_in() && $domain === 'woocommerce-product-bundles' ) {
if ( $text === 'Temporarily unavailable' || $text === 'This product is currently unavailable.' ) {
$translated_text = 'Login to see details';
}
}
return $translated_text;
}
add_filter( 'gettext', 'custom_text_for_logged_out_users', 10, 3 );
add_filter('woocommerce_bundle_empty_price_html', function($price, $item){
if ( !is_user_logged_in() ){
$price = 'Login to view prices';
}
return $price;
}, 10, 2);Editor is loading...
Leave a Comment