Skip to content

Commit

Permalink
Disable PHP notices in WP CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdharmesh committed Nov 22, 2024
1 parent 638123e commit 227db8a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/qit-e2e/bootstrap/mu-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
* Plugin name: WooCommerce PayPal Payments E2E Test plugin
*/

// Disable WP CLI notices
if ( ! isset( $_SERVER['HTTP_HOST'] ) ) {
error_reporting(
E_ALL
& ~E_PARSE
& ~E_NOTICE
& ~E_USER_NOTICE
& ~E_STRICT
& ~E_DEPRECATED
& ~E_USER_DEPRECATED
);
}

add_filter( 'woocommerce_order_number', 'wc_paypal_payments_woocommerce_order_number' );

/**
Expand Down

0 comments on commit 227db8a

Please sign in to comment.