LLMS_Product::get_catalog_visibility()

Retrieve the product’s catalog visibility term.


Return Return

(string)


Top ↑

Source Source

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

173
174
175
176
177
178
179
180
181
182
183
184
185
public function get_catalog_visibility() {
 
    $terms = wp_get_post_terms( $this->get( 'id' ), 'llms_product_visibility' );
 
    if ( $terms && is_array( $terms ) ) {
        $obj = $terms[0];
        if ( isset( $obj->name ) ) {
            return $obj->name;
        }
    }
 
    return 'catalog_search';
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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