Untitled
add_filter('b2bking_quote_button_product_page', function($val){ if (is_user_logged_in()){ return true; } return $val; }, 10, 1); add_filter('b2bking_request_custom_quote_text', function($val){ return esc_html__('Send inquiry', 'b2bking'); }, 100, 1); function modify_quote_request_text($translated_text, $text, $domain) { // Check if we're on a single product page if (is_product()) { if ($text === 'Send custom quote request') { return 'Send inquiry'; } if ($text === 'Your quote request has been received. We will get back to you as soon as possible.') { return 'Your request has been received. We will get back to you as soon as possible.'; } if ($text === 'Custom Quote Request') { return 'Inquiry'; } if ($text === 'quote') { return 'inquiry'; } } return $translated_text; } add_filter('gettext', 'modify_quote_request_text', 20, 3);
Leave a Comment