WC_Product_Variation::variation_is_visible()publicWC 1.0

Checks if this particular variation is visible. Invisible variations are enabled and can be selected, but no price / stock info is displayed. Instead, a suitable 'unavailable' message is displayed. Invisible by default: Disabled variations and variations with an empty price.

Method of the class: WC_Product_Variation{}

Hooks from the method




$WC_Product_Variation = new WC_Product_Variation();

WC_Product_Variation::variation_is_visible() code WC 8.9.0

public function variation_is_visible() {
	return apply_filters( 'woocommerce_variation_is_visible', 'publish' === get_post_status( $this->get_id() ) && '' !== $this->get_price(), $this->get_id(), $this->get_parent_id(), $this );