WC_Product_Variable::before_data_store_save_or_update()
Do any extra processing needed before the actual product save (but after triggering the 'woocommerce_before_..._object_save' action)
Метод класса: WC_Product_Variable{}
Хуков нет.
Возвращает
Разное
. A state value that will be passed to after_data_store_save_or_update.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->before_data_store_save_or_update();
Код WC_Product_Variable::before_data_store_save_or_update() WC Product Variable::before data store save or update WC 8.7.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, ); }