woocommerce_product_related_posts_shuffle

woocommerce_product_related_posts_shuffle

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_product_related_posts_shuffle') is found 1 times:

  • /includes/wc-product-functions.php line 1148
    1144
    1145
    1146
    1147
    1148
    1149
    1150
    1151
    1152
    1153
                'excluded_ids' => $exclude_ids,
            )
        );
     
        if ( apply_filters( 'woocommerce_product_related_posts_shuffle', true ) ) {
            shuffle( $related_posts );
        }
     
        return array_slice( $related_posts, 0, $limit );
    }