Title: Reflection
Last modified: April 3, 2022

---

# Reflection

 *  Resolved [fullmetal22](https://wordpress.org/support/users/fullmetal22/)
 * (@fullmetal22)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/reflection/)
 * I studied how the order item meta and order meta of woocommerce works and I understood
   how it works. As previously proposed, my problem was for a buyer user to pass
   the id of a seller user via meta order item at the time of purchase, if the wp
   automator managed to use the order item meta in the automations I could create
   just a simple automation that regardless of how many products the buyer user 
   tries to buy at the same time would be able to make the necessary validations
   even if each product had a different seller id the automation would be the following
   example: user buys any product > action creates a post > post author > seller
   id – Remarks : look how easy it would be to validate products sold to several
   sellers. Final considerations, as it is still not possible to use the order item
   goals for the automations, I had to do the following, it is ugly and not smart
   but for the moment it solves.
 * AUTOMATION: 1
 * buyer user create a post “comments even send to cart button” > update user profile
   > seller id saved within current user >
 * AUTOMATION: 2
 * user completes a purchase > updates multiple > filters by post from author post
   with a meta field equal to seller id and a meta field price equal to total order
   price > auterates the post author to seller id.
 * To make this work I had to create a custom field inside the order meta woocommerce
   inside the user and put this function to force the user to buy only one product
   at a time in the cart.
 * add_filter( ‘woocommerce_add_cart_item_data’, ‘woo_custom_add_to_cart’ );
 * function woo_custom_add_to_cart( $cart_item_data ) {
 *  global $woocommerce;
    $woocommerce->cart->empty_cart();
 *  // Do nothing with the data and return
    return $cart_item_data; }
 * If you can carefully analyze an update to be able to use the meta item order,
   it would add a lot to the plugin. Thank you again for the great work and plugin,
   soon I will be purchasing the paid version from you because today without the
   automator there is no way to create sites

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Paco González Pérez](https://wordpress.org/support/users/pacogon/)
 * (@pacogon)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/reflection/#post-15523864)
 * Hi [@fullmetal22](https://wordpress.org/support/users/fullmetal22/) !
 * I would be more than happy to assist you today.
 * Thank you very much for the suggestion, we will take it into account for future
   updates.
 * Hope it helps!

Viewing 1 replies (of 1 total)

The topic ‘Reflection’ is closed to new replies.

 * ![](https://ps.w.org/automatorwp/assets/icon-256x256.png?rev=2271366)
 * [AutomatorWP - Automator plugin for no-code automations, webhooks & custom integrations in WordPress](https://wordpress.org/plugins/automatorwp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/automatorwp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/automatorwp/)
 * [Active Topics](https://wordpress.org/support/plugin/automatorwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/automatorwp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/automatorwp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Paco González Pérez](https://wordpress.org/support/users/pacogon/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/reflection/#post-15523864)
 * Status: resolved