admin_options = $options; $this->option_name = $this->admin_options->get_option_name(); } public static function init(Affinidi_Login_Admin_Options $options) { $admin_settings = new self($options); // add_action adds a callback function to an action hook. // admin_init fires as an admin screen or script is being initialized. add_action('admin_init', [$admin_settings, 'admin_init']); // admin_menu fires before the administration menu loads in the admin. // This action is used to add extra submenus and menu options to the admin panel’s menu structure. It runs after the basic admin panel menu structure is in place. add_action('admin_menu', [$admin_settings, 'add_page']); } public function get_admin_settings() { return $this->admin_settings_fields; } /** * [admin_init description] * * @return [type] [description] */ public function admin_init() { // A callback function that sanitizes the option's value register_setting('affinidi_options', $this->option_name, [$this, 'validate']); } /** * Add affinidi submenu page to the settings main menu */ public function add_page() { add_options_page('Affinidi Login', 'Affinidi Login', 'manage_options', 'affinidi_settings', [$this, 'options_do_page']); } /** * [options_do_page description] * * @return [type] [description] */ public function options_do_page() { ?>
This plugin is meant to be used with Affinidi Login and uses PKCE extension of OAuth 2.0 standard.
NOTE: If you want to add a
custom link anywhere in your theme, simply link to
or use the shortcode [affinidi_login]
if the user is not logged in.
Redirect URIs:
Auth method: None
Modify the Presentation Definition and ID Token Mapping using this template.
If you have activated a supported E-Commerce plugin on this WordPress site, use the template for E-Commerce.
| Sync customer profile from Vault |
Select whether to sync the user profile from Vault whenever the user logs in to their WooCommerce account or only sync their profile on sign-up. Sign-up will populate the customer billing and shipping address info. Remember to modify the Presentation Definition and ID Token Mapping using the E-Commerce template to request the user profile from Affinidi Vault. |
|---|---|
| Display Affinidi Login button |
If you choose "Use shortcode to display the button", use the shortcode |
| Affinidi Login button header (Login Form) |
admin_options->affinidi_login_loginform_header;
echo esc_attr($text_value);
?>"/>
Displays at the top of the Affinidi Login button in the Login Form of WooCommerce. |
| Affinidi Login button header (Registration Form) |
admin_options->affinidi_login_regform_header;
echo esc_attr($text_value);
?>"/>
Displays at the top of the Affinidi Login button in the Registration Form of WooCommerce. |
There's no active supported e-commerce plugin configured on this WordPress site. E-Commerce Settings is disabled. To learn more about the supported e-commerce plugins, click here.