WC_Abstract_Legacy_Product::__isset()
Magic __isset method for backwards compatibility. Legacy properties which could be accessed directly in the past.
Метод класса: WC_Abstract_Legacy_Product{}
Хуков нет.
Возвращает
true|false
.
Использование
$WC_Abstract_Legacy_Product = new WC_Abstract_Legacy_Product(); $WC_Abstract_Legacy_Product->__isset( $key );
- $key(строка) (обязательный)
- Key name.
Код WC_Abstract_Legacy_Product::__isset() WC Abstract Legacy Product:: isset WC 9.3.1
public function __isset( $key ) { $valid = array( 'id', 'product_attributes', 'visibility', 'sale_price_dates_from', 'sale_price_dates_to', 'post', 'download_type', 'product_image_gallery', 'variation_shipping_class', 'shipping_class', 'total_stock', 'crosssell_ids', 'parent', ); if ( $this->is_type( 'variation' ) ) { $valid = array_merge( $valid, array( 'variation_id', 'variation_data', 'variation_has_stock', 'variation_shipping_class_id', 'variation_has_sku', 'variation_has_length', 'variation_has_width', 'variation_has_height', 'variation_has_weight', 'variation_has_tax_class', 'variation_has_downloadable_files', ) ); } return in_array( $key, array_merge( $valid, array_keys( $this->data ) ) ) || metadata_exists( 'post', $this->get_id(), '_' . $key ) || metadata_exists( 'post', $this->get_parent_id(), '_' . $key ); }