| 开发者 | mediaticus |
|---|---|
| 更新时间 | 2025年10月30日 15:46 |
| PHP版本: | 5.7 及以上 |
| WordPress版本: | 6.8 |
| 版权: | 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.
Subaccounts for WooCommerce (free version), allows the creation of two account levels only: a main parent account (so called Manager) and one or more subaccounts tied to the parent account. With the 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.
Compatibility with the new WooCommerce High-Performance Order Storage (HPOS) feature has been introduced in version 1.2.0 of the plugin.
Compatibility with the new WooCommerce Checkout and Cart blocks has been introduced in version 1.9.0 of the plugin.
From version 1.0.8, the following shortcodes are available:
[sfwc_user_switcher]
[sfwc_manage_subaccounts]
[sfwc_add_subaccount]
[sfwc_subaccount_orders] (Available only if Sub-User mode is active)
It should work, but please note that activating the plugin on the entire network is not supported at this time. However you may want to try activating the plugin individually on all the sites you need to use it on.
[sfwc_subaccount_orders] shortcode.[sfwc_user_switcher].First Name, Last Name and Email checkout fields not populating correctly if Multi-User mode is enabled and a subaccount is logged-in.setcookie(): Passing null to parameter #2 of type string is deprecated thrown by PHP 8.1 and later versions.Call to a member function get_meta() on array in the sfwc_multi_user_change_reply_to_email_header_for_admin_notifications.sfwc_my_account_orders_order_placed_by() function, make sure that get_userdata() does not return false before retrieving the user data.Add Subaccount form, hide the "Company" field if Multi-User mode is enabled.sfwc_enqueue_frontend_style function to sfwc_enqueue_frontend_js_css.sfwc_enqueue_backend_style function to sfwc_enqueue_backend_js_css.sfwc_enqueue_color_picker and sfwc_admin_inline_js_color_picker.subaccount endpoint.Manage Subaccounts page content now available as a shortcode [sfwc_manage_subaccounts_shortcode].Subaccount Orders page content now available as a shortcode [sfwc_subaccount_orders_shortcode].[sfwc_add_subaccount_shortcode].Filter Orders form on frontend.new_order, cancelled_order, failed_order WooCommerce email notifications.sfwc_query_users_for_possible_selection_as_subaccounts() function, replace the role parameter with role__in.sfwc_is_user_role_valid().call to a member function get_user_id() on false on the WooCommerce email preview screen when WooCommerce Email Improvements option is enabled.Subaccount Orders page in the frontend.Subaccounts menu item before the Settings item in the admin area.Order Placed By to Placed By on the orders list page on frontend.sfwc_add_valid_roles hook not working properly.Plain.[woocommerce_my_account] shortcode is placed within a text block instead of a shortcode block.filter_account_type on Edit Subaccount page in frontend.Account, Contact Us and Add-ons submenu items as plugin tabs in the backend.class and a unique HTML id for each navigation tab present in the Subaccount page on frontend.Manage Subaccounts table.Edit Subaccount frontend form.Add Subaccount frontend form.sfwc_is_current_user_role_valid(), sfwc_is_user_role_valid() and sfwc_get_valid_roles().sfwc_edit_subaccount_form_tag, to allow developers to add extra attributes to the frontend Edit Subaccount form tag.sfwc_add_subaccount_form_tag, to allow developers to add extra attributes to the frontend Add Subaccount form tag.sfwc_frontend_add_subaccount_form_after_fields, to allow developers to add additional fields on frontend subaccount creation form.Choose who can create and add new subaccounts option is set to Admin Only, do not show the "Add subaccount" button in the notice that appears on the "Manage subaccounts" page when there are no subaccounts yet.Manage Subaccounts page on frontend (Subaccounts Pro and Supervisor Add-On required).First Name, Last Name and Email fields readonly on the checkout page.Customer Display Name option is set to Company + Email and the company name of the parent account is the same as the company name of the subaccount, for the subaccount show Full Name instead of Company Name.Filter Orders form on frontend for customers whose roles are not enabled in the plugin settings.Order Placed By column on the Orders page on frontend for customers whose roles are not enabled in the plugin settings.sfwc_add_valid_roles filter when adding new subaccounts on frontend.jQuery not defined if loading of JavaScript is deferred.for himself string.id to the box containing order information on the single order page on frontend.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 frontend 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 frontend.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.