WC_Product_Variable::validate_props()publicWC 3.0.0

Ensure properties are set correctly before save.

Method of the class: WC_Product_Variable{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Product_Variable = new WC_Product_Variable();
$WC_Product_Variable->validate_props();

Changelog

Since 3.0.0 Introduced.

WC_Product_Variable::validate_props() code WC 9.4.2

public function validate_props() {
	parent::validate_props();

	if ( ! $this->get_manage_stock() ) {
		$this->data_store->sync_stock_status( $this );
	}
}