woocommerce-paypal-payments/tests/qa/resources/e2e-snippets/e2e-snippets.php
Miguel Pérez Pellicer c416d71011
wp env support for e2e
2025-10-06 16:50:32 +03:00

42 lines
916 B
PHP

<?php
/**
* Plugin Name: E2E Snippets
*
* Description: Snippets used in E2E tests.
*/
/**
* Disable the "Disable Welcome Messages" in the Gutenberg Editor.
*/
add_filter(
'block_editor_settings_all',
function (array $settings): array {
$settings['welcomeGuide'] = false;
return $settings;
}
);
/**
* Disable WooCommerce Setup Wizard
*/
delete_transient('_wc_activation_redirect');
add_filter('woocommerce_enable_setup_wizard', '__return_false');
/**
* Disable webhook verification
*/
const PAYPAL_WEBHOOK_REQUEST_VERIFICATION = false;
if ( ! defined( 'PAYPAL_WEBHOOK_REQUEST_VERIFICATION' ) ) {
define( 'PAYPAL_WEBHOOK_REQUEST_VERIFICATION', false );
}
/**
* Disable nonce check
*/
add_filter( 'woocommerce_store_api_disable_nonce_check', '__return_true' );
/**
* Enable New PCP UI
*/
add_filter('woocommerce.feature-flags.woocommerce_paypal_payments.settings_enabled', '__return_true');