Variations Dropdown Form as Snippet
-
Hello,
I want to ouput the variations dropdown and the buy button on a different section on my product page, preferably into a snippet, so I can use it with my wp bakery builder. I looked up the variable.php file in the woocommerce template files and copied the code into my snipped plugin.
I call the function
wc_dropdown_variation_attribute_options( array('options' => $options,'attribute' => $attribute_name,'product' => $product) );All variables are filled correctly, it shows the correct variation names in a label before the dropdown, but I get this error:
Warning: in_array() expects parameter 2 to be array, object given in […]/wc-template-functions.php on line 2987It shows the dropdown, but just the first blank entry.
If anybody has experienced this error and could help me, or has some tipps how to solve it myself, I would be very happy. I’m trying to solve this problem for the whole day and I’m out of ideas 🙁
Thanks and have a good evening.
Best regards
Alex
The topic ‘Variations Dropdown Form as Snippet’ is closed to new replies.