WC_Product_Variable::child_has_dimensions()publicWC 1.0

Does a child have dimensions set?

Method of the class: WC_Product_Variable{}

No Hooks.

Return

true|false.

Usage

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

WC_Product_Variable::child_has_dimensions() code WC 9.4.2

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;
}