tr Skip to content

Connect WooCommerce and WordPress

WooCommerce and WordPress share one database, yet a purchase does not change a user's role and a new account does not get a coupon unless you add rules for it. FlowMattic adds those rules on your own site: buy and get access, register and get a discount, spend enough and get flagged as a VIP.

75 triggers 128 actions 6 example workflows 1 ready-made template Unlimited runs

Try a pairing

When this happens in WooCommerce43 triggers

Do this in WordPress71 actions

1. TriggerProduct Purchased
2. ActionAdd Role to User

When WooCommerce fires Product Purchased, FlowMattic runs Add Role to User in WordPress with the data from that event.

You build this in the FlowMattic workflow builder on your own site. See the setup steps

WooCommerce and WordPress workflows you can build

Each one uses only triggers and actions the two integrations ship today, plus FlowMattic's own tools. Where the library has a ready-made template, import it instead of building from scratch.

WooCommerce app icon WordPress app icon

Give buyers of a product a members role

Sell access to a private area as a product. When it is bought, Add Role to User gives the customer the role your members pages check for, with no membership plugin.

Product PurchasedAdd Role to User

WooCommerce app icon WordPress app icon

Remove the role when a subscription stops

WooCommerce Subscription Status Updated fires on every change, so a Filter passes only cancelled or expired subscriptions. The role is removed and so is access to member content.

WooCommerce Subscription Status UpdatedFilterRemove User Role

WooCommerce app icon WordPress app icon

Draft a blog post for each new product

Shops that announce launches on their blog get a draft post with the product name, short description and link, ready for someone to add photos and publish.

New Product CreatedNew Post

WooCommerce app icon WordPress app icon

Flag loyal customers in their user profile

When a customer reaches the number of completed orders you set, Update User Meta saves a loyalty tier that theme templates or other plugins can read.

Customer Order Count ThresholdUpdate User Meta

WooCommerce app icon WordPress app icon

Create a welcome coupon for every new registered user

Blogs and community sites that also sell turn new accounts into first orders. Each new user gets a single coupon, emailed to them from your site.

New UserCreate CouponEmail (SMTP)

WooCommerce app icon WordPress app icon

Add approved wholesale users to the trade coupon

When you move an account from Customer to Wholesale, that user's email is added to the trade coupon's allowed list, so only approved buyers can use it.

User Role Changed From Specific to DefinedAdd Email(s) to Coupon

Set up: a members role on purchase

At the end, each customer who buys the product you choose receives a WordPress role.

  1. Create the role

    Make sure the role exists on your site, for example with a role editor plugin, and that your members pages check for it.

  2. Start from Product Purchased

    Create a workflow with WooCommerce Product Purchased, select the membership product, and place a test order to capture the data.

  3. Add the role

    Add WordPress Add Role to User, map the customer's user ID from the order and choose the role.

  4. Check the test user

    Run the step, confirm the role on the user's profile in wp-admin, then switch the workflow on.

Give buyers of a product a members role
  1. WooCommerce app icon 1. Trigger in WooCommerce Product Purchased
  2. WordPress app icon 2. Action in WordPress Add Role to User

    Fields mapped from the earlier steps (a typical setup)

    From WooCommerceTo WordPress
    Customer user IDUser
    Members roleRole to add
Built on the FlowMattic canvas. Test each step with real data, then switch the workflow on.

Triggers and actions in this pair

A trigger starts a workflow. An action is something FlowMattic does in the app as a step.

Good to know

  • Role and user meta actions need a WordPress account. Orders placed as a guest have no user, so require an account for products that grant access.
  • Add Role to User keeps the user's existing roles. Use Change User Role when the new role should replace the old one.
  • Product Viewed fires on every product page view. Pair it with a Filter, or the workflow will run far more often than you expect.
WooCommerce app icon

WooCommerce

Integration page

Triggers (43)

  • New Product CreatedWhen a new product is created
  • Product UpdatedWhen a product is updated
  • Product DeletedWhen a product is moved to trash
  • Restore ProductWhen a product is restored from trash
  • New Order CreatedWhen a new order is created
  • Order UpdatedWhen an order is updated
  • Order DeletedWhen an order is moved to trash
  • Restore OrderWhen an order is restored from trash
  • New Coupon CreatedWhen a new coupon is created
  • New Customer CreatedWhen a new customer profile is created
  • Product Added to CartWhen user adds product in cart
  • Product Removed from CartWhen a product is removed from cart
  • Order Status Set to PendingTriggers when an order status is set to pending
  • Order Status Set to FailedTriggers when an order status is set to failed
  • Order Status Set to On-holdTriggers when an order status is set to on-hold
  • Order Status Set to ProcessingTriggers when an order status is set to processing
  • Order Status Set to CompletedTriggers when an order status is set to completed
  • Order Status Set to RefundedTriggers when an order status is set to refunded
  • Order Status Set to CancelledTriggers when an order status is set to cancelled
  • WooCommerce Subscription CreatedTriggers when a subscription is created after a customer purchases a subscription product or products
  • WooCommerce Subscription Status UpdatedTriggers immediately after a subscription's status has been changed
  • Product ViewedTriggers when a product is viewed on frontend
  • Order Note AddedTriggers when a note is added to an order
  • Customer Order Count ThresholdTriggers when customer reaches specified completed order count
  • Customer Total Spend ThresholdTriggers when customer reaches specified spending amount
  • Product Category PurchasedTriggers when a product from specific category is purchased
  • Product PurchasedTriggers when a specific product is purchased
  • Variable Product PurchasedTriggers when a variable product is purchased
  • Variable Subscription PurchasedTriggers when a variable subscription product is purchased
  • Order PaidTriggers when an order payment is completed
  • Product ReviewedTriggers when a product review is submitted
  • Product RefundedTriggers when a product refund is created
  • Coupon UpdatedTriggers when a coupon is updated
  • Coupon DeletedTriggers when a coupon is deleted
  • Coupon RestoredTriggers when a coupon is restored from trash
  • Customer UpdatedTriggers when a customer profile is updated
  • Customer DeletedTriggers when a customer is deleted
  • Product Goes Out of StockTriggers when a product goes out of stock
  • Product Back in StockTriggers when a product comes back in stock
  • Product Low StockTriggers when a product reaches low stock threshold
  • Product Variation Goes Out of StockTriggers when a product variation goes out of stock
  • Product Variation Back in StockTriggers when a product variation comes back in stock
  • New Cart AbandonmentTriggers when a customer abandons their cart without completing checkout

Actions (57)

  • Create New ProductCreate a new product in WooCommerce
  • Create Variable ProductCreate a new variable product in WooCommerce
  • Create Product VariationCreate a new product variation in WooCommerce
  • Update ProductUpdate existing product in WooCommerce
  • Create New OrderCreate a new order in WooCommerce
  • Create CouponCreate a new coupon
  • Apply CouponApply a coupon to the cart
  • Add Email(s) to CouponAdd one or more emails to a coupon
  • Add Product to CartAdd products to the cart
  • Remove Product from CartRemoves the given product from the cart
  • Create a CustomerCreate a new customer profile
  • Get Customer by IDGet a customer's profile by their ID
  • Get Customer by EmailGet a customer's profile by their email
  • Get Order by IDGet an order's details by its ID
  • Get Orders by EmailGet all orders by email
  • Create AttributeCreate a custom product attribute
  • Add Attribute TermsAdd terms to the product attribute taxonomy
  • Add Product AttributesAdd attributes to the existing product
  • Update Product AttributesUpdate product attributes with new values and remove previous values
  • Get Product Sales CountGet number of sales for the product by ID
  • Add Order NoteAdd a note to the order
  • Get Product by IDGet product details by ID
  • Get Product by SKUGet product details by SKU
  • Get Orders of UserList all completed orders of a user by email or ID
  • Change Order StatusChange the status of an order
  • Get Customer Total SpentGet total amount spent by a customer
  • Get Customer Order CountGet total number of orders placed by a customer
  • Get Customer Last OrderGet the last order placed by a customer
  • Delete CouponDeletes an existing coupon
  • Retrieve Sales ReportGet total sales, refunds, net sales, and order count for a selected date range
  • Retrieve Top Sellers ReportGet list of top selling products with quantity sold
  • Retrieve Reviews TotalsGet review totals by rating
  • Retrieve Products TotalsGet product totals by type
  • Retrieve Customers TotalsGet customer totals report
  • Retrieve Coupons TotalsGet coupon totals by discount type
  • Retrieve Orders TotalsGet order totals by status
  • Retrieve a List of RefundsGet list of refunds for an order
  • Fetch Coupon DetailsRetrieves coupon details by coupon code or ID
  • Add/Update Custom FieldsAdds or update custom fields on specific order
  • Create Product ReviewCreate a new product review
  • Create Product TagCreate a new product tag
  • Create Product CategoryCreate a new product category
  • Delete CustomerDelete a customer account
  • Delete Product TagDelete a product tag
  • List All OrdersRetrieve a list of all orders
  • Retrieve Product by Name/SlugGet product details by product name or slug
  • Update CouponUpdate an existing coupon
  • Update CustomerUpdate customer details
  • Get All CustomersRetrieve a list of all customers
  • Get All ProductsRetrieve a list of all products
  • Get Product VariationGet variation details by product and variation ID
  • List All Order NotesRetrieve all notes for a specific order
  • Update Product VariationUpdate an existing product variation
  • Send Abandoned Cart EmailSend a recovery email to customers with abandoned carts
  • Check Cart StatusCheck if a cart is abandoned, recovered, or active
  • Update Product PriceManage the regular price or sale price of an existing Product or Variation by SKU or ID
  • Update Product Stock QuantityManage the stock quantity and stock status of an existing Product or Variation by SKU or ID
WordPress app icon

WordPress

Integration page

Triggers (32)

  • New UserTriggers when a new user is registered
  • New PostTriggers when a new post is published
  • New PageTriggers when a new page is published
  • New MediaTriggers when a new media is uploaded
  • New CommentTriggers when a new comment is added
  • Comment ApprovedTriggers when a comment is approved
  • Update PostTriggers when a published post is updated
  • Update PageTriggers when a published page is updated
  • User LoginTriggers when an user logs into the site
  • User Visits a Page/PostTriggers when an user visit page, post or any post type singular page
  • User Deletes a PostTriggers when an user delete post of any post type
  • Post Meta UpdatedTriggers when post meta is updated
  • Post Meta Field UpdatedTriggers when post meta specific field is updated
  • User Profile UpdatedTriggers when user profile is updated
  • User Profile Field UpdatedTriggers when user profile specific field is updated
  • User Resets PasswordTriggers when user resets the password
  • User DeletedTriggers when user is deleted from the database
  • Category CreatedTriggers when a new category is created
  • Tag CreatedTriggers when a new tag is created
  • Term CreatedTriggers when a new term is created
  • User Role AddedTriggers when a new role is added to user
  • User Role RemovedTriggers when a role is removed from user
  • User Role ChangedTriggers when user role is changed
  • User Role Changed From Specific to DefinedTriggers when user role is changed from specific role to defined role
  • GDPR Export Data Request ConfirmedTriggers when user confirms request to export their personal data
  • GDPR Erase Data Request ConfirmedTriggers when user confirms request to erase their personal data
  • Plugin ActivatedTriggers when a plugin is activated
  • Plugin DeactivatedTriggers when a plugin is deactivated
  • Plugin UpdatedTriggers once for each plugin that is updated
  • Plugin DeletedTriggers when a plugin is deleted
  • Theme SwitchedTriggers when the active theme is changed
  • WordPress Core UpdatedTriggers when WordPress itself is updated

Actions (71)

  • New UserCreate a new user
  • Update UserUpdate an existing user details
  • Update User MetaUpdate User Metadata
  • Add Role to UserAdd role to existing user roles of an user
  • Change User RoleChange user role of an existing user and set new role
  • Remove User RoleRemove user role of an existing user
  • Delete UserDelete user account from site
  • New MediaCreate a new media
  • Rename MediaRename media title in media library
  • Delete MediaDelete media by ID from the media library
  • Search Media by TitleSearch media by title in media library
  • New PostCreate a new post
  • Update PostUpdate existing post of any post type with custom fields
  • Get User by IDGet an user profile by ID
  • Get User by EmailGet an user profile by Email
  • Create CategoryCreate a new category
  • Create TagCreate a new post tag
  • Create RoleCreate a new user role, if not exists
  • New CommentCreate a new comment on post
  • Get Post MetadataRetrieve all or custom metadata from any post
  • Get User MetadataRetrieve all or custom metadata from any user
  • Get Posts by Post TypeRetrieve all posts of specific post type
  • Get Post TaxonomiesRetrieve all taxonomies of a post
  • Get Post Taxonomy TermsRetrieves the terms of the taxonomy that are attached to the post
  • Get Post by IDRetrieve the post details by ID
  • Get Posts by MetadataRetrieve all posts of specific post type by metadata or custom fields
  • Get Taxonomy by NameRetrieve the taxonomy details by name
  • Get All Users by RoleRetrieve all users by user role
  • Add Tag to PostAdd a tag to the post
  • Remove Tag from PostRemove a tag from post
  • Add Category to PostAdd a category to post
  • Remove Category from PostRemove a category from post
  • Check Plugin ActiveCheck if a plugin is active
  • Activate PluginActivate a plugin if not already active
  • Update CategoryUpdate an existing category details
  • Update TagUpdate an existing tag details
  • Update TermUpdate an existing term details
  • GDPR Request Export Personal DataCreate a request to export user personal data (sends confirmation email)
  • GDPR Request Erase Personal DataCreate a request to erase user personal data (sends confirmation email)
  • GDPR Execute Export Personal DataExecute export of personal data using request ID from trigger
  • GDPR Execute Erase Personal DataExecute erasure of personal data using request ID from trigger
  • Create Media FolderCreate a new folder in the uploads directory
  • Rename Media File URLRename the actual file name and URL of a media item
  • Move Media to FolderMove a media file to a different folder in the uploads directory
  • Delete Post MetaDelete a specific meta key from a post
  • Update Post MetaUpdate a specific post meta key with a new value
  • Add Post MetaAdd a new meta key and value to a post
  • Delete User MetaDelete a specific meta key from a user
  • Update CommentUpdate an existing comment
  • Delete CommentDelete a comment by ID
  • Get CommentsRetrieve comments by post ID, user, or status
  • Set Post StatusChange the status of a post
  • Set Post ThumbnailSet the featured image of a post
  • Remove Post ThumbnailRemove the featured image from a post
  • Duplicate PostClone a post with its meta and taxonomies
  • Delete TermDelete a term from any taxonomy
  • Delete CategoryDelete a category by ID
  • Delete TagDelete a tag by ID
  • Get OptionRetrieve a WordPress option value
  • Update OptionUpdate a WordPress option value
  • Get Users by MetaRetrieve users by a specific meta key and value
  • Send Password ResetSend a password reset email to a user
  • Search WordPressSearch posts, users, post meta, user meta, taxonomy terms, options or comments. Never fails on a miss — always returns found or not_found
  • Create User if Not ExistsCreate a user only when a matching one does not exist. Always reports whether the user was created or already existed
  • Get User by UsernameGet an user profile by username (user_login)
  • Delete PostDelete post by ID from the site
  • Upload Base64 ImageUpload a base64 encoded image to the WordPress Media Library
  • Add Taxonomy to PostAdd a taxonomy to post
  • Remove Taxonomy from PostRemove a taxonomy from post
  • Create TermCreate a new taxonomy term
  • Get Media by IDRetrieve the media details by ID

Why run this pair with FlowMattic

WooCommerce and WordPress connect through FlowMattic on your own site, with no separate automation account in the middle and no charge per run.

No data leaves the site

Orders, users and roles are all in your own database, so these workflows run inside WordPress with nothing sent to an outside service.

Simpler than another plugin

A role on purchase or a coupon on sign-up is one short workflow, not a membership or loyalty plugin with its own settings to learn.

Every order can run a rule

There is no per-run fee, so a store with thousands of orders a month can run these rules on all of them.

Common questions

Can WooCommerce change a user's role after a purchase?

Yes. Start from Product Purchased, Product Category Purchased or Order Paid, and add Add Role to User or Change User Role. Use a Filter if only some products should grant the role.

Can a new WordPress registration get a WooCommerce coupon?

Yes. The WordPress New User trigger can run Create Coupon with a unique code and limit it to the user's email with Add Email(s) to Coupon, then send the code by email.

Can I publish posts about products automatically?

New Product Created can run the WordPress New Post action with the product's name, description and link. Most shops create it as a draft so someone checks it before it goes live.

How do I reward high-spending customers?

Use Customer Total Spend Threshold or Customer Order Count Threshold as the trigger, then add a role, save user meta or create a personal coupon, depending on what your loyalty scheme offers.

What happens to the role when an order is refunded?

Nothing unless you build it. Add a second workflow on Order Status Set to Refunded with Remove User Role, so access ends when the money is returned.

Did not find your answer? You can browse the help center or ask us directly.

Start automating WooCommerce and WordPress

Install FlowMattic, connect both accounts and import a template. Every run stays on your own server.

30-day money-back guarantee Unlimited workflows and runs Self-hosted

Reviewed 23 Oct 2026. The example workflows are written with AI from the real triggers and actions of both integrations and checked against them. WooCommerce integration 2.2.2, WordPress integration 7.3.0.