WordPress at Your Fingertips
function is not described

WC_Product_Variable::before_data_store_save_or_update() protected WC 1.0

Do any extra processing needed before the actual product save (but after triggering the 'woocommerce_before_..._object_save' action)

{} It's a method of the class: WC_Product_Variable{}

No Hooks.


Mixed. A state value that will be passed to after_data_store_save_or_update.


// protected - for code of main (parent) or child class
$result = $this->before_data_store_save_or_update();

Code of WC_Product_Variable::before_data_store_save_or_update() WC 5.6.0

protected function before_data_store_save_or_update() {
	// Get names before save.
	$previous_name = $this->data['name'];
	$new_name      = $this->get_name( 'edit' );

	return array(
		'previous_name' => $previous_name,
		'new_name'      => $new_name,