WC_Admin_Addons::output_storefront_button()
Метод класса: WC_Admin_Addons{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WC_Admin_Addons = new WC_Admin_Addons(); $WC_Admin_Addons->;
Код WC_Admin_Addons::output_storefront_button() WC Admin Addons::output storefront button WC 9.5.1
/** * Make wp_safe_remote_get request to WooCommerce.com endpoint. * Optionally pass user auth token, locale or country. * * @param string $url URL to request. * @param ?array $options Options for the request. For example, to pass auth token, locale and country, * pass array( 'auth' => true, 'locale' => true, 'country' => true, ). * * @return array|WP_Error */ public static function fetch( $url, $options = array() ) { $headers = array(); if ( isset( $options['auth'] ) && $options['auth'] ) { $auth = WC_Helper_Options::get( 'auth' ); if ( isset( $auth['access_token'] ) && ! empty( $auth['access_token'] ) ) { $headers['Authorization'] = 'Bearer ' . $auth['access_token']; } } $parameters = array(); if ( isset( $options['locale'] ) && $options['locale'] ) { $parameters['locale'] = get_user_locale(); } if ( isset( $options['country'] ) && $options['country'] ) { $country = WC()->countries->get_base_country(); if ( ! empty( $country ) ) { $parameters['country'] = $country;