[2.6] Remove empty ids.

Fixes #11887
This commit is contained in:
Mike Jolley 2016-09-12 13:10:08 +01:00
parent e7fb89be5f
commit 804178b6d1
1 changed files with 1 additions and 7 deletions

View File

@ -231,13 +231,7 @@ class WC_Shortcodes {
'ids' => '',
), $atts, 'product_categories' );
if ( isset( $atts['ids'] ) ) {
$ids = explode( ',', $atts['ids'] );
$ids = array_map( 'trim', $ids );
} else {
$ids = array();
}
$ids = array_filter( array_map( 'trim', explode( ',', $atts['ids'] ) ) );
$hide_empty = ( $atts['hide_empty'] == true || $atts['hide_empty'] == 1 ) ? 1 : 0;
// get terms and workaround WP bug with parents/pad counts