Merge pull request #7920 from SiR-DanieL/patch-4

Remove null parents from the featured IDs array
This commit is contained in:
Claudio Sanches 2015-04-13 12:46:14 -03:00
commit 5a765aa4ef
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ function wc_get_featured_product_ids() {
) );
$product_ids = array_keys( $featured );
$parent_ids = array_values( $featured );
$parent_ids = array_values( array_filter( $featured ) );
$featured_product_ids = array_unique( array_merge( $product_ids, $parent_ids ) );
set_transient( 'wc_featured_products', $featured_product_ids, DAY_IN_SECONDS * 30 );