Support » Plugin: WooCommerce LightBox » Change Quick View Button Label Text

  • Resolved wallacelin

    (@wallacelin)


    Anyone know how to change the “Quick View” button label to read “Order” or something else?

    Would be nice if the developer actually still support this plugin.

Viewing 9 replies - 1 through 9 (of 9 total)
  • 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!

    Plugin Author wpbean

    (@wpbean)

    You are welcome!

    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 months, 2 weeks 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.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Change Quick View Button Label Text’ is closed to new replies.