Plugin Author
WPBean
(@wpbean)
Hi,
First, update the plugin to the latest version, we just release an update and we added a new hook.
Then, add the following PHP code on your theme functions.php file –
add_filter( ‘wpb_wl_quick_view_btn_text’, ‘wpb_wl_quick_view_btn_text_chnage’ );
function wpb_wl_quick_view_btn_text_chnage( $text ){
return ‘New Text’;
}
Thanks
Thank you for your quick response and fix!
Hello,
Is there any way we can change the label of those buttons conditionally based on categories or something?
Edited: Never mind, I went ahead and did this with custom jQuery.
-
This reply was modified 7 years, 2 months ago by
wallacelin. Reason: support no longer required
Plugin Author
WPBean
(@wpbean)
Hi,
Yes possible.
Add this code on your functions.php file and add your categories slug. You can add multiple conditions in the same way.
add_filter( 'wpb_wl_quick_view_btn_text', 'wpb_wl_quick_view_btn_text_chnage' );
function wpb_wl_quick_view_btn_text_chnage( $text ){
if( is_product_category( array( 'clothing', 'games' ) ) ){
$text = 'New Text';
}
return $text;
}
Thanks
Amazing! Wasn’t expecting this to be actually possible but that’s great. Thank you, I shall replace my code with this.
Plugin Author
WPBean
(@wpbean)
Yes, replace the previous code with it.
If you like our support and our plugin, please give it a 5-star rating.
Huge thanks in advance. 🙂
Another way for people not comfortable with coding is using the language file wp-content\plugins\woocommerce-lightbox\languages\default.po and create a new translation .mo file from it. Then place that newly created .mo file inside folder wp-content\languages\plugins and rename it ‘woocommmerce-lightbox.mo’.
I use Poedit program for editing .po translation files.
Good luck!
Plugin Author
WPBean
(@wpbean)
@528491-1
I am not sure I understand your problem?
You can translate the language file using any WordPress translation plugin.