LLMS_Product::set_catalog_visibility( string $visibility )

Update the product’s catalog visibility setting.


Parameters Parameters

$visibility

(string) (Required) Visibility term name.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/models/model.llms.product.php

	public function set_catalog_visibility( $visibility ) {
		if ( ! in_array( $visibility, array_keys( llms_get_product_visibility_options() ), true ) ) {
			return;
		}
		wp_set_object_terms( $this->get( 'id' ), $visibility, 'llms_product_visibility', false );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.6.0
3.37.17 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.