Support » Plugin: WooCommerce Products Per Page » Changing the text in the dropdown

  • Plugin Author Jeroen Sormani

    (@sormano)


    Here’s an example of how you can change the text in the dropdown. There’s a option to change it for a numeric value and for the ‘All’ option when using the ‘-1’ as a value.

    add_filter( 'wppp_ppp_text', 'wppp_custom_text', 10, 2 );
    function wppp_custom_text( $text, $value ) {
    	if ( $value == '-1' ) {
    		return 'Show all products';
    	}
    	return 'Display %s products';
    
    }
  • You must be logged in to reply to this topic.