Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_AJAX::variation_bulk_set( array $variations, string $field, string $value )
Bulk set convenience function.
Description Description
Parameters Parameters
- $variations
-
(Required) List of variations.
- $field
-
(Required) Field to set.
- $value
-
(Required) to set.
Source Source
File: includes/class-wc-ajax.php
private static function variation_bulk_set( $variations, $field, $value ) { foreach ( $variations as $variation_id ) { $variation = wc_get_product( $variation_id ); $variation->{ "set_$field" }( wc_clean( $value ) ); $variation->save(); } }