• Resolved needle hoffenheimer

    (@needle-hoffenheimer)


    How might one go about setting the Stripe API keys on a per-environment basis? Every time I push my database changes from dev to live, my Stripe API keys get overwritten. I need a way to set the keys at the environment level, something like this in wp-config.php:

    define(‘STRIPE_PUBLISHABLE_KEY’, env(‘my_stripe_publishable_key_here’));
    define(‘STRIPE_SECRET_KEY’, env(‘my_stripe_secret_key_here’));

    Does this make sense? Will the Stripe Gateway plugin recognize my keys if I define them in this way instead of in the plugin admin?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thomas Shellberg

    (@shellbeezy)

    Automattic Happiness Engineer

    Hi there,

    This isn’t possible without a customization to the plugin – perhaps you could just exclude certain tables when pushing your database changes(exclude wp_options for instance)?

    Plugin Support melinda a11n

    (@melindahelt)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Different API keys per environment’ is closed to new replies.