Automattic\WooCommerce\Internal\CLI\Migrator\Core
CredentialManager::save_credentials
Saves credentials to the database for a given platform.
Method of the class: CredentialManager{}
No Hooks.
Returns
null. Nothing (null).
Usage
$CredentialManager = new CredentialManager(); $CredentialManager->save_credentials( $platform_slug, $credentials ): void;
- $platform_slug(string) (required)
- The slug for the platform.
- $credentials(array) (required)
- An associative array of credentials.
CredentialManager::save_credentials() CredentialManager::save credentials code WC 10.7.0
public function save_credentials( string $platform_slug, array $credentials ): void {
$option_name = "wc_migrator_credentials_{$platform_slug}";
update_option( $option_name, wp_json_encode( $credentials ) );
}