Fix Woocommerce conflict with wc-ajax

This commit is contained in:
Champ Camba
2019-04-28 16:24:24 +08:00
parent 9a5bced26b
commit ebaed0e2d1
+1 -1
View File
@@ -659,7 +659,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
foreach ( $posts as $post ) {
//Woocommerce AJAX fixes....remove filtration on wc-ajax which goes to Front Page
if ( ! empty( $_GET['wc-ajax'] ) /*&& $query->is_front_page()*/ ) {
if ( ! empty( $_GET['wc-ajax'] ) && defined('WC_DOING_AJAX') && WC_DOING_AJAX /*&& $query->is_front_page()*/ ) {
$filtered_posts[] = $post;
continue;
}