WordPress at a glance
function is not described

WC_Product_Variation::variation_is_visible() public WC 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.

{} It's a method of the class: WC_Product_Variation{}

Hooks from the method

true|false. Nothing.


$WC_Product_Variation = new WC_Product_Variation();

Code of WC_Product_Variation::variation_is_visible() WC 5.3.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 );