eclair4151
Forum Replies Created
-
Another note, when calling
$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 );
You can see an example of this on my shop here:
Here is the variable product:
https://wolfpacktackle.com/product/test-product/
And here is a cart link campaign trying to add it to the cart
Hey, thanks for your reply, yes here are more details, and an example.
First, set up a new variable product with an attribute.
Then set up a variation, with the attribute specified, and left as “Any”
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
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
So when you try to load the campaign, you are just met with an error that the attribute is required.
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
$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
In reply to: [Product Fields, Addons and Price Calculator for WooCommerce] Problem in cartFor 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
See bug fix change in woocommerce logs below
To add on, I have the same issue, most of my conditional visibility rules don’t work. Only certain random ones do.
Forum: Plugins
In reply to: [WooCommerce] Unable to change prices of items in order on admin panelI 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 solution of changing the php.ini max_input_vars solved the issue for us finally. @ondigit thank you so much for solving a huge headache!!!!
Forum: Reviews
In reply to: [One Click Accessibility] Greyscale bugSame issue. Clicking grayscale makes the entire plugin unusable.