Support » Plugin: Groups » Add users to groups by purchase history (woocommerce)

  • Resolved blackbird69

    (@blackbird69)


    Is it possible to add users to a group by the users purchase history from woocommerce?
    If a user have bought 5 products he would be added to group 1. If he bought 20 products he would be added to group 2 and so on ?

Viewing 1 replies (of 1 total)
  • Plugin Author Kento

    (@proaktion)

    We provide this example implementation https://github.com/itthinx/groups-wc-completed-customer which adds the user to a group upon order completion. You could fork and extend it to cover the particular scenarios and conditions that need to be met when. As the membership is added based on order status, you could count the number of completed orders for the customer and do the group assignment accordingly.

    As an alternative to hooking on woocommerce_order_status_completed, you could hook on woocommerce_order_status_processing if you want the assignment to be done earlier.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.