Merge pull request #18698 from woocommerce/fix/order-screen-ajax-referer

Ensure the table handler is only loaded once. Prevents multiple loads if a plugin calls check_ajax_referer many times.
This commit is contained in:
Claudiu Lodromanean 2018-01-31 07:47:27 -08:00 committed by GitHub
commit c7c4ec93d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -101,6 +101,10 @@ class WC_Admin_Post_Types {
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' ) );
}
/**