I Want a More Concice Form of Data than an Array

Instead of going for a complex nested array, I decided that it might be best to keep it to simple two level set of arrays. $x = array( 101 => [ (int $parent_id), (bool $completed) ], 102 => [ (int $parent_id), (bool $completed) ], 103 => [ (int $parent_id), (bool $completed) ], 104 => [ … Read more

Editing the term_order field

Did it yourself. If someone needs: // Adding a field to sort on the category edit page add_action( ‘product_cat_edit_form_fields’, ‘product_cat_edit_category’, 5 ); function product_cat_edit_category( $term ) { $term_order = get_term( $term->term_id, ‘product_cat’ ); ?> <tr> <th scope=”row”><label for=”description”>Сортировка</label></th> <td><input type=”text” name=”term_order” value=”<?php echo $term_order->term_order; ?>”></td> </tr> <?php } // Update term_order value when saving taxonomy … Read more