1. Documentation
  2. Plugins
  3. WooCommerce
  4. Extensions

Order Tags

Installation ↑ Back to top

  • Download the .zip file from your WooCommerce account.
  • Go to: WordPress Admin > Plugins > Add New and Upload Plugin with the file you downloaded with Choose File.
  • Install Now and Activate the extension.

More information at: Install and Activate Plugins/Extensions.

Create Order Tags ↑ Back to top

  • Go to: Order Tags (from your WordPress dashboard menu)
  • Create an order tag
  • Click into the order tag just created
  • Fill in a color and any rules required to display the tag
  • Save changes
  • This order tag will now appear if the rules apply
  • You can also apply order tags manually when editing an order

Order Tags Dashboard ↑ Back to top

You can add or edit order tags, simply select “Order Tags” from your WordPress dashboard menu (left menu).

You can add an order tag using the left section, once created click into the order tag to edit all the options, from here you can select a color and rules for automatic assignment of the order tag:

Automatic Assignment ↑ Back to top

When editing a tag you can apply one or more automatic assignment rules. You can choose for these to be applied on order placement, update or both.

Set on order placed ↑ Back to top

Sets the tag when the order is placed.

Set on order update ↑ Back to top

Sets the tag if the order is updated. If a tag is attempted to be removed from an order this will cause it to be restored upon updating the order if the “set if” conditions are met.

Set on order subscription renewal* ↑ Back to top

Sets the tag when a subscription renewal order is created.

*Requires WooCommerce Subscriptions, this option is only visible when the WooCommerce Subscriptions extension is active.

Set if customer ↑ Back to top

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 to include customers with custom roles.

Set if customer order count ↑ Back to top

Sets the tag based on the amount of orders the customer has placed including the current order.

Set if customer role ↑ Back to top

Sets the tag if the order is by a customer with a specific role(s).

Set if item count ↑ Back to top

Sets the tag based on the amount of items within the order, including multiple quantities of the same item.

Set if order total ↑ Back to top

Sets the tag based on the order total.

Set if payment method ↑ Back to top

Sets the tag based on the payment method(s) used.

Set if product ↑ Back to top

Sets the tag if the order contains a specific product(s).

Set if product category ↑ Back to top

Sets the tag if the order contains a product from a specific category(s).

Set if shipping method ↑ Back to top

Sets the tag based on the shipping method(s) used.

Set if shipping method instance ↑ Back to top

Sets the tag based on the shipping method instance(s) used.

Set if shipping zone ↑ Back to top

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.

Set if mode ↑ Back to top

If “All” then all the “Set if” conditions must be met to set the tag, if “Any” then the tag is set if any of the conditions are met.

Manual Assignment ↑ Back to top

There are 2 ways to manually assign order tags.

  1. When editing an order you can manually apply any tag by using the “Order Tags” meta box (screenshot below)
  2. On the orders list screen you can select a number of orders and use the “Bulk actions” drop down to assign a specific order tag

Note that if you have an automatic assignment rule on order update those rules may override the manual assignment you are applying (e.g. if attempting to remove an order tag using option 1 above).

Order Tags Display ↑ Back to top

Once you have created order tags using the setup and configuration instructions above, you can see order tags in the following areas of your dashboard:

Orders List ↑ Back to top

Order Details ↑ Back to top

Filter Orders by Tag ↑ Back to top

You can filter orders by a specific order tag using the filter at top of the orders page.

Bulk Set/Reset Order Tags ↑ Back to top

There are 2 bulk order tag features, these allow you to assigned any order tags setup to be set on all orders in your store, this is useful 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).

  • Navigate to the order tags page (by clicking Order Tags from the dashboard menu)
  • In the address bar add &wcot_order_tags_set_tags_bulk=1 or &wcot_order_tags_set_tags_bulk=2 (see below for differences) to the end of the URL (e.g. https://yourwebsite.com/wp-admin/edit-tags.php?taxonomy=wcot_order_tag&wcot_order_tags_set_tags_bulk=1
    • &wcot_order_tags_set_tags_bulk=1 will apply tags to all orders where they were not previously set
    • &wcot_order_tags_set_tags_bulk=2 will remove all tags from each order (including ones manually set) and then apply your tags to each order
  • Press enter (as if you have typed in a web address and pressing enter to load the page)
  • You will then see a notice that the order tags have been set
  • We recommend navigation away from the current page (such as by clicking back to the WordPress dashboard), this is just to ensure you don’t refresh the page while still on the wcot_order_tags_set_tags_bulk based URL which would trigger another bulk set/reset

This functionality will attempt to get all orders in your store and therefore is very resource intensive, if you receive a server timeout you may have more orders than your server can deal with in the timeout limit applied in your server configuration. If this occurs we recommend discussing this with your web hosting provider. If it times out the orders will have been updated to the point of the timeout.

It is recommended you take a backup of your website before using this functionality.

Functions ↑ Back to top

For custom development you can use the functions below:

FunctionReturn
wcot_order_tags_get_all_order_tags()Array of term objects
wcot_order_tags_get_order_tags( $order_id )Array of term objects
wcot_order_tags_get_order_tag_html( $term )HTML string for specific order tag
wcot_order_tags_set_order_tag( $order_id, $tag )Array, false or error

Filters ↑ Back to top

For custom development you can use the filters below:

FilterDescription
wcot_order_tags_color_defaultFilter the default hex code used for order tags when no color set
wcot_order_tags_customer_rolesFilter the customer roles to include customers with custom roles in the “set if customer” field when adding/editing a tag
wcot_order_tag_taxonomy_argsFilter the register_taxonomy args of the order tags taxonomy

WooCommerce - the most customizable eCommerce platform for building your online business.

  • 30 day money back guarantee
  • Support teams across the world
  • Safe & Secure online payment