LLMS_Product::set_catalog_visibility( string $visibility )
Update the product’s catalog visibility setting.
Parameters Parameters
- $visibility
-
(string) (Required) Visibility term name.
Return Return
(void)
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 ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.6.0 | |
3.37.17 | Introduced. |