开发者 | mediaticus |
---|---|
更新时间 | 2024年11月22日 08:37 |
PHP版本: | 5.7 及以上 |
WordPress版本: | 6.7 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
A subaccount (or sub-account) is a secondary account that sits under a main parent account.
A Manager is a parent account.
Subaccounts for WooCommerce (free version) gives you the possibility to create up to 10 subaccounts for each Manager (parent account). With Subaccounts Pro (premium version) each Manager can have an unlimited number of subaccounts.
Both parent accounts and subaccounts can place orders. Parent accounts can also place orders on behalf of subaccounts, while a subaccount can place orders only for itself.
Only the creation of two account levels is allowed: a main parent account (so called Manager) and one or more subaccounts tied to the parent account. With Supervisor Add-On it is possible to set a parent account (Supervisor) above a Manager account type, thus allowing you (as an administrator) to create a three-level structure of nested accounts.
This option, along with many others, is only available in Subaccounts Pro, the premium version of the plugin.
We have done our best to ensure the highest level of compatibility between the two modes. Despite this, switching from one mode to the other after some orders have already been placed may result in some data being inaccurate. For this reason we strongly recommend that you choose the mode that best suits your needs and stick with it.
WordPress Multisite installations are not officially supported for now.
sfwc_query_users_for_possible_selection_as_subaccounts()
resulting in the User Switcher not loading subaccounts.sfwc_add_valid_roles
, to allow developers to declare additional user roles as valid (SFWC_VALID_ROLE_LOOSE_MODE
constant has to be defined and set to true
in wp-config.php file).sfwc_get_valid_roles
to determine which roles are valid.sfwc_frontend_edit_subaccount_after_account_details_fields
, to allow developers to add extra fields in the Account Details
tab on the frontend Edit Subaccount
page.sfwc_frontend_after_edit_subaccount_validation
, to allow developers to save extra data when editing a subaccount on frontend.Error 404
on front-end subaccounts
endpoint.Manage Subaccounts
tab not loading content in some cases.Select the buyer role(s) to enable the subaccount system for
.readme.txt
file.SFWC_REQUIRES_PERMALINK_UPDATE
PHP constant and related code.Order Approval Add-On
release.blueprint.json
to enable Live Preview
button.Requires Plugins
header.Edit order
button among those that can be shown in case Order Approval Add-On
is active.Order Approval Add-On
release.sfwc_frontend_edit_subaccount_accordion
, to allow developers to add additional accordion tabs on the Edit subaccount
page on front end.sfwc_order_placed_by_update_order_meta_after_payment
, to prevent a race condition in case Order Approval Add-On
is active.Multi-User
feature officially released (no longer in beta stage).Filter Orders
front-end form while navigating through order list pages when Multi-User mode is enabled.On behalf of
value in the Order placed by
column on front-end order list page when an order is placed by a Supervisor on behalf of a Manager or Subaccount with Multi-User mode enabled._sfwc_order_placed_by_user_id
order meta value (prior to version 1.4.3).Edit Subaccount
page in front end.Filter Orders / Select Subaccount Orders
form in frontend.Show subaccounts information on WooCommerce order page
and Show subaccounts information on WooCommerce orders list page
._sfwc_order_placed_during_subaccount_mode
order meta value on order creation.sfwc_order_placed_during_subaccount_mode
to determine if an order was placed while the plugin was in Sub-User or Multi-User mode (by passing $order_id).$parent_user_id
in sfwc_frontend_after_add_subaccount_validation
hook.sfwc_frontend_add_subaccount_form_before_fields
, to allow developers to add additional fields on front-end subaccount creation form._sfwc_order_placed_by_user_id
order meta value, to provide better compatibility in case of switch from Sub-User to Multi-User mode and vice versa.Order placed by
displaying incorrect information on front-end orders list page when the Manager places an order with Multi-User mode enabled.Order placed by
displaying incorrect information on front-end order pages when the Manager places an order with Multi-User mode enabled.Subaccount Info
meta box appear on back-end order pages when HPOS is enabled.Order
column on Subaccount Orders
page.Pro
text next to the plugin title on the settings page in case the premium version of the plugin is active.selected_subaccount_orders_sanitized
on Orders page in frontend when Multi-User mode is enabled.current_user
on Edit Subaccount page in frontend.sfwc_frontend_after_add_subaccount_validation
, to allow developers to save extra data on frontend subaccount creation.Manage Subaccounts
page.save()
method in function sfwc_store_subaccounts_meta_data_on_order_creation
.Options
tab before Appearance
tab on plugin settings page.sfwc_is_current_user_role_valid
to determine if current user role is eligible for the subaccount system.sfwc_is_current_user_role_enabled
to determine if current user role is enabled from plugin settings.sfwc_is_user_role_valid
to determine if user role is eligible for the subaccount system (by passing user ID).sfwc_is_user_role_enabled
to determine if user role is enabled from plugin settings (by passing user ID).Account
column in Subaccount Orders page in front end.Account
, Account type
and Order placed by
information also in front-end order pages.Customer Display Name
setting in "Order placed by" column in front end.woocommerce_my_account_my_orders_columns
with woocommerce_account_orders_columns
.sfwc_register_subaccounts_endpoint
to prevent endpoint returning Not Found Error
.Account
submenu item to show license activation status (Subaccounts Pro
must be installed for the submenu item to appear).session expired
notice appears in front end also if the parent account has switched to a subaccount.<ul>
tag from appearing twice in DOM on Subaccount Orders page in front end.wp_button_class
on Subaccount Orders page in frontend after form is submitted.sfwc_insert_subaccounts_endpoint_content
.Options
page in back end.sfwc_add_subaccounts_query_vars
.sfwc_register_subaccounts_endpoint
.already_children_existing
on Add Subaccount page in front end.sfwc_option_display_name
on Subaccount Orders page in front end.Not Found Error
in some cases.SFWC_CURRENT_VERSION
and SFWC_REQUIRES_PERMALINK_UPDATE
.wp_options
table.