operator option. Closes #3528

This commit is contained in:
Mike Jolley 2013-07-30 15:03:39 +01:00
parent f7cba5948b
commit 1b9562ca3b
1 changed files with 4 additions and 3 deletions

View File

@ -101,7 +101,8 @@ class WC_Shortcodes {
'columns' => '4',
'orderby' => 'title',
'order' => 'desc',
'category' => ''
'category' => '',
'operator' => 'IN' // Possible values are 'IN', 'NOT IN', 'AND'.
), $atts ) );
if ( ! $category ) return;
@ -126,9 +127,9 @@ class WC_Shortcodes {
'tax_query' => array(
array(
'taxonomy' => 'product_cat',
'terms' => array( esc_attr($category) ),
'terms' => array( esc_attr( $category ) ),
'field' => 'slug',
'operator' => 'IN'
'operator' => $operator
)
)
);