Files
wp-graphql-woocommerce/tests/_data/config.php
T
Dovid LevineandGitHub e96236696f chore: bump deps to meet actual requirements and lint for WPCS 3.0 (#816)
* chore: bump min versions to actual and update deps

* chore: fix multiple empty lines at EOF

* chore: preincrement when standalone (phpcs)

* fix: use `printf` instead of `echo sprintf` [phpcs]

* chore: avoid lonely `if()` in `else{}` [phpcs]

* chore: avoid reserved keywords as param names [phpcs]

* chore: remove unused callback params [phpcs]

* chore: remove more unused callback params [phpcs]

* chore: apply lints to tests

* chore: update ruleset for PHPCS 3.0

* texts: restore $last_request_headers
2023-11-30 08:41:32 -05:00

46 lines
1.5 KiB
PHP

<?php
/**
* Disable autoloading while running tests, as the test
* suite already bootstraps the autoloader and creates
* fatal errors when the autoloader is loaded twice
*/
if ( ! defined( 'GRAPHQL_DEBUG' ) ) {
define( 'GRAPHQL_DEBUG', true );
}
if ( ! defined( 'WPGRAPHQL_WOOCOMMERCE_AUTOLOAD' ) && false !== getenv( 'WPGRAPHQL_WOOCOMMERCE_AUTOLOAD' ) ) {
define( 'WPGRAPHQL_WOOCOMMERCE_AUTOLOAD', true );
}
if ( ! defined( 'WPGRAPHQL_WOOCOMMERCE_ENABLE_AUTH_URLS' ) ) {
define( 'WPGRAPHQL_WOOCOMMERCE_ENABLE_AUTH_URLS', true );
}
if ( ! defined( 'CART_URL_NONCE_PARAM' ) ) {
define( 'CART_URL_NONCE_PARAM', '_wc_cart' );
}
if ( ! defined( 'CHECKOUT_URL_NONCE_PARAM' ) ) {
define( 'CHECKOUT_URL_NONCE_PARAM', '_wc_checkout' );
}
if ( ! defined( 'ACCOUNT_URL_NONCE_PARAM' ) ) {
define( 'ACCOUNT_URL_NONCE_PARAM', '_wc_account' );
}
if ( ! defined( 'ADD_PAYMENT_METHOD_URL_NONCE_PARAM' ) ) {
define( 'ADD_PAYMENT_METHOD_URL_NONCE_PARAM', '_wc_payment' );
}
if ( ! defined( 'GRAPHQL_JWT_AUTH_SECRET_KEY' ) ) {
define( 'GRAPHQL_JWT_AUTH_SECRET_KEY', 'testingtesting123' );
}
if ( ! defined( 'HPOS' ) && ! empty( getenv( 'HPOS' ) ) ) {
define( 'HPOS', true );
}
if ( ! defined( 'STRIPE_API_PUBLISHABLE_KEY' ) && false !== getenv( 'STRIPE_API_PUBLISHABLE_KEY' ) ) {
define( 'STRIPE_API_PUBLISHABLE_KEY', getenv( 'STRIPE_API_PUBLISHABLE_KEY' ) );
}
if ( ! defined( 'STRIPE_API_SECRET_KEY' ) && false !== getenv( 'STRIPE_API_SECRET_KEY' ) ) {
define( 'STRIPE_API_SECRET_KEY', getenv( 'STRIPE_API_SECRET_KEY' ) );
}