2019-04-06 17:42:16 -04:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* Disable autoloading while running tests, as the test
|
|
|
|
|
* suite already bootstraps the autoloader and creates
|
|
|
|
|
* fatal errors when the autoloader is loaded twice
|
|
|
|
|
*/
|
2026-03-17 23:49:48 -04:00
|
|
|
|
2026-03-30 21:42:00 -04:00
|
|
|
|
|
|
|
|
if ( ! defined( 'GRAPHQL_TESTING' ) ) {
|
|
|
|
|
define( 'GRAPHQL_TESTING', true );
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-08 16:35:03 -04:00
|
|
|
if ( ! defined( 'GRAPHQL_DEBUG' ) ) {
|
2022-02-04 15:00:44 -05:00
|
|
|
define( 'GRAPHQL_DEBUG', true );
|
2020-04-08 16:35:03 -04:00
|
|
|
}
|
|
|
|
|
|
2020-04-16 14:56:52 -04:00
|
|
|
if ( ! defined( 'WPGRAPHQL_WOOCOMMERCE_AUTOLOAD' ) && false !== getenv( 'WPGRAPHQL_WOOCOMMERCE_AUTOLOAD' ) ) {
|
2022-02-04 15:00:44 -05:00
|
|
|
define( 'WPGRAPHQL_WOOCOMMERCE_AUTOLOAD', true );
|
2020-04-08 16:35:03 -04:00
|
|
|
}
|
|
|
|
|
|
2023-05-22 13:43:10 -04:00
|
|
|
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' );
|
|
|
|
|
}
|
2023-07-03 03:34:58 -04:00
|
|
|
if ( ! defined( 'ACCOUNT_URL_NONCE_PARAM' ) ) {
|
|
|
|
|
define( 'ACCOUNT_URL_NONCE_PARAM', '_wc_account' );
|
|
|
|
|
}
|
2023-05-22 13:43:10 -04:00
|
|
|
if ( ! defined( 'ADD_PAYMENT_METHOD_URL_NONCE_PARAM' ) ) {
|
|
|
|
|
define( 'ADD_PAYMENT_METHOD_URL_NONCE_PARAM', '_wc_payment' );
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-08 16:35:03 -04:00
|
|
|
if ( ! defined( 'GRAPHQL_JWT_AUTH_SECRET_KEY' ) ) {
|
2026-03-17 23:49:48 -04:00
|
|
|
define( 'GRAPHQL_JWT_AUTH_SECRET_KEY', 'testingtesting123testingtesting123' );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( ! defined( 'GRAPHQL_WOOCOMMERCE_SECRET_KEY' ) ) {
|
|
|
|
|
define( 'GRAPHQL_WOOCOMMERCE_SECRET_KEY', 'testestestestestestestestestest!!' );
|
2020-04-08 16:35:03 -04:00
|
|
|
}
|
|
|
|
|
|
2023-06-21 13:21:29 -04:00
|
|
|
if ( ! defined( 'HPOS' ) && ! empty( getenv( 'HPOS' ) ) ) {
|
|
|
|
|
define( 'HPOS', true );
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-16 14:56:52 -04:00
|
|
|
if ( ! defined( 'STRIPE_API_PUBLISHABLE_KEY' ) && false !== getenv( 'STRIPE_API_PUBLISHABLE_KEY' ) ) {
|
2022-02-04 15:00:44 -05:00
|
|
|
define( 'STRIPE_API_PUBLISHABLE_KEY', getenv( 'STRIPE_API_PUBLISHABLE_KEY' ) );
|
2020-04-08 16:35:03 -04:00
|
|
|
}
|
|
|
|
|
|
2020-04-16 14:56:52 -04:00
|
|
|
if ( ! defined( 'STRIPE_API_SECRET_KEY' ) && false !== getenv( 'STRIPE_API_SECRET_KEY' ) ) {
|
2022-02-04 15:00:44 -05:00
|
|
|
define( 'STRIPE_API_SECRET_KEY', getenv( 'STRIPE_API_SECRET_KEY' ) );
|
2026-03-17 23:49:48 -04:00
|
|
|
}
|