WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

WC_AJAX::bulk_edit_variations() public WC 1.0

Bulk edit variations via AJAX.

{} Это метод класса: WC_AJAX{}

Возвращает

Null. Ничего.

Использование

$result = WC_AJAX::bulk_edit_variations();

Код WC_AJAX::bulk_edit_variations() WC 4.7.1

<?php
public static function bulk_edit_variations() {
	ob_start();

	check_ajax_referer( 'bulk-edit-variations', 'security' );

	// Check permissions again and make sure we have what we need.
	if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) {
		wp_die( -1 );
	}

	$product_id  = absint( $_POST['product_id'] );
	$bulk_action = wc_clean( wp_unslash( $_POST['bulk_action'] ) );
	$data        = ! empty( $_POST['data'] ) ? wc_clean( wp_unslash( $_POST['data'] ) ) : array();
	$variations  = array();

	if ( apply_filters( 'woocommerce_bulk_edit_variations_need_children', true ) ) {
		$variations = get_posts(
			array(
				'post_parent'    => $product_id,
				'posts_per_page' => -1,
				'post_type'      => 'product_variation',
				'fields'         => 'ids',
				'post_status'    => array( 'publish', 'private' ),
			)
		);
	}

	if ( method_exists( __CLASS__, "variation_bulk_action_$bulk_action" ) ) {
		call_user_func( array( __CLASS__, "variation_bulk_action_$bulk_action" ), $variations, $data );
	} else {
		do_action( 'woocommerce_bulk_edit_variations_default', $bulk_action, $data, $product_id, $variations );
	}

	do_action( 'woocommerce_bulk_edit_variations', $bulk_action, $data, $product_id, $variations );
	WC_Product_Variable::sync( $product_id );
	wc_delete_product_transients( $product_id );
	wp_die();
}