Skip to content

Commit

Permalink
Merge pull request woocommerce#18698 from woocommerce/fix/order-scree…
Browse files Browse the repository at this point in the history
…n-ajax-referer

Ensure the table handler is only loaded once. Prevents multiple loads if a plugin calls check_ajax_referer many times.
  • Loading branch information
claudiulodro committed Jan 31, 2018
2 parents a370a4c + 57c0070 commit c7c4ec9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/admin/class-wc-admin-post-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ public function setup_screen() {
new WC_Admin_List_Table_Products();
break;
}

// Ensure the table handler is only loaded once. Prevents multiple loads if a plugin calls check_ajax_referer many times.
remove_action( 'current_screen', array( $this, 'setup_screen' ) );
remove_action( 'check_ajax_referer', array( $this, 'setup_screen' ) );
}

/**
Expand Down

0 comments on commit c7c4ec9

Please sign in to comment.