|
@@ 2200-2202 (lines=3) @@
|
| 2197 |
|
check_ajax_referer( 'load-variations', 'security' ); |
| 2198 |
|
|
| 2199 |
|
// Check permissions again and make sure we have what we need |
| 2200 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) { |
| 2201 |
|
die( -1 ); |
| 2202 |
|
} |
| 2203 |
|
|
| 2204 |
|
global $post; |
| 2205 |
|
|
|
@@ 2355-2357 (lines=3) @@
|
| 2352 |
|
check_ajax_referer( 'save-variations', 'security' ); |
| 2353 |
|
|
| 2354 |
|
// Check permissions again and make sure we have what we need |
| 2355 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) { |
| 2356 |
|
die( -1 ); |
| 2357 |
|
} |
| 2358 |
|
|
| 2359 |
|
// Remove previous meta box errors |
| 2360 |
|
WC_Admin_Meta_Boxes::$meta_box_errors = array(); |
|
@@ 2768-2770 (lines=3) @@
|
| 2765 |
|
check_ajax_referer( 'bulk-edit-variations', 'security' ); |
| 2766 |
|
|
| 2767 |
|
// Check permissions again and make sure we have what we need |
| 2768 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) { |
| 2769 |
|
die( -1 ); |
| 2770 |
|
} |
| 2771 |
|
|
| 2772 |
|
$product_id = absint( $_POST['product_id'] ); |
| 2773 |
|
$bulk_action = wc_clean( $_POST['bulk_action'] ); |