diff --git a/tests/wploadersuite/AjaxTest.php b/tests/wploadersuite/AjaxTest.php index fbce1d04f..ff61a149e 100644 --- a/tests/wploadersuite/AjaxTest.php +++ b/tests/wploadersuite/AjaxTest.php @@ -26,11 +26,15 @@ public function testAjaxCallbackWillFailIfNumberNotOnlyOnceIsInvalid(): void { $response = null; try { + global $wpdb; + $wpdb->suppress_errors = true; // Due to a WooCommerce activation issue in older versions. $this->_handleAjax('test_ajax_action'); } catch (\WPAjaxDieContinueException $exception) { $response = json_decode($this->_last_response); } + $wpdb->suppress_errors = false; + $this->assertNotNull($response); $this->assertFalse($response->success); $this->assertEquals('Number not only once is invalid', $response->data);