/** * WP eCommerce edit and add product category page functions * * These are the main WPMLM Admin functions * * @package wp-e-commerce * @since 3.7 */ function wpmlm_ajax_set_category_order() { global $wpdb; $sort_order = $_POST['sort_order']; $parent_id = $_POST['parent_id']; $result = true; foreach ($sort_order as $key => $value) { if (empty($value)) { continue; } $value = preg_replace('/[^0-9]/', '', $value); if (!wpmlm_update_meta($value, 'sort_order', $key, 'wpmlm_category')) { $result = false; } } }
function wpmlm_update_categorymeta($cart_id, $meta_key, $meta_value) { return wpmlm_update_meta($cart_id, $meta_key, $meta_value, 'wpmlm_category'); }