Back to Create User Account from WooCommerce Guest Order (micro plugin)
Table of Contents
Support
How to request technical support?
If the issue you need technical support with is not covered on this page, click the link next to the license key in the plugin settings, then fill out the ticket with your request.
Where do I report security vulnerabilities found in this plugin?
You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. Report a security vulnerability.
Licensing
How to transfer the license to another domain?
You should ask for the domain change in your customer area, next to the original order details.
After you receive our reply confirming that the license key is free, go to the old website settings, remove the key, and save. Then go to the new website settings, insert the same key, and save. If you cloned the website, the license key is in the database; you need to remove it, save, insert it again, and save again.
General operation
Getting started guide
Install the plugin and go to WooCommerce > Settings > Accounts & Privacy > Create User Account from WooCommerce Guest Order. Insert the provided license code to activate it.
Define which orders should be assigned to an existing email matching or a newly created user:
- Ask every time – Default to all orders: You’ll have the chance to decide each time you convert a guest to a user, or assign the guest order to an email matching user, but it will be set to “all orders” by default;
- Ask every time – Default to only current order: You’ll have the chance to decide each time you convert a guest to a user, or assign the guest order to an email matching user, but it will be set to “only current orders” by default;
- All orders with the same email: No interface to decide, and all additional email matching orders will be assigned;
- Only the current order: No interface to decide, and no additional orders will be assigned;
Go to WooCommerce > Settings > Emails and customize the content of the New account from guest order email, as our plugin will suppress the core New account email and send this one instead when creating a new registered customer from a guest order.
Converting a guest order user to a registered customer
Enter the order edit screen, and if it’s a guest order, there will be a button to either:
- Create a new user and assing the order to it;
- Assign to an existing user with a macthing email address;
Depending on the settings, you’ll also be able to decide if additional orders with the same email should also be assigned to that user.
Bulk converting all guest order users to registered customers with WP-CLI
If you have a lot of guest orders and want to assign them all to registered customers, you can use our WP-CLI command to do so:
wp nakedcat-convert-guests convert
This is what will happen:
- All guest orders will be queried from the database
- If an existing user with a matching email is found: the order is assigned to it
- If an existing user is not found: a new user will be created and the order assigned to it
If your store has a large number of guest orders, it’s possible that querying the database for all orders can crash the process due to insufficient server resources. In that case, you can use the --limit parameter to run it in batches, for example:
wp nakedcat-convert-guests convert --limit=1000
You can also run this in “dry run” mode, which makes no actual conversion of users, for debugging purposes:
wp nakedcat-convert-guests convert --dryrunAvailable developer hooks
The included technical support does not include the usage of these hooks.
Filter: nakedcat_guest_to_user_woo_order_statuses
Allows removing order statuses in which the interface is shown on the order edit screen, and for which additional orders are assigned to the user.
The default is an array with all WooCommerce core and registered custom statuses except wc-checkout-draft
Parameters: $statuses
Return: array
Filter: nakedcat_guest_to_user_woo_additional_order_types
Allows changing or adding order types in which the interface is shown on the order edit screen, and for which additional orders are assigned to the user.
The default is an array with shop_order, shop_refund, and shop_subscription.
Parameters: $order_type
Return: array
Filter: nakedcat_guest_to_user_woo_custom_user_meta_fields
Allows adding custom fields that should be copied over from the guest order to the newly created user. Each entry should have the key with the origin order meta key and value with the destination user meta key.
The default is an empty array.
Parameters: $fields
Return: array
Usage example:
Filter: nakedcat_guest_to_user_woo_custom_user_meta_field_{$user_meta_key}_process
Allows filtering/modifying the meta value before saving it into the newly created user.
The default is the meta value from the order, even if empty.
Parameters: $meta_value, $user_meta_key, $order_meta_key, $order
Return: string
Action: nakedcat_guest_to_user_woo_order_assigned_to_user
Fires whenever a guest order is assigned to a user, existing, or newly created.
Parameters: $order, $user_id
Action: nakedcat_guest_to_user_woo_user_created
Fires whenever a new user is created from a guest order.
Parameters: $user_id
