|
@@ 2204-2206 (lines=3) @@
|
| 2201 |
|
check_ajax_referer( 'load-variations', 'security' ); |
| 2202 |
|
|
| 2203 |
|
// Check permissions again and make sure we have what we need |
| 2204 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) { |
| 2205 |
|
die( -1 ); |
| 2206 |
|
} |
| 2207 |
|
|
| 2208 |
|
global $post; |
| 2209 |
|
|
|
@@ 2359-2361 (lines=3) @@
|
| 2356 |
|
check_ajax_referer( 'save-variations', 'security' ); |
| 2357 |
|
|
| 2358 |
|
// Check permissions again and make sure we have what we need |
| 2359 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) { |
| 2360 |
|
die( -1 ); |
| 2361 |
|
} |
| 2362 |
|
|
| 2363 |
|
// Remove previous meta box errors |
| 2364 |
|
WC_Admin_Meta_Boxes::$meta_box_errors = array(); |
|
@@ 2772-2774 (lines=3) @@
|
| 2769 |
|
check_ajax_referer( 'bulk-edit-variations', 'security' ); |
| 2770 |
|
|
| 2771 |
|
// Check permissions again and make sure we have what we need |
| 2772 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) { |
| 2773 |
|
die( -1 ); |
| 2774 |
|
} |
| 2775 |
|
|
| 2776 |
|
$product_id = absint( $_POST['product_id'] ); |
| 2777 |
|
$bulk_action = wc_clean( $_POST['bulk_action'] ); |