Linux 软件免费装

GoodID WP Connect

开发者 idandtrust
更新时间 2019年5月7日 23:48
PHP版本: 5.6 及以上
WordPress版本: 5.2
版权: MIT License
版权网址: 版权信息

标签

connect login woocommerce comment register social login goodid event pass

下载

详情介绍:

Using the GoodID service allows your website visitors and customers to log in or register without the need to fill registration forms and remember usernames and passwords. Additionally for GoodID users you can easily provide digital event passes into their GoodID Wallet that you can use for your events. Any user data that is required by WordPress or WooCommerce is supported by GoodID.

安装:

Plugin pre-requisite To enable the GoodID WP Connect plugin you must sign up to become a Client on GoodID. To signing up please contact us in email support@goodid.net . Required settings Once you become a GoodID Client you receive your identifier ( client_id ) and secret (client_secret). Into the GoodID menu on the administrator interface you need to set these along with the data (claims) that you need from a user for registration and even the mapping rules between the received data and Wordpress and Woocommerce. Additionally you need to set whether you want the GoodID plugin to register new user into wp_users table or your want to store users data only in session. Display GoodID button My account, Checkout and Login pages On the admin interface in the GoodID menu you can set whether you want to display GoodID button on these pages and even set if you want to automatically hide the type of default login or not. In these cases we always display GoodID login button in default size and we always using the default claim set. Shortcode You can add an extra Sign in with GoodID button to any place on your website with this shortcode: [goodid_login_button]. The button will only be visible if the user is not logged in already. When you want to display GoodID login button by using short code you have some additional options to set. These are: Event settings To enable the digital pass functionality on your site please set the Event ticket template ID in GoodID menu on administrator interface. You can receive one from us on support@goodid.net After that you are able to enable or disable event pass functionality and set event data to specific product on product setting page. What kind of data can I request from the user with GoodID and how? In the GoodID tab of your WordPress admin interface you have two settings, that define the requested data and its storage. The Claims setting defines what data do you ask. Please always include "email": {"essential": true}, "email_verified": {"value": true} as requesting a verified e-mail address is necessary for the wordpress plugin. The value of the essential parameter defines whether filling the claim is required or optional. The following is a short example: { "id_token": {}, "userinfo": { "email": { "essential": true }, "email_verified": { "value": true }, "family_name": { "essential": false }, "middle_name": { "essential": false }, "given_name": { "essential": false }, "billto.company_name": { "essential": false } } } A default claimset is included in the plugin as default-claims.json. The list of all supported claims can be found here: http://goodid.s3.amazonaws.com/manual/3.+GoodID+Scopes+and+claims.pdf The Mapping setting defines the mapping between the requested claims and the WordPress or WooCommerce fields. The user_email field must not be mapped in the mapping, because it is automatically handled by the plugin. This is a short example: { "wordpress": { "first_name": [ "concatenate", "middle_name", "given_name" ], "last_name": "family_name" }, "woocommerce": { "billing_company_name": "billto.company_name" } } The mapping is divided into groups for clarity. If you have any other plugin which handles custom data about the user, you can also map that data from GoodID in a new group. You can name a group anything. A single mapping item uses one of the following formats: ` 1. "wordpress_field_name": "goodid_claim_name" "wordpress_field_name": [ "concatenate", "goodid_claim_name1", "goodid_claim_name2", ... ] "shipping_state": [ "get_wc_region", "address.country_code_iso_2", "address.region" ] "billing_state": [ "get_wc_region", "billto.address.country_code_iso_2", "billto.address.region" ] ` The first version is the easiest, it means mapping a single GoodID claim to a single WordPress (or any plugin) field. With more mapping items, you can map a single GoodID claim to any number of WordPress fields, but a WordPress field must have only one mapping. If a GoodID claim is optional and not filled by the user, mappings which refer to it have no effect. The second version maps the concatenation of any number of GoodID claims to a WordPress field. The claims that are filled by the user are separated by a space. If no claim is filled by the user, then the mapping has no effect. The 3rd and 4th version describes a mapping between GoodID address data and WooCommerce state. The special syntax is needed because WooCommerce uses a special state code which we have to calculate from a country code and a region. A default mapping is included in the plugin as default-mapping.json.

常见问题:

How to get data of session stored users?

$goodidUser = new GoodID_WP_User(new GoodID_WP_Settings()); $claims = $goodidUser->getClaims(); $mappedBillingFirstName = $goodidUser->getDataByMapping(null, 'billing_first_name');

How to "logging out" a session stored user?

$goodidUser = new GoodID_WP_User(new GoodID_WP_Settings()); $goodidUser->logout();

How to know who has downloaded the event pass?

` $goodidPassData = new GoodID_WP_Pass_Data(new GoodID_WP_Settings()); $entitledUsers = $goodidPassData->get(11); if ($entitledUsers) { foreach ($entitledUsers->get() as $entitledUser) { if ($entitledUser->hasDownloaded()) { // Downloaded the pass } } } `

How to know who visited the event?

` $goodidPassData = new GoodID_WP_Pass_Data(new GoodID_WP_Settings()); $entitledUsers = $goodidPassData->get(11); if ($entitledUsers) { foreach ($entitledUsers->get() as $entitledUser) { if ($entitledUser->hasUsed()) { // The user visited the event } } } `

How to set the event data automatically?

$goodidProductSettingHelper = new GoodID_WP_ProductSettingHelper(new GoodID_WP_Settings()); $goodidProductSettingHelper->saveEventSettings(...);

How to update who is entitled for a specific pass?

// if the user is not registered $entitledGoodidGuest->reAssign('John Doe', 'john.doe@example.com'); // or if the user is registered $entitledGoodidUser->reAssign($newUserId);

Want to know more?

If you want to know more, please visit https://goodid.net

更新日志:

3.2.2 View changes for admin settings 3.2.1 Tested up to Wordpress 5.2 3.2.0 Strip image generation for event tickets 3.1.3 Change url of GoodID QPass Reader mobile app 3.1.2 Increase QR margin 3.1.1 Fix missing vendor contents 3.1.0 Optimized event ticket validation process 3.0.12 Fix to send pass create if the sub is different 3.0.11 Only assign pass to sub after email sent 3.0.9 Do not send ticket to someone who is not the same as the entitled user 3.0.8 Small fixes about validation 3.0.7 Adding new helper functions 3.0.6 Do not display GoodID button in some cases 3.0.5 Add new option to pass email template + base64 encode the params of congrats page 3.0.4 Small JS fix on admin product setting tab 3.0.3 Fix to unhide login button when that was generated by shortcode 3.0.2 Fix missed files 3.0.1 Fix readme.txt and refresh GoodID PHP SDK to 2.5.1 3.0.0 Fully restructuring Adding event pass functionality