Title: eclair4151's Replies | WordPress.org

---

# eclair4151

  [  ](https://wordpress.org/support/users/eclair4151/)

 *   [Profile](https://wordpress.org/support/users/eclair4151/)
 *   [Topics Started](https://wordpress.org/support/users/eclair4151/topics/)
 *   [Replies Created](https://wordpress.org/support/users/eclair4151/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/eclair4151/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/eclair4151/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/eclair4151/engagements/)
 *   [Favorites](https://wordpress.org/support/users/eclair4151/favorites/)

 Search replies:

## Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Cart Link for WooCommerce] Add way to add custom attributes to variable products](https://wordpress.org/support/topic/add-way-to-add-custom-attributes-to-variable-products/)
 *  Thread Starter [eclair4151](https://wordpress.org/support/users/eclair4151/)
 * (@eclair4151)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/add-way-to-add-custom-attributes-to-variable-products/#post-16951234)
 * Another note, when calling
 *     ```wp-block-code
       $this->cart->add_to_cart( $product_id, $product->get_quantity(), $variation_id, [META DATA DICT HERE], $cart_item_data );
       ```
   
 * In my testing you need to prepend the meta data you want with attribute_ ie this
   code is what correctly adds the item to my cart with the red color selected:
 * `$this->cart->add_to_cart( $product_id, $product->get_quantity(), $variation_id,["
   attribute_pa_color" => "red"], $cart_item_data );`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Cart Link for WooCommerce] Add way to add custom attributes to variable products](https://wordpress.org/support/topic/add-way-to-add-custom-attributes-to-variable-products/)
 *  Thread Starter [eclair4151](https://wordpress.org/support/users/eclair4151/)
 * (@eclair4151)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/add-way-to-add-custom-attributes-to-variable-products/#post-16951192)
 * You can see an example of this on my shop here:
 * Here is the variable product:
 * [https://wolfpacktackle.com/product/test-product/](https://wolfpacktackle.com/product/test-product/)
 * And here is a cart link campaign trying to add it to the cart
 * [https://wolfpacktackle.com/testcampaign/](https://wolfpacktackle.com/testcampaign/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Cart Link for WooCommerce] Add way to add custom attributes to variable products](https://wordpress.org/support/topic/add-way-to-add-custom-attributes-to-variable-products/)
 *  Thread Starter [eclair4151](https://wordpress.org/support/users/eclair4151/)
 * (@eclair4151)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/add-way-to-add-custom-attributes-to-variable-products/#post-16951188)
 * Hey, thanks for your reply, yes here are more details, and an example.
 * First, set up a new variable product with an attribute.
 * ![](https://i0.wp.com/i.imgur.com/lx5JtB3.png?ssl=1)
 * Then set up a variation, with the attribute specified, and left as “Any”
 * ![](https://i0.wp.com/i.imgur.com/7S0Nplf.png?ssl=1)
 * You will see, when using the item regularly, you need to specify the color while
   checking out, which is then added to the item meta data in the order
 * ![](https://i0.wp.com/i.imgur.com/giC21uS.png?ssl=1)
 * ![](https://i0.wp.com/i.imgur.com/r1gT60H.png?ssl=1)
 * ![](https://i0.wp.com/i.imgur.com/mUVjM5F.png?ssl=1)
 * But now, if you add this new test item to a cart link campaign, there is no way
   to specify additional meta data for the items
 * ![](https://i0.wp.com/i.imgur.com/1qfiYhP.png?resize=537%2C125&ssl=1)
 * So when you try to load the campaign, you are just met with an error that the
   attribute is required.
 * ![](https://i0.wp.com/i.imgur.com/yRls4z6.png?ssl=1)
 * Ideally, inside the admin of the cart link campaign, when you add a product there
   would be a spot where you can specify multiple extra item meta data entries, 
   all of which will be passed as a dict in to
 *     ```wp-block-code
       $this->cart->add_to_cart( $product_id, $product->get_quantity(), $variation_id, [META DATA DICT HERE], $cart_item_data );
       ```
   
 * Inside AddProductAction
 * Thanks again, let me know if you have any further questions.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Product Fields, Addons and Price Calculator for WooCommerce] Problem in cart](https://wordpress.org/support/topic/problem-in-cart/)
 *  [eclair4151](https://wordpress.org/support/users/eclair4151/)
 * (@eclair4151)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/problem-in-cart/#post-16895511)
 * For anyone who sees this later, this was a bug in Woocommerce itself, and has
   been patched, bug fix will be released in Woocommerce 7.9.0 (Currently 7.8.2,
   so bug fix isnt live yet)
 * a temporary work around is listed above (create cart folder in child theme, with
   cart.php inside, and copy the contents of [https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/templates/cart/cart.php](https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/templates/cart/cart.php)
 * See bug fix change in woocommerce logs below
 * [https://github.com/woocommerce/woocommerce/blob/9d5c90dad8b627d1465c8a0d9df24f90bafb2efc/plugins/woocommerce/changelog/issues-38744-duplicate-filter](https://github.com/woocommerce/woocommerce/blob/9d5c90dad8b627d1465c8a0d9df24f90bafb2efc/plugins/woocommerce/changelog/issues-38744-duplicate-filter)
 * [https://github.com/woocommerce/woocommerce/commit/9d5c90dad8b627d1465c8a0d9df24f90bafb2efc#diff-1470770b8060b33be1db8bfa6ebb77aaef8204c09c738d3fb43666d626a7d12d](https://github.com/woocommerce/woocommerce/commit/9d5c90dad8b627d1465c8a0d9df24f90bafb2efc#diff-1470770b8060b33be1db8bfa6ebb77aaef8204c09c738d3fb43666d626a7d12d)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Product Fields, Addons and Price Calculator for WooCommerce] Conditional visibility](https://wordpress.org/support/topic/conditional-visibility-2/)
 *  [eclair4151](https://wordpress.org/support/users/eclair4151/)
 * (@eclair4151)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/conditional-visibility-2/#post-16586008)
 * To add on, I have the same issue, most of my conditional visibility rules don’t
   work. Only certain random ones do.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Unable to change prices of items in order on admin panel](https://wordpress.org/support/topic/unable-to-change-prices-of-items-in-order-on-admin-panel/)
 *  [eclair4151](https://wordpress.org/support/users/eclair4151/)
 * (@eclair4151)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/unable-to-change-prices-of-items-in-order-on-admin-panel/#post-16585217)
 * I work for WolfPack Tackle (the original poster). The company account was disabled
   as per the wordpress forums policy of not allowing company accounts, but just
   wanted to add that [@ondigit](https://wordpress.org/support/users/ondigit/) solution
   of changing the php.ini max_input_vars solved the issue for us finally. [@ondigit](https://wordpress.org/support/users/ondigit/)
   thank you so much for solving a huge headache!!!!
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[Ally - Web Accessibility & Usability] Greyscale bug](https://wordpress.org/support/topic/greyscale-bug/)
 *  [eclair4151](https://wordpress.org/support/users/eclair4151/)
 * (@eclair4151)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/greyscale-bug/#post-16478482)
 * Same issue. Clicking grayscale makes the entire plugin unusable.

Viewing 7 replies - 1 through 7 (of 7 total)