Permalink
Browse files

Merge pull request #485 from greathmaster/bug-33446

BUG: Level order was not updating from Levels admin page.
  • Loading branch information...
ideadude committed Aug 17, 2017
2 parents 3cea129 + 5d4640b commit 156a5f594f14a4197a083cee1e23db0f04368e86
Showing with 8 additions and 1 deletion.
  1. +8 −1 includes/services.php
View
@@ -94,7 +94,14 @@ function pmpro_get_order_json() {
add_action('wp_ajax_pmpro_get_order_json', 'pmpro_get_order_json');
function pmpro_update_level_order() {
echo pmpro_setOption('level_order');
$level_order = $_POST['level_order'];
//array was passed from ajax, we save it as a comma seperated list
if(is_array($level_order))
$level_order = implode(',', $level_order);
echo pmpro_setOption('level_order', $level_order);
exit;
}
add_action('wp_ajax_pmpro_update_level_order', 'pmpro_update_level_order');

0 comments on commit 156a5f5

Please sign in to comment.