Skip to content

Commit 3ab8e70

Browse files
committed
Fix test
1 parent b4b9552 commit 3ab8e70

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/php/features/WooCommerce/TestWooCommerceOrdersAutosuggest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ public function test_order_with_password_is_synced() {
454454
add_filter( 'ep_woocommerce_orders_autosuggest_available', '__return_true' );
455455

456456
/**
457-
* Enable the orders autosuggest feature
457+
* Enable the orders autosuggest feature.
458458
*/
459459
$filter = function () {
460460
return [
@@ -464,6 +464,7 @@ public function test_order_with_password_is_synced() {
464464
];
465465
};
466466
add_filter( 'pre_site_option_ep_feature_settings', $filter );
467+
add_filter( 'pre_option_ep_feature_settings', $filter );
467468

468469
$this->orders_autosuggest->setup();
469470

@@ -478,5 +479,9 @@ public function test_order_with_password_is_synced() {
478479

479480
$order = ElasticPress\Indexables::factory()->get( 'post' )->get( $order_id );
480481
$this->assertNotEmpty( $order );
482+
483+
remove_filter( 'ep_woocommerce_orders_autosuggest_available', '__return_true' );
484+
remove_filter( 'pre_option_ep_feature_settings', $filter );
485+
remove_filter( 'pre_site_option_ep_feature_settings', $filter );
481486
}
482487
}

0 commit comments

Comments
 (0)