Automattic\WooCommerce\Internal\CLI\Migrator\Platforms\Webflow
WebflowClient::get_credentials
Validate that credentials are present.
Метод класса: WebflowClient{}
Хуков нет.
Возвращает
array|\WP_Error. Array with 'site_id' and 'access_token' keys, or WP_Error on failure.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_credentials();
Код WebflowClient::get_credentials() WebflowClient::get credentials WC 11.2.2
private function get_credentials() {
if ( empty( $this->credentials['site_id'] ) || empty( $this->credentials['access_token'] ) ) {
return new \WP_Error(
'api_error',
'Webflow API credentials (site_id, access_token) are not configured. Please run: wp wc migrate setup --platform=webflow'
);
}
return array(
'site_id' => (string) $this->credentials['site_id'],
'access_token' => (string) $this->credentials['access_token'],
);
}