WC_Product_Variable::child_has_dimensions()publicWC 1.0

Does a child have dimensions set?

Метод класса: WC_Product_Variable{}

Хуков нет.

Возвращает

true|false.

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

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

Код WC_Product_Variable::child_has_dimensions() WC 9.3.3

public function child_has_dimensions() {
	$transient_name = 'wc_child_has_dimensions_' . $this->get_id();
	$has_dimension  = get_transient( $transient_name );

	if ( false === $has_dimension ) {
		$has_dimension = $this->data_store->child_has_dimensions( $this );
		set_transient( $transient_name, (int) $has_dimension, DAY_IN_SECONDS * 30 );
	}

	return (bool) $has_dimension;
}