Before you begin
↑ Back to topBefore using this product, please ensure you review and accept our terms and conditions and privacy policy.
Installation and updates
↑ Back to topBefore using this product on a production website you should thoroughly test it on a staging/development environment, including all aspects of your website and potential data volumes, even if not directly related to the functionality the product provides.
The same process should also be completed when updating any aspect of your website in future, such as performing installations/updates, making changes to any configuration, custom web development, etc.
Always refer to the changelog before updating.
Installation
↑ Back to topPlease see this documentation.
Updates
↑ Back to topPlease see this documentation.
Quick start guide
↑ Back to top- Perform the installation steps above
- Go to WooCommerce > Order Tags from your dashboard
- Create an order tag
- Click into the order tag you created
- Populate colors and any specific rules required which assign the order tag
- Save changes, this order tag will now be assigned to any future matching orders
- You can also apply the order tag manually when adding/editing an order
Dashboard
↑ Back to topIntroduction
↑ Back to topTo access the dashboard go to WooCommerce > Order Tags.
Add order tag
↑ Back to topTo add an order tag from the dashboard, simply populate the settings on the left and click the add new order tag button.
- Name
- Name of the order tag which will be displayed.
- Parent order tag
- Allows you to define the order tag as a child of another order tag, this is used for managing order tags hierarchically in the dashboard, for further details see the hierarchy section in this documentation.
- Description
- The description entered will be displayed upon hovering over the order tag on an order.
Edit order tag
↑ Back to topOnce you have created an order tag, it will appear in the dashboard in the table list.
Click on the name of the order tag you wish to edit to reveal the order tag options, such as name, slug, assignment options.
General options
↑ Back to topThere are some general options available, these are populated during the creation of the tag but can be edited if required.
- Name
- Name of the order tag which will be displayed.
- Slug
- A unique reference used for the order tag internally, you can leave this alone, or if you have a specific reason to change the slug you can do so. It is generally recommended to leave this as the default.
- Parent order tag
- Allows you to define the order tag as a child of another order tag, this is used for managing order tags hierarchically in the dashboard, for further details see the hierarchy section in this documentation.
- Description
- The description entered will be displayed upon hovering over the order tag on an order.
- Color background
- Sets the background color of the tag, if empty defaults to
#000000
.
- Sets the background color of the tag, if empty defaults to
- Color text
- Sets the text color of the tag, if empty defaults to
#ffffff
.
- Sets the text color of the tag, if empty defaults to
Assignment options
↑ Back to topOrders can be assigned automatically and/or manually.
Automatic assignment
↑ Back to top“Set on” conditions
When editing an order tag you can apply one or more “set on” automatic assignment conditions.
- On order placed
- Sets the tag when an order is placed via checkout or adding an order via dashboard. Some payment methods may also immediately update the order after it has been placed e.g. to change order status once payment confirmed.
- On order update
- Sets the tag when an order is updated. If a tag is attempted to be removed manually from an order this may cause it to be restored automatically upon update if the “Set If” conditions are met.
- On order subscription renewal
- Sets the tag when a subscription renewal order gets created. Requires WooCommerce Subscriptions, this option is only visible when the WooCommerce Subscriptions extension is active.
“Set if” conditions
Once you’ve set some “set on” conditions, you then need to set some “set if” assignment conditions, if the order matches these conditions the order tag will be automatically assigned upon the “set on” conditions.
- Coupon
- Sets the tag if the order used coupon(s).
- Coupon (advanced)
- Sets the tag if the order used coupon(s), with more granular control over the coupon code conditions.
- Customer
- Sets the tag if the order is by a specific customer(s). By default customers are shown for selection here if they have the “customer” user role, use the
wcot_order_tags_customer_roles
filter hook to include customers with custom roles.
- Sets the tag if the order is by a specific customer(s). By default customers are shown for selection here if they have the “customer” user role, use the
- Customer order count
- Sets the tag based on the amount of orders the customer has placed including the current order. For accuracy it is recommended this is only set on order placed as the customer order count may have increased by the time the order is updated.
- Customer role
- Sets the tag if the order is by a customer with a specific role(s).
- Item count
- Sets the tag based on the amount of items within the order, including multiple quantities of the same item.
- Item meta data
- Sets the tag if the order contains an item which has specific meta data(s).
- Used for setting tags based on order item meta, e.g. meta added by editing an item in an order.
- Meta data
- Sets the tag if the order has specific meta data(s). See the meta data reference section in this documentation for further details.
- Used for setting tags based on order meta, e.g. shipping postcode.
- Order status
- Sets the tag if the order has a specific order status(es). It is recommended this is used in conjunction with other “Set If” conditions than individually.
- Order total
- Sets the tag based on the order total.
- Payment method
- Sets the tag based on the payment method(s) used.
- Product
- Sets the tag if the order contains a specific product(s).
- Product category
- Sets the tag if the order contains a product from a specific category(s).
- Product meta data
- Sets the tag if the order contains a product which has specific meta data(s). See the meta data reference section in this documentation for further details.
- Used for setting tags based on product meta, e.g. weight.
- Product tag
- Sets the tag if the order contains a product with a specific tag(s).
- Shipping method
- Sets the tag based on the shipping method(s) used.
- Shipping method instance
- Sets the tag based on the shipping method instance(s) used.
- Shipping zone
- Sets the tag based on the shipping zone(s) used. Shipping zone(s) determined from the order’s shipping method instance when order placed/updated.
Operators
Some of the “set if” conditions allow you to specify an operator and a value, these are used where you want to perform a calculation or check the value contents, here is a list of what each operator does:
Operator | Description |
---|---|
= |
Equals the value |
!= |
Does not equal the value |
>= |
Greater than or equals the value |
> |
Greater than the value |
<= |
Less than or equals the value |
< |
Less than the value |
contains |
Contains the value |
not_contains |
Does not contain the value |
starts_with |
Starts with the value |
ends_with |
Ends with the value |
“Set if” mode
- All
- If set to all then if all of the “Set If” conditions enabled are met it sets the tag.
- Any
- If set to any then if any of the “Set If” conditions enabled are met it sets the tag.
Manual assignment
↑ Back to topTo manually assign or unassign order tags on an order there are two options:
- When editing an order you can manually set/remove any order tag by using the order tags meta box*
- On the orders list you can select orders and use bulk actions to set/remove a specific order tag
*If you have an automatic assignment rule which is applied on order update, that rule may override the manual assignment you are attempting to apply.
Order management
↑ Back to topOrders list
↑ Back to topFrom the orders list you can see the order tags on each order, filter the list by a specific order tag/no order tag, and perform bulk actions.
Order details
↑ Back to topWhen viewing an individual order the order tags are shown in the general section.
Order tags hierarchy
↑ Back to topOrder tags can be set hierarchically. When adding/editing an order tag you can specify the parent order tag, if this is none, then order tag is a parent, if another order tag is selected it is a child of the parent.
If you have parent/child order tags there are a few differences in how order tags and related options are displayed as outlined below:
- Child order tags are displayed in the format
Parent > Child
in the bulk action and filter options on the orders list - Child order tags are displayed immediately after the parent tag in the order list/details pages, with each parent/child group separated with a line break
- If an order tag is set which is parent only (or if a child order tag is assigned without the parent order tag), these are displayed after any parent/child groups separated with a line break
Bulk set or reset order tags
↑ Back to topIt is recommended you take a backup before using this functionality and test on a staging/development environment before performing on a production website.
This information is for setting order tags on all your orders, if you simply want to select specific orders and bulk set order tags use bulk actions from the orders list instead.
There are 2 bulk order tag options, these allow you to set order tags on all orders in your store, this is generally only used once, e.g. if you want to set order tags on orders from before the Order Tags extension was installed or if you want to reset order tags on orders.
To use this functionality you must be logged into your WordPress dashboard and be a user who has the manage_woocommerce
capability, which administrators and shop managers have.
- Go to
https://example.com/wp-admin/admin.php?page=wcot-order-tags-set-tags-bulk
, replacinghttps://example.com/wp-admin/
with your dashboard address - Click the set tags bulk button to set order tags where not previously set
- Click the reset tags bulk button to remove all order tags from each order (including any manually added order tags) and then set order tags where not previously set
If you have a large amount of orders then bulk set or reset order tags is not recommended due to potential time out issues due to the sheer amount of data.
It is not possible for some order tags to be set/reset on old subscription derived orders that were originally created automatically from subscriptions using the bulk set/reset functionality. This is because some of the data required to set the order tags is got from the parent subscription, however in this scenario that subscription may have since been updated with different data than was present at the time the old subscription derived order was placed, so if these order tags were set they might not be correct as the subscription has updated data, so some order tags on old subscription derived orders may not get applied where the data potentially may have been updated on the parent subscription.
Export orders with order tags
↑ Back to topOrder tags aren’t saved as order meta, for more details on how order tags data is stored, see the order tags data storage section in this documentation.
If you wish to export order data including order tags it requires the export process to specifically find the order tag data.
A third party product, Advanced Order Export For WooCommerce by AlgolPlus, allows orders to be exported with order tags, however it requires a specific configuration applying.
Learn how to configure this product specifically for an order tags export in their documentation.
We can not offer any support for this functionality as it is via a third party product.
Meta data reference
↑ Back to topWhen using a meta based automatic assignment option, the order item meta, order meta or product meta is the associated data stored in the database.
There can be standard meta included by WooCommerce, then potentially custom meta data coming from other products, like plugins.
Order item meta data
↑ Back to topGenerally, if you wish to tag based on order item meta data, this will be data that has been added to the order item via the dashboard when editing an order, and therefore you’ll be aware of the meta keys/values to target as you will have input them during the order item edit.
Order meta data
↑ Back to topHere is a list of standard WooCommerce order meta keys which might be useful when setting order meta data based automatic assignment rules:
This list is from WooCommerce 8.9.0, updates since this release may affect the accuracy of this list.
_customer_user
_order_key
_order_currency
_billing_first_name
_billing_last_name
_billing_company
_billing_address_1
_billing_address_2
_billing_city
_billing_state
_billing_postcode
_billing_country
_billing_email
_billing_phone
_shipping_first_name
_shipping_last_name
_shipping_company
_shipping_address_1
_shipping_address_2
_shipping_city
_shipping_state
_shipping_postcode
_shipping_country
_shipping_phone
_completed_date
_paid_date
_edit_last
_cart_discount
_cart_discount_tax
_order_shipping
_order_shipping_tax
_order_tax
_order_total
_payment_method
_payment_method_title
_transaction_id
_customer_ip_address
_customer_user_agent
_created_via
_order_version
_prices_include_tax
_date_completed
_date_paid
_payment_tokens
_billing_address_index
_shipping_address_index
_recorded_sales
_recorded_coupon_usage_counts
_download_permissions_granted
_order_stock_reduced
_new_order_email_sent
Product meta data
↑ Back to topHere is a list of standard WooCommerce product meta keys which might be useful when setting product meta data based automatic assignment rules:
This list is from WooCommerce 8.9.0, updates since this release may affect the accuracy of this list.
_visibility
_sku
_price
_regular_price
_sale_price
_sale_price_dates_from
_sale_price_dates_to
total_sales
_tax_status
_tax_class
_manage_stock
_stock
_stock_status
_backorders
_low_stock_amount
_sold_individually
_weight
_length
_width
_height
_upsell_ids
_crosssell_ids
_purchase_note
_default_attributes
_product_attributes
_virtual
_downloadable
_download_limit
_download_expiry
_featured
_downloadable_files
_wc_rating_count
_wc_average_rating
_wc_review_count
_variation_description
_thumbnail_id
_file_paths
_product_image_gallery
_product_version
_wp_old_slug
_edit_last
_edit_lock
Meta value formats
↑ Back to topThe associated values for the above order/product meta keys are sometimes in a specific format, however it isn’t feasible for us to provide details of every possible format in this documentation, consider reviewing the database data to understand the formats required.
Data storage
↑ Back to topOrder tags registers a taxonomy in WordPress with the key wcot_order_tag
, on the shop_order
post type, this also applies when High Performance Order Storage (HPOS) is enabled, HPOS doesn’t use the shop_order
post type, but has compatibility with the shop_order
post type in a register taxonomy context.
Each order tag is a term with a relationship to the wcot_order_tag
taxonomy, order object, etc.
When order tags are created, set on an order, etc, the data is stored as per the native WordPress taxonomy data storage methods, ultimately resulting in term data being added to the WordPress term database tables.
Retrieval, querying, etc of this data is as per the native WordPress taxonomy data storage methods. These native WordPress taxonomy data storage methods are the standard means of handling tag data in WordPress, it is the same storage mechanism used by WordPress itself to manage tag data on blog posts.
If your store receives a large amount of orders on a regular basis, before enabling order tags on a production website, we recommend you first use a staging/development environment to create some automatically assigned order tags, then simulate the order placements to test order tags get set on orders and that there are no other issues for the approx number of orders you receive before using the extension on a production website, when simulating orders consider taking precautions, e.g. disabling outbound emails.
Custom development
↑ Back to topThe following information is provided for custom development purposes for web developers, they are useful if you wish to add custom features or modify how the extension works. As per the WooCommerce support policy we cannot offer any support for your use of these custom development features.
Filter hooks
↑ Back to topFilter hook | Description |
---|---|
wcot_order_tags_bulk_actions_remove_order_tags | Whether remove order tag options are available in bulk actions on the order list |
wcot_order_tags_bulk_actions_set_order_tags | Whether set order tag options are available in bulk actions on the order list |
wcot_order_tags_color_default | Default hex code background color used for order tags if empty |
wcot_order_tags_color_text_default | Default hex code text color used for order tags if empty |
wcot_order_tags_customer_roles | Customer roles to include customers with custom roles in the set if customer field when adding/editing an order tag |
wcot_order_tags_set_if_product_variations | Allows individual variations of a variable product to be selectable in the set if product order tag assignment field |
wcot_order_tag_taxonomy_args | Filter the register_taxonomy arguments of the order tags taxonomy |
Functions
↑ Back to topFunction | Return |
---|---|
wcot_order_tags_get_all_order_tags | Array of term objects |
wcot_order_tags_get_order_tag_html | HTML string for a specific order tag |
wcot_order_tags_get_order_tags | Array of term objects |
wcot_order_tags_get_order_tags_html | HTML markup of order tags |
wcot_order_tags_make_hierarchical | Array of hierarchical order tags |
wcot_order_tags_remove_order_tag | Bool or error |
wcot_order_tags_set_order_tag | Array, false or error |
BETA functionality
↑ Back to topWe may occasionally include BETA functionality, this is highlighted with a (BETA)
label. Functionality with this label should be used with caution and is only recommended to be tested on a staging/development environment. The functionality is included so users can test the functionality/provide feedback before it becomes stable, at which point the (BETA)
label will be removed. Note that there may be occasions where BETA functionality is determined unsuitable for use and removed entirely.
Caching
↑ Back to topIf you are using any form of caching then it is recommended that the cache lifespan/expiry should be set to 10 hours or less. This is recommended by most major caching solutions to avoid potential issues with WordPress nonces.
Screen sizes
↑ Back to top- Frontend: Where elements may be displayed they will fit within the screen width
- Backend: Where interfaces may be displayed it is recommended to use a desktop computer with a resolution of 1920×1080 or higher, for lower resolutions any interfaces will attempt to fit within the screen width but some elements may be close together and/or larger than the screen width
Translation
↑ Back to topWe generally recommend Loco Translate to translate and/or adapt text strings within this product.
Works with
↑ Back to topWhere we have explicitly stated this product works with another product, this should only be assumed accurate if you are using the version of the other product which was the latest at the time the latest version of this product was released. This is because, while usually unlikely, the other product may have changed functionality which effects this product.
FAQs
↑ Back to topIs it compatible with a specific theme?
↑ Back to topThis extension will generally be compatible with most themes. There may be a small number of themes that are fully or partially incompatible due to clashes in functionality and/or if the theme has removed or adapted core WooCommerce functionality. If you would like to know if a specific theme will be compatible before purchase then please contact us and we can advise, it may not be possible for us to determine this e.g. if the theme requires a license and/or several configuration steps. In this scenario you are welcome to purchase and test this extension with the theme and if there is a a compatibility issue you can take advantage of the refund policy for this extension.
Is it compatible with a specific extension/plugin?
↑ Back to topThis extension will generally be compatible with most extensions/plugins. There may be a small number of extensions/plugins that are fully or partially incompatible due to clashes in functionality and/or if the extension/plugin has removed or adapted core WooCommerce functionality. If you would like to know if a specific extension/plugin will be compatible before purchase then please contact us and we can advise, it may not be possible for us to determine this e.g. if the extension/plugin requires a license and/or several configuration steps. In this scenario you are welcome to purchase and test this extension with the other extension/plugin and if there is a a compatibility issue you can take advantage of the refund policy for this extension.
Is it compatible with a specific page builder?
↑ Back to topThis extension will generally be compatible with most page builders. There may be a small number of page builders that are fully or partially incompatible due to clashes in functionality and/or if the page builder has removed or adapted core WooCommerce functionality. If you would like to know if a specific page builder will be compatible before purchase then please contact us and we can advise, it may not be possible for us to determine this e.g. if the page builder requires a license and/or several configuration steps. In this scenario you are welcome to purchase and test this extension with the page builder and if there is a a compatibility issue you can take advantage of the refund policy for this extension.
Support
↑ Back to topIf you need any further assistance with this extension please contact us. Please note that extension support does not include providing assistance with any custom development requirements as per the WooCommerce support policy.