Update class-wc-shortcodes.php
adding $loop_name to woocommerce_shortcode_products_query filter.. so that we have a way to add a filter to a specific shortcode that uses product_loop.
This commit is contained in:
parent
c7e104115f
commit
f8dd887001
|
@ -84,7 +84,7 @@ class WC_Shortcodes {
|
||||||
private static function product_loop( $query_args, $atts, $loop_name ) {
|
private static function product_loop( $query_args, $atts, $loop_name ) {
|
||||||
global $woocommerce_loop;
|
global $woocommerce_loop;
|
||||||
|
|
||||||
$products = new WP_Query( apply_filters( 'woocommerce_shortcode_products_query', $query_args, $atts ) );
|
$products = new WP_Query( apply_filters( 'woocommerce_shortcode_products_query', $query_args, $atts, $loop_name ) );
|
||||||
$columns = absint( $atts['columns'] );
|
$columns = absint( $atts['columns'] );
|
||||||
$woocommerce_loop['columns'] = $columns;
|
$woocommerce_loop['columns'] = $columns;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue