ref(env) créé des variables d'environnement pour la clé REST WooCommerce
This commit is contained in:
parent
a079550cff
commit
452b2f5238
2 changed files with 5 additions and 2 deletions
|
|
@ -15,8 +15,10 @@ Config::define("WP_DEBUG_LOG", env("WP_DEBUG_LOG") ?? true);
|
||||||
Config::define("WP_DISABLE_FATAL_ERROR_HANDLER", true);
|
Config::define("WP_DISABLE_FATAL_ERROR_HANDLER", true);
|
||||||
Config::define("SCRIPT_DEBUG", true);
|
Config::define("SCRIPT_DEBUG", true);
|
||||||
Config::define("DISALLOW_INDEXING", true);
|
Config::define("DISALLOW_INDEXING", true);
|
||||||
|
|
||||||
ini_set("display_errors", "1");
|
ini_set("display_errors", "1");
|
||||||
|
|
||||||
|
Config::define("WOOCOMMERCE_API_CONSUMER_KEY", env("WOOCOMMERCE_API_CONSUMER_KEY"));
|
||||||
|
Config::define("WOOCOMMERCE_API_CONSUMER_SECRET", env("WOOCOMMERCE_API_CONSUMER_SECRET"));
|
||||||
|
|
||||||
// Enable plugin and theme updates and installation from the admin
|
// Enable plugin and theme updates and installation from the admin
|
||||||
Config::define("DISALLOW_FILE_MODS", false);
|
Config::define("DISALLOW_FILE_MODS", false);
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace HaikuAtelier;
|
namespace HaikuAtelier;
|
||||||
|
|
||||||
|
use Roots\WPConfig\Config;
|
||||||
use Timber\Site;
|
use Timber\Site;
|
||||||
use Timber\URLHelper;
|
use Timber\URLHelper;
|
||||||
use function Crell\fp\pipe;
|
use function Crell\fp\pipe;
|
||||||
|
|
@ -129,7 +130,7 @@ class StarterSite extends Site {
|
||||||
$context["nonce_wc"] = $nonce_wc;
|
$context["nonce_wc"] = $nonce_wc;
|
||||||
// TODO: Utiliser des variables d'environnement
|
// TODO: Utiliser des variables d'environnement
|
||||||
$auth_string = base64_encode(
|
$auth_string = base64_encode(
|
||||||
"ck_19abf67ffb8f254f928dd5c040de0256c2db274c:cs_6216be63a25dd7fc74a7bfaf56489fc449e359cf",
|
Config::get("WOOCOMMERCE_API_CONSUMER_KEY") . ":" . Config::get("WOOCOMMERCE_API_CONSUMER_SECRET"),
|
||||||
);
|
);
|
||||||
$context["auth_string"] = $auth_string;
|
$context["auth_string"] = $auth_string;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue