For developers
woohoo_loop_total_posts
woohoo_loop_total_postsapply_filters( 'woohoo_loop_total_posts', int $total_posts, WP_Query $loop, array $args );Parameter
Type
Description
add_filter( 'woohoo_loop_total_posts', function( $total_posts, $loop, $args ) {
$post_type = $loop->get( 'post_type' );
if ( ! is_array( $post_type ) || ! in_array( 'product_variation', $post_type, true ) ) {
return $total_posts;
}
$post_in = $loop->get( 'post__in' );
if ( empty( $post_in ) || $post_in === [ 0 ] ) {
return $total_posts;
}
return count( $post_in );
}, 10, 3 );woohoo_facet_term_counts
woohoo_facet_term_countsParameter
Type
Description
woohoo_filters/indexer/get_rows
woohoo_filters/indexer/get_rowsLast updated