Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save champsupertramp/13000f491e2eefd212449db66bdf8c52 to your computer and use it in GitHub Desktop.
Save champsupertramp/13000f491e2eefd212449db66bdf8c52 to your computer and use it in GitHub Desktop.
Social Login 2.3 - Enable WeChat authentication
add_filter("um_social_login_networks","um_sso_add_wechat_network", 10, 1 );
function um_sso_add_wechat_network( $networks ){
$networks["wechat"] = array(
'name' => __( 'WeChat', 'um-social-login' ),
'button' => __( 'Sign in with WeChat', 'um-social-login' ),
'color' => '#ffffff',
'bg' => '#444444',
'bg_hover' => '#000000',
'icon' => 'um-faicon-weixin',
'opts' => array(
'wechat_client_id' => __( 'App ID', 'um-social-login' ),
'wechat_client_secret' => __( ' Secret', 'um-social-login' ),
),
'hybridauth_key' => 'WeChat',
'sync_v2' => array(
'identifier',
'displayName',
'photoURL',
'city',
'region',
'country',
'gender',
),
'has_single_callback' => true,
);
return $networks;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment