/** * Constructor for the provider. * * @param string $base_auth_path base authentication path */ public function __construct($base_auth_path) { $this->id = 'google'; $this->title = __('Google', WC_Social_Login::TEXT_DOMAIN); $this->strategy_class = 'Google'; $this->color = '#dd4b39'; $this->internal_callback = 'oauth2callback'; $this->requires_ssl = false; $this->notices = array('account_linked' => __('Your Google account is now linked to your account.', WC_Social_Login::TEXT_DOMAIN), 'account_unlinked' => __('Google account was successfully unlinked from your account.', WC_Social_Login::TEXT_DOMAIN), 'account_already_linked' => __('This Google account is already linked to another user account.', WC_Social_Login::TEXT_DOMAIN), 'account_already_exists' => __('A user account using the same email address as this Google account already exists.', WC_Social_Login::TEXT_DOMAIN)); parent::__construct($base_auth_path); }
/** * Constructor for the provider. * * @since 1.1.0 * @param string $base_auth_path base authentication path */ public function __construct($base_auth_path) { $this->id = 'instagram'; $this->title = __('Instagram', WC_Social_Login::TEXT_DOMAIN); $this->strategy_class = 'SVInstagram'; $this->color = '#517fa4'; $this->internal_callback = 'int_callback'; $this->require_ssl = false; $this->notices = array('account_linked' => __('Your Instagram account is now linked to your account.', WC_Social_Login::TEXT_DOMAIN), 'account_unlinked' => __('Instagram account was successfully unlinked from your account.', WC_Social_Login::TEXT_DOMAIN), 'account_already_linked' => __('This Instagram account is already linked to another user account.', WC_Social_Login::TEXT_DOMAIN), 'account_already_exists' => __('A user account using the same email address as this Instagram account already exists.', WC_Social_Login::TEXT_DOMAIN)); parent::__construct($base_auth_path); // normalize profile add_filter('wc_social_login_' . $this->get_id() . '_profile', array($this, 'normalize_profile')); }
/** * Constructor for the provider. * * @param string $base_auth_path base authentication path */ public function __construct($base_auth_path) { $this->id = 'amazon'; $this->title = __('Amazon', WC_Social_Login::TEXT_DOMAIN); $this->strategy_class = 'Amazon'; $this->color = '#FF9900'; $this->internal_callback = 'oauth2callback'; $this->require_ssl = true; $this->notices = array('account_linked' => __('Your Amazon account is now linked to your account.', WC_Social_Login::TEXT_DOMAIN), 'account_unlinked' => __('Amazon account was successfully unlinked from your account.', WC_Social_Login::TEXT_DOMAIN), 'account_already_linked' => __('This Amazon account is already linked to another user account.', WC_Social_Login::TEXT_DOMAIN), 'account_already_exists' => __('A user account using the same email address as this Amazon account already exists.', WC_Social_Login::TEXT_DOMAIN)); parent::__construct($base_auth_path); // Update customer's postcode from Amazon add_action('wc_social_login_' . $this->id . '_update_customer_billing_profile', array($this, 'update_customer_postcode'), 10, 2); }
/** * Override the default form fields to tweak the title for the client ID/secret * so it matches LinkedIn's UI * * @since 1.1.0 * @see WC_Social_Login_Provider::init_form_fields() */ public function init_form_fields() { parent::init_form_fields(); $this->form_fields['id']['title'] = __('API Key', WC_Social_Login::TEXT_DOMAIN); $this->form_fields['secret']['title'] = __('Secret Key', WC_Social_Login::TEXT_DOMAIN); }
/** * Override the default form fields to tweak the title for the client ID/secret * so it matches Twitter's UI * * @since 1.0 * @see WC_Social_Login_Provider::init_form_fields() */ public function init_form_fields() { parent::init_form_fields(); $this->form_fields['id']['title'] = __('Consumer Key', 'woocommerce-social-login'); $this->form_fields['secret']['title'] = __('Consumer Secret', 'woocommerce-social-login'); }
/** * Override the default form fields to: * * 1) Add the environment setting * 2) tweak the title for the client ID/secret so it matches PayPal's UI * * @since 1.1.0 * @see WC_Social_Login_Provider::init_form_fields() */ public function init_form_fields() { parent::init_form_fields(); $this->form_fields['environment'] = array('title' => __('Environment', WC_Social_Login::TEXT_DOMAIN), 'type' => 'select', 'desc_tip' => __('Select which environment to process logins under.', WC_Social_Login::TEXT_DOMAIN), 'options' => array('live' => __('Live', WC_Social_Login::TEXT_DOMAIN), 'sandbox' => __('Sandbox', WC_Social_Login::TEXT_DOMAIN)), 'default' => 'live'); $this->form_fields['id']['title'] = __('Client ID', WC_Social_Login::TEXT_DOMAIN); $this->form_fields['secret']['title'] = __('Secret', WC_Social_Login::TEXT_DOMAIN); }
/** * Override the default form fields to tweak the title for the client ID/secret * so it matches VK's UI * * @since 1.6.0 * @see WC_Social_Login_Provider::init_form_fields() */ public function init_form_fields() { parent::init_form_fields(); $this->form_fields['id']['title'] = __('Application ID', 'woocommerce-social-login'); $this->form_fields['secret']['title'] = __('Secure Key', 'woocommerce-social-login'); }