diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index d0dc5389009..ee6d4fb318b 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -1809,6 +1809,10 @@ class WC_AJAX { continue; } + if ( ! $product || ( $product->is_type( 'variation' ) && empty( $product->parent ) ) ) { + continue; + } + $found_products[ $post ] = rawurldecode( $product->get_formatted_name() ); } }