infocse
Forum Replies Created
-
Works perfectly!
Thank you so much @lorroThank you very much @lorro, it works!
The only problem now is that
array_shiftexcludes the name of the other categories
from the function.
ex.product 1 (category:red) product 2 (categories:green,red,yellow) $single_cat = array_shift( $product_cats ); switch ($single_cat->name) { case 'red': // nb no break; case 'blue': echo '<span class="categoria">'.$single_cat->name.'</span>'; break; default: // no action for anything other than red or blue }I can see the name of the category just in the first product,
so I presume that I have to changearray_shiftin something else, or am I wrong?Ok, thank you for your reply
I found the function for categories selection in campaigns.php
at line 2268:'<input data-placeholder="' . __( 'Select...', WYSIJA ) . '" name="category_ids" style="width: 300px" class="category_ids mailpoet-field-select2-terms" data-multiple="true" data-value=\'' . WJ_Utils::esc_json_attr( $_attr_init_selection ) . '\' value="' . esc_attr( implode( ',', $terms_selected ) ) . '" type="hidden">' .I’ve try to change
esc_attr( implode( ',', $terms_selected )inesc_attr( implode( '+', $terms_selected )but nothing is happen 🙁