wordpress-sparkpost icon indicating copy to clipboard operation
wordpress-sparkpost copied to clipboard

Support multisite

Open rajumsys opened this issue 8 years ago • 5 comments
trafficstars

  • Each site can have their own configuration.

rajumsys avatar Feb 09 '17 02:02 rajumsys

I think activating the plugin and setting up an API for the entire network is better than inserting an API for each site on the network.

Or is it possible to have both configurations?

bobwol avatar May 02 '17 22:05 bobwol

I'd like the option to be able to set the API key up by adding a line in the wp-config.php or something similar so this can be used with multisite.

landbryo avatar May 24 '17 18:05 landbryo

Any updates on this?

johnlund avatar Jan 31 '18 00:01 johnlund

+1

wp-networks avatar Apr 02 '18 11:04 wp-networks

Hey, I found a way to handle that:

  1. Add in wp-config.php (WordPress config file):

define('SPARKPOST_ENABLE',true); define('SPARKPOST_API_KEY','yourapikey'); // change yourapikey to your Sparkpost API Key define('SPARKPOST_FROM_NAME','Your Name'); // change YourName to your From Name define('SPARKPOST_FROM_EMAIL','[email protected]'); // change [email protected] to your From Email

  1. in sparkpost.class.php (plugin file based on v3.2.0), update the method to: protected static $settings_default = array( 'port' => 587, 'sending_method' => 'api', 'password' => SPARKPOST_API_KEY, 'from_name' => SPARKPOST_FROM_NAME, 'from_email' => SPARKPOST_FROM_EMAIL, 'enable_sparkpost' => SPARKPOST_ENABLE, 'enable_tracking' => true, 'template' => '', 'transactional' => false, 'log_emails' => false, 'location' => 'us' );

Caveats:

  • If you update the plugin, you will lost the changes on sparkpost.class.php, and have to do the step 2 again.

What do you think?

bobwol avatar May 28 '18 20:05 bobwol