mirror of
https://gh.wpcy.net/https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2026-04-29 04:59:01 +08:00
42 lines
916 B
PHP
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');
|