- ⧉⌕$input WC_Order_Item_Product (14)
- Properties (14)
- Available methods (80)
- ⧉protected extra_data -> array (9)
- product_id => integer 0
- variation_id => integer 0
- quantity => integer 1
- tax_class => string (0) ""
- subtotal => integer 0
- subtotal_tax => integer 0
- total => integer 0
- total_tax => integer 0
- ⧉taxes => array (2)
- subtotal => array (0)
- total => array (0)
- ⧉protected data -> array (11)
- order_id => integer 0
- name => string (0) ""
- product_id => integer 0
- variation_id => integer 0
- quantity => integer 1
- tax_class => string (0) ""
- subtotal => integer 0
- subtotal_tax => integer 0
- total => integer 0
- total_tax => integer 0
- ⧉taxes => array (2)
- subtotal => array (0)
- total => array (0)
- protected cache_group -> string (11) "order-items"
- protected meta_type -> string (10) "order_item"
- protected object_type -> string (10) "order_item"
- protected id -> integer 0
- ⧉protected changes -> array (8)
- quantity => integer 3
- subtotal => string (3) "432"
- total => string (3) "432"
- subtotal_tax => string (5) "28.08"
- total_tax => string (5) "28.08"
- ⧉taxes => array (2)
- ⧉total => array (1)
- 2 => string (5) "28.08"
- ⧉subtotal => array (1)
- 2 => string (5) "28.08"
- ⧉name => string (79) "UNIVERSAL FL - CHILD | 1 DAY | 1 PARK | BASE Ticket | VALID: 03/16/2023 (Thu)"
UNIVERSAL FL - CHILD | 1 DAY | 1 PARK | BASE Ticket | VALID: 03/16/2023 (Thu)
- product_id => integer 5412
- protected object_read -> boolean true
- ⧉protected default_data -> array (11)
- order_id => integer 0
- name => string (0) ""
- product_id => integer 0
- variation_id => integer 0
- quantity => integer 1
- tax_class => string (0) ""
- subtotal => integer 0
- subtotal_tax => integer 0
- total => integer 0
- total_tax => integer 0
- ⧉taxes => array (2)
- subtotal => array (0)
- total => array (0)
- ⧉protected data_store -> WC_Data_Store (4)
- Properties (4)
- Available methods (12)
- ⧉private instance -> WC_Order_Item_Product_Data_Store (4)
- Properties (4)
- Available methods (28)
- ⧉protected internal_meta_keys -> array (9)
- 0 => string (11) "_product_id"
- 1 => string (13) "_variation_id"
- 2 => string (4) "_qty"
- 3 => string (10) "_tax_class"
- 4 => string (14) "_line_subtotal"
- 5 => string (18) "_line_subtotal_tax"
- 6 => string (11) "_line_total"
- 7 => string (9) "_line_tax"
- 8 => string (14) "_line_tax_data"
- protected meta_type -> string (10) "order_item"
- protected object_id_field_for_meta -> string (13) "order_item_id"
- protected must_exist_meta_keys -> array (0)
- ⧉public read(&$item) Read/populate data properties specific to this order item.
/** * Read/populate data properties specific to this order item. * * @since 3.0.0 * @param WC_Order_Item_Product $item Product order item object. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-order-item-product-data-store.php:33
- ⧉public save_item_data(&$item) Saves an item's data to the database / item meta. Ran after both create and upda...
/** * Saves an item's data to the database / item meta. * Ran after both create and update, so $id will be set. * * @since 3.0.0 * @param WC_Order_Item_Product $item Product order item object. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-order-item-product-data-store.php:57
- ⧉public get_download_ids($item, $order): array Get a list of download IDs for a specific item from an order.
/** * Get a list of download IDs for a specific item from an order. * * @since 3.0.0 * @param WC_Order_Item_Product $item Product order item object. * @param WC_Order $order Order object. * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-order-item-product-data-store.php:86
- ⧉public create(&$item) Create a new order item in the database.
/** * Create a new order item in the database. * * @since 3.0.0 * @param WC_Order_Item $item Order item object. */ Inherited from Abstract_WC_Order_Item_Type_Data_Store Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-item-type-data-store.php:43
- ⧉public update(&$item) Update a order item in the database.
/** * Update a order item in the database. * * @since 3.0.0 * @param WC_Order_Item $item Order item object. */ Inherited from Abstract_WC_Order_Item_Type_Data_Store Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-item-type-data-store.php:69
- ⧉public delete(&$item, $args = array()) Remove an order item from the database.
/** * Remove an order item from the database. * * @since 3.0.0 * @param WC_Order_Item $item Order item object. * @param array $args Array of args to pass to the delete method. */ Inherited from Abstract_WC_Order_Item_Type_Data_Store Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-item-type-data-store.php:101
- ⧉public clear_cache(&$item) Clear meta cache.
/** * Clear meta cache. * * @param WC_Order_Item $item Order item object. */ Inherited from Abstract_WC_Order_Item_Type_Data_Store Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-item-type-data-store.php:161
- ⧉public read_meta(&$object): array Returns an array of meta for an object.
/** * Returns an array of meta for an object. * * @since 3.0.0 * @param WC_Data $object WC_Data object. * @return array */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:83
- ⧉public filter_raw_meta_data(&$object, $raw_meta_data): mixed|void Helper method to filter internal meta keys from all meta data rows for the objec...
/** * Helper method to filter internal meta keys from all meta data rows for the object. * * @since 4.7.0 * * @param WC_Data $object WC_Data object. * @param array $raw_meta_data Array of std object of meta data to be filtered. * * @return mixed|void */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:110
- ⧉public delete_meta(&$object, $meta) Deletes meta based on meta ID.
/** * Deletes meta based on meta ID. * * @since 3.0.0 * @param WC_Data $object WC_Data object. * @param stdClass $meta (containing at least ->id). */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:123
- ⧉public add_meta(&$object, $meta): int meta ID Add new piece of meta.
/** * Add new piece of meta. * * @since 3.0.0 * @param WC_Data $object WC_Data object. * @param stdClass $meta (containing ->key and ->value). * @return int meta ID */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:135
- ⧉public update_meta(&$object, $meta) Update meta.
/** * Update meta. * * @since 3.0.0 * @param WC_Data $object WC_Data object. * @param stdClass $meta (containing ->id, ->key and ->value). */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:146
- ⧉public parse_date_for_wp_query($query_var, $key, $wp_query_args = array()): array Modified $wp_query_args Map a valid date query var to WP_Query arguments. Valid date formats: YYYY-MM-DD...
/** * Map a valid date query var to WP_Query arguments. * Valid date formats: YYYY-MM-DD or timestamp, possibly combined with an operator from $valid_operators. * Also accepts a WC_DateTime object. * * @since 3.2.0 * @param mixed $query_var A valid date format. * @param string $key meta or db column key. * @param array $wp_query_args WP_Query args. * @return array Modified $wp_query_args */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:334
- ⧉public get_internal_meta_keys(): array Return list of internal meta keys.
/** * Return list of internal meta keys. * * @since 3.2.0 * @return array */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:497
- ⧉public delete_from_lookup_table($id, $table) Delete lookup table data for an ID.
/** * Delete lookup table data for an ID. * * @since 3.6.0 * @param int $id ID of object to update. * @param string $table Lookup table name. */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:626
- ⧉protected get_term_ids($object, $taxonomy): array of terms Get and store terms from a taxonomy.
/** * Get and store terms from a taxonomy. * * @since 3.0.0 * @param WC_Data|integer $object WC_Data object or object ID. * @param string $taxonomy Taxonomy name e.g. product_cat. * @return array of terms */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:63
- ⧉protected get_db_info(): array Array elements: table, object_id_field, meta_id_field Table structure is slightly different between meta types, this function will ret...
/** * Table structure is slightly different between meta types, this function will return what we need to know. * * @since 3.0.0 * @return array Array elements: table, object_id_field, meta_id_field */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:156
- ⧉protected prefix_key($key): string Internal meta keys we don't want exposed as part of meta_data. This is in additi...
/** * Internal meta keys we don't want exposed as part of meta_data. This is in * addition to all data props with _ prefix. * * @since 2.6.0 * * @param string $key Prefix to be added to meta keys. * @return string */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:196
- ⧉protected exclude_internal_meta_keys($meta): bool Callback to remove unwanted meta data.
/** * Callback to remove unwanted meta data. * * @param object $meta Meta object to check if it should be excluded or not. * @return bool */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:206
- ⧉protected get_props_to_update($object, $meta_key_to_props, $meta_type = 'post'): array A mapping of meta keys => prop names, filtered by ones that should be updated. Gets a list of props and meta keys that need updated based on change state or if...
/** * Gets a list of props and meta keys that need updated based on change state * or if they are present in the database or not. * * @param WC_Data $object The WP_Data object (WC_Coupon for coupons, etc). * @param array $meta_key_to_props A mapping of meta keys => prop names. * @param string $meta_type The internal WP meta type (post, user, etc). * @return array A mapping of meta keys => prop names, filtered by ones that should be updated. */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:219
- ⧉protected update_or_delete_post_meta($object, $meta_key, $meta_value): bool True if updated/deleted. Update meta data in, or delete it from, the database.
/** * Update meta data in, or delete it from, the database. * * Avoids storing meta when it's either an empty string or empty array. * Other empty values such as numeric 0 and null should still be stored. * Data-stores can force meta to exist using `must_exist_meta_keys`. * * Note: WordPress `get_metadata` function returns an empty string when meta data does not exist. * * @param WC_Data $object The WP_Data object (WC_Coupon for coupons, etc). * @param string $meta_key Meta key to update. * @param mixed $meta_value Value to save. * * @since 3.6.0 Added to prevent empty meta being stored unless required. * * @return bool True if updated/deleted. */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:250
- ⧉protected get_wp_query_args($query_vars): array Get valid WP_Query args from a WC_Object_Query's query variables.
/** * Get valid WP_Query args from a WC_Object_Query's query variables. * * @since 3.1.0 * @param array $query_vars query vars from a WC_Object_Query. * @return array */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:267
- ⧉protected get_valid_search_terms($terms): array Terms that are not stopwords. Check if the terms are suitable for searching.
/** * Check if the terms are suitable for searching. * * Uses an array of stopwords (terms) that are excluded from the separate * term matching when searching for posts. The list of English stopwords is * the approximate search engines list, and is translatable. * * @since 3.4.0 * @param array $terms Terms to check. * @return array Terms that are not stopwords. */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:512
- ⧉protected get_search_stopwords(): array Stopwords. Retrieve stopwords used when parsing search terms.
/** * Retrieve stopwords used when parsing search terms. * * @since 3.4.0 * @return array Stopwords. */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:545
- ⧉protected get_data_for_lookup_table($id, $table): array Get data to save to a lookup table.
/** * Get data to save to a lookup table. * * @since 3.6.0 * @param int $id ID of object to update. * @param string $table Lookup table name. * @return array */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:573
- ⧉protected get_primary_key_for_lookup_table($table): string Get primary key name for lookup table.
/** * Get primary key name for lookup table. * * @since 3.6.0 * @param string $table Lookup table name. * @return string */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:584
- ⧉protected update_lookup_table($id, $table): NULL Update a lookup table for an object.
/** * Update a lookup table for an object. * * @since 3.6.0 * @param int $id ID of object to update. * @param string $table Lookup table name. * * @return NULL */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:597
- ⧉protected string_to_timestamp($time_string): int|null The date string converted to a timestamp or null. Converts a WP post date string into a timestamp.
/** * Converts a WP post date string into a timestamp. * * @since 4.8.0 * * @param string $time_string The WP post date string. * @return int|null The date string converted to a timestamp or null. */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:655
- ⧉private stores -> array (40)
- coupon => string (24) "WC_Coupon_Data_Store_CPT"
- customer => string (22) "WC_Customer_Data_Store"
- customer-download => string (31) "WC_Customer_Download_Data_Store"
- customer-download-log => string (35) "WC_Customer_Download_Log_Data_Store"
- customer-session => string (30) "WC_Customer_Data_Store_Session"
- order => string (23) "WC_Order_Data_Store_CPT"
- order-refund => string (30) "WC_Order_Refund_Data_Store_CPT"
- order-item => string (24) "WC_Order_Item_Data_Store"
- order-item-coupon => string (31) "WC_Order_Item_Coupon_Data_Store"
- order-item-fee => string (28) "WC_Order_Item_Fee_Data_Store"
- order-item-product => string (32) "WC_Order_Item_Product_Data_Store"
- order-item-shipping => string (33) "WC_Order_Item_Shipping_Data_Store"
- order-item-tax => string (28) "WC_Order_Item_Tax_Data_Store"
- payment-token => string (27) "WC_Payment_Token_Data_Store"
- product => string (25) "WC_Product_Data_Store_CPT"
- product-grouped => string (33) "WC_Product_Grouped_Data_Store_CPT"
- product-variable => string (34) "WC_Product_Variable_Data_Store_CPT"
- product-variation => string (35) "WC_Product_Variation_Data_Store_CPT"
- shipping-zone => string (27) "WC_Shipping_Zone_Data_Store"
- webhook => string (21) "WC_Webhook_Data_Store"
- report-revenue-stats => string (63) "Automattic\WooCommerce\Admin\API\Reports\Orders\Stats\DataStore"
- report-orders => string (57) "Automattic\WooCommerce\Admin\API\Reports\Orders\DataStore"
- report-orders-stats => string (63) "Automattic\WooCommerce\Admin\API\Reports\Orders\Stats\DataStore"
- report-products => string (59) "Automattic\WooCommerce\Admin\API\Reports\Products\DataStore"
- report-variations => string (61) "Automattic\WooCommerce\Admin\API\Reports\Variations\DataStore"
- report-products-stats => string (65) "Automattic\WooCommerce\Admin\API\Reports\Products\Stats\DataStore"
- report-variations-stats => string (67) "Automattic\WooCommerce\Admin\API\Reports\Variations\Stats\DataStore"
- report-categories => string (61) "Automattic\WooCommerce\Admin\API\Reports\Categories\DataStore"
- report-taxes => string (56) "Automattic\WooCommerce\Admin\API\Reports\Taxes\DataStore"
- report-taxes-stats => string (62) "Automattic\WooCommerce\Admin\API\Reports\Taxes\Stats\DataStore"
- report-coupons => string (58) "Automattic\WooCommerce\Admin\API\Reports\Coupons\DataStore"
- report-coupons-stats => string (64) "Automattic\WooCommerce\Admin\API\Reports\Coupons\Stats\DataStore"
- report-downloads => string (60) "Automattic\WooCommerce\Admin\API\Reports\Downloads\DataStore"
- report-downloads-stats => string (66) "Automattic\WooCommerce\Admin\API\Reports\Downloads\Stats\DataStore"
- admin-note => string (44) "Automattic\WooCommerce\Admin\Notes\DataStore"
- report-customers => string (60) "Automattic\WooCommerce\Admin\API\Reports\Customers\DataStore"
- report-customers-stats => string (66) "Automattic\WooCommerce\Admin\API\Reports\Customers\Stats\DataStore"
- report-stock-stats => string (62) "Automattic\WooCommerce\Admin\API\Reports\Stock\Stats\DataStore"
- wishlist => string (29) "YITH_WCWL_Wishlist_Data_Store"
- wishlist-item => string (34) "YITH_WCWL_Wishlist_Item_Data_Store"
- private current_class_name -> string (32) "WC_Order_Item_Product_Data_Store"
- private object_type -> string (18) "order-item-product"
- ⧉public __construct($object_type) Tells WC_Data_Store which object (coupon, product, order, etc) store we want to ...
/** * Tells WC_Data_Store which object (coupon, product, order, etc) * store we want to work with. * * @throws Exception When validation fails. * @param string $object_type Name of object. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:80
- ⧉public __sleep(): array Only store the object type to avoid serializing the data store instance.
/** * Only store the object type to avoid serializing the data store instance. * * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:116
- ⧉public __wakeup() Re-run the constructor with the object type.
/** * Re-run the constructor with the object type. * * @throws Exception When validation fails. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:125
- ⧉public get_current_class_name(): string Returns the class name of the current data store.
/** * Returns the class name of the current data store. * * @since 3.0.0 * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:148
- ⧉public read(&$data) Reads an object from the data store.
/** * Reads an object from the data store. * * @since 3.0.0 * @param WC_Data $data WooCommerce data instance. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:158
- ⧉public read_multiple(&$objects = array()) Reads multiple objects from the data store.
/** * Reads multiple objects from the data store. * * @since 6.9.0 * @param array[WC_Data] $objects Array of object instances to read. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:168
- ⧉public create(&$data) Create an object in the data store.
/** * Create an object in the data store. * * @since 3.0.0 * @param WC_Data $data WooCommerce data instance. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:185
- ⧉public update(&$data) Update an object in the data store.
/** * Update an object in the data store. * * @since 3.0.0 * @param WC_Data $data WooCommerce data instance. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:195
- ⧉public delete(&$data, $args = array()) Delete an object from the data store.
/** * Delete an object from the data store. * * @since 3.0.0 * @param WC_Data $data WooCommerce data instance. * @param array $args Array of args to pass to the delete method. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:206
- ⧉public __call($method, $parameters): mixed Data stores can define additional functions (for example, coupons have some help...
/** * Data stores can define additional functions (for example, coupons have * some helper methods for increasing or decreasing usage). This passes * through to the instance if that function exists. * * @since 3.0.0 * @param string $method Method. * @param mixed $parameters Parameters. * @return mixed */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:220
- ⧉public has_callable(string $method): bool Check if the data store we are working with has a callable method.
/** * Check if the data store we are working with has a callable method. * * @param string $method Method name. * * @return bool Whether the passed method is callable. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:235
- ⇄⧉public static load($object_type): WC_Data_Store Loads a data store.\WC_Data_Store::load($object_type)
/** * Loads a data store. * * @param string $object_type Name of object. * * @since 3.0.0 * @throws Exception When validation fails. * @return WC_Data_Store */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:138
- ⧉protected meta_data -> array (3)
- ⧉0 => WC_Meta_Data (2)
- Properties (2)
- Available methods (8)
- ⧉protected current_data -> array (3)
- key => string (11) "full_name_1"
- value => string (8) "gregesgr"
- id => boolean false
- ⧉protected data -> array (3)
- key => string (11) "full_name_1"
- value => string (8) "gregesgr"
- id => boolean false
- ⧉public __construct($meta = array()) Constructor.
/** * Constructor. * * @param array $meta Data to wrap behind this function. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:40
- ⧉public jsonSerialize(): object|array When converted to JSON.
/** * When converted to JSON. * * @return object|array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:51
- ⧉public apply_changes() Merge changes with data and clear.
/** * Merge changes with data and clear. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:58
- ⧉public __set($key, $value) Creates or updates a property in the metadata object.
/** * Creates or updates a property in the metadata object. * * @param string $key Key to set. * @param mixed $value Value to set. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:68
- ⧉public __isset($key): bool Checks if a given key exists in our data. This is called internally by `empty` a...
/** * Checks if a given key exists in our data. This is called internally * by `empty` and `isset`. * * @param string $key Key to check if set. * * @return bool */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:80
- ⧉public __get($key): mixed Property value or NULL if it does not exists Returns the value of any property.
/** * Returns the value of any property. * * @param string $key Key to get. * @return mixed Property value or NULL if it does not exists */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:90
- ⧉public get_changes(): array Return data changes only.
/** * Return data changes only. * * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:102
- ⧉public get_data(): array Return all data as an array.
/** * Return all data as an array. * * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:117
- ⧉1 => WC_Meta_Data (2)
- Properties (2)
- Available methods (8)
- ⧉protected current_data -> array (3)
- key => string (11) "full_name_2"
- value => string (9) "gregergre"
- id => boolean false
- ⧉protected data -> array (3)
- key => string (11) "full_name_2"
- value => string (9) "gregergre"
- id => boolean false
- ⧉public __construct($meta = array()) Constructor.
/** * Constructor. * * @param array $meta Data to wrap behind this function. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:40
- ⧉public jsonSerialize(): object|array When converted to JSON.
/** * When converted to JSON. * * @return object|array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:51
- ⧉public apply_changes() Merge changes with data and clear.
/** * Merge changes with data and clear. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:58
- ⧉public __set($key, $value) Creates or updates a property in the metadata object.
/** * Creates or updates a property in the metadata object. * * @param string $key Key to set. * @param mixed $value Value to set. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:68
- ⧉public __isset($key): bool Checks if a given key exists in our data. This is called internally by `empty` a...
/** * Checks if a given key exists in our data. This is called internally * by `empty` and `isset`. * * @param string $key Key to check if set. * * @return bool */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:80
- ⧉public __get($key): mixed Property value or NULL if it does not exists Returns the value of any property.
/** * Returns the value of any property. * * @param string $key Key to get. * @return mixed Property value or NULL if it does not exists */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:90
- ⧉public get_changes(): array Return data changes only.
/** * Return data changes only. * * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:102
- ⧉public get_data(): array Return all data as an array.
/** * Return all data as an array. * * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:117
- ⧉2 => WC_Meta_Data (2)
- Properties (2)
- Available methods (8)
- ⧉protected current_data -> array (3)
- key => string (11) "full_name_3"
- value => string (6) "gerger"
- id => boolean false
- ⧉protected data -> array (3)
- key => string (11) "full_name_3"
- value => string (6) "gerger"
- id => boolean false
- ⧉public __construct($meta = array()) Constructor.
/** * Constructor. * * @param array $meta Data to wrap behind this function. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:40
- ⧉public jsonSerialize(): object|array When converted to JSON.
/** * When converted to JSON. * * @return object|array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:51
- ⧉public apply_changes() Merge changes with data and clear.
/** * Merge changes with data and clear. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:58
- ⧉public __set($key, $value) Creates or updates a property in the metadata object.
/** * Creates or updates a property in the metadata object. * * @param string $key Key to set. * @param mixed $value Value to set. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:68
- ⧉public __isset($key): bool Checks if a given key exists in our data. This is called internally by `empty` a...
/** * Checks if a given key exists in our data. This is called internally * by `empty` and `isset`. * * @param string $key Key to check if set. * * @return bool */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:80
- ⧉public __get($key): mixed Property value or NULL if it does not exists Returns the value of any property.
/** * Returns the value of any property. * * @param string $key Key to get. * @return mixed Property value or NULL if it does not exists */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:90
- ⧉public get_changes(): array Return data changes only.
/** * Return data changes only. * * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:102
- ⧉public get_data(): array Return all data as an array.
/** * Return all data as an array. * * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-meta-data.php:117
- protected legacy_datastore_props -> array (0)
- ⇄⧉public legacy_values -> array (12)$input->legacy_values
- ⇄key => string (32) "56dc0997d871e9177069bb472574eb29"$input->legacy_values['key']
- ⇄product_id => integer 5412$input->legacy_values['product_id']
- ⇄variation_id => integer 0$input->legacy_values['variation_id']
- ⇄variation => array (0)$input->legacy_values['variation']
- ⇄quantity => integer 3$input->legacy_values['quantity']
- ⇄data_hash => string (32) "b5c1d5ca8bae6d4896cf1807cdf763f0"$input->legacy_values['data_hash']
- ⇄⧉line_tax_data => array (2)$input->legacy_values['line_tax_data']
- ⇄⧉subtotal => array (1)$input->legacy_values['line_tax_data']['subtotal']
- ⇄2 => double 28.08$input->legacy_values['line_tax_data']['subtotal'][2]
- ⇄2 => double 28.08
- ⇄⧉total => array (1)$input->legacy_values['line_tax_data']['total']
- ⇄2 => double 28.08$input->legacy_values['line_tax_data']['total'][2]
- ⇄2 => double 28.08
- ⇄⧉subtotal => array (1)
- ⇄line_subtotal => double 432$input->legacy_values['line_subtotal']
- ⇄line_subtotal_tax => double 28.08$input->legacy_values['line_subtotal_tax']
- ⇄line_total => double 432$input->legacy_values['line_total']
- ⇄line_tax => double 28.08$input->legacy_values['line_tax']
- ⇄⧉data => WC_Product_Simple (13)$input->legacy_values['data']
- Properties (13)
- Available methods (239)
- protected object_type -> string (7) "product"
- protected post_type -> string (7) "product"
- protected cache_group -> string (8) "products"
- ⧉protected data -> array (50)
- ⧉name => string (79) "UNIVERSAL FL - CHILD | 1 DAY | 1 PARK | BASE Ticket | VALID: 03/16/2023 (Thu)"
UNIVERSAL FL - CHILD | 1 DAY | 1 PARK | BASE Ticket | VALID: 03/16/2023 (Thu)
- slug => string (37) "universal-studios-florida-tickets-176"
- ⧉date_created => WC_DateTime (4) 2023-03-09 11:59:26+00:00 GMT+0000
- Properties (4)
- Available methods (25)
- Static class properties (13)
- protected utc_offset -> integer 0
- public date -> string (26) "2023-03-09 11:59:26.000000"
- public timezone_type -> integer 1
- public timezone -> string (6) "+00:00"
- ⧉public __toString(): string Output an ISO 8601 date string in local (WordPress) timezone.
/** * Output an ISO 8601 date string in local (WordPress) timezone. * * @since 3.0.0 * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:31
- ⧉public set_utc_offset($offset) Set UTC offset - this is a fixed offset instead of a timezone.
/** * Set UTC offset - this is a fixed offset instead of a timezone. * * @param int $offset Offset. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:40
- ⧉public getOffset() Get UTC offset if set, or default to the DateTime object's offset.
/** * Get UTC offset if set, or default to the DateTime object's offset. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:48
- ⧉public setTimezone($timezone): DateTime Set timezone.
/** * Set timezone. * * @param DateTimeZone $timezone DateTimeZone instance. * @return DateTime */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:59
- ⧉public getTimestamp(): int Missing in PHP 5.2 so just here so it can be supported consistently.
/** * Missing in PHP 5.2 so just here so it can be supported consistently. * * @since 3.0.0 * @return int */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:71
- ⧉public getOffsetTimestamp(): int Get the timestamp with the WordPress timezone offset added or subtracted.
/** * Get the timestamp with the WordPress timezone offset added or subtracted. * * @since 3.0.0 * @return int */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:81
- ⧉public date($format): string Format a date based on the offset timestamp.
/** * Format a date based on the offset timestamp. * * @since 3.0.0 * @param string $format Date format. * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:92
- ⧉public date_i18n($format = 'Y-m-d'): string Return a localised date based on offset timestamp. Wrapper for date_i18n functio...
/** * Return a localised date based on offset timestamp. Wrapper for date_i18n function. * * @since 3.0.0 * @param string $format Date format. * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:103
- public __wakeup()
- public format(string $format)
- public modify(string $modifier)
- public add(DateInterval $interval)
- public sub(DateInterval $interval)
- public getTimezone()
- public setTimestamp(int $timestamp)
- public static __set_state(array $array)
- ⇄public static createFromImmutable(DateTimeImmutable $object)\DateTime::createFromImmutable(DateTimeImmutable $object)
- ⇄public static createFromInterface(DateTimeInterface $object): DateTime\DateTime::createFromInterface(DateTimeInterface $object)
- ⇄public static createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null)\DateTime::createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null)
- ⇄public static getLastErrors()\DateTime::getLastErrors()
- ⇄const ATOM :: string (13) "Y-m-d\TH:i:sP"\WC_DateTime::ATOM
- ⇄const COOKIE :: string (16) "l, d-M-Y H:i:s T"\WC_DateTime::COOKIE
- ⇄const ISO8601 :: string (13) "Y-m-d\TH:i:sO"\WC_DateTime::ISO8601
- ⇄const RFC822 :: string (16) "D, d M y H:i:s O"\WC_DateTime::RFC822
- ⇄const RFC850 :: string (16) "l, d-M-y H:i:s T"\WC_DateTime::RFC850
- ⇄const RFC1036 :: string (16) "D, d M y H:i:s O"\WC_DateTime::RFC1036
- ⇄const RFC1123 :: string (16) "D, d M Y H:i:s O"\WC_DateTime::RFC1123
- ⇄const RFC7231 :: string (21) "D, d M Y H:i:s \G\M\T"\WC_DateTime::RFC7231
- ⇄const RFC2822 :: string (16) "D, d M Y H:i:s O"\WC_DateTime::RFC2822
- ⇄const RFC3339 :: string (13) "Y-m-d\TH:i:sP"\WC_DateTime::RFC3339
- ⇄const RFC3339_EXTENDED :: string (15) "Y-m-d\TH:i:s.vP"\WC_DateTime::RFC3339_EXTENDED
- ⇄const RSS :: string (16) "D, d M Y H:i:s O"\WC_DateTime::RSS
- ⇄const W3C :: string (13) "Y-m-d\TH:i:sP"\WC_DateTime::W3C
- ⇄const ATOM :: string (13) "Y-m-d\TH:i:sP"
- ⧉date_modified => WC_DateTime (4) 2023-03-09 11:59:26+00:00 GMT+0000
- Properties (4)
- Available methods (25)
- Static class properties (13)
- protected utc_offset -> integer 0
- public date -> string (26) "2023-03-09 11:59:26.000000"
- public timezone_type -> integer 1
- public timezone -> string (6) "+00:00"
- ⧉public __toString(): string Output an ISO 8601 date string in local (WordPress) timezone.
/** * Output an ISO 8601 date string in local (WordPress) timezone. * * @since 3.0.0 * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:31
- ⧉public set_utc_offset($offset) Set UTC offset - this is a fixed offset instead of a timezone.
/** * Set UTC offset - this is a fixed offset instead of a timezone. * * @param int $offset Offset. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:40
- ⧉public getOffset() Get UTC offset if set, or default to the DateTime object's offset.
/** * Get UTC offset if set, or default to the DateTime object's offset. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:48
- ⧉public setTimezone($timezone): DateTime Set timezone.
/** * Set timezone. * * @param DateTimeZone $timezone DateTimeZone instance. * @return DateTime */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:59
- ⧉public getTimestamp(): int Missing in PHP 5.2 so just here so it can be supported consistently.
/** * Missing in PHP 5.2 so just here so it can be supported consistently. * * @since 3.0.0 * @return int */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:71
- ⧉public getOffsetTimestamp(): int Get the timestamp with the WordPress timezone offset added or subtracted.
/** * Get the timestamp with the WordPress timezone offset added or subtracted. * * @since 3.0.0 * @return int */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:81
- ⧉public date($format): string Format a date based on the offset timestamp.
/** * Format a date based on the offset timestamp. * * @since 3.0.0 * @param string $format Date format. * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:92
- ⧉public date_i18n($format = 'Y-m-d'): string Return a localised date based on offset timestamp. Wrapper for date_i18n functio...
/** * Return a localised date based on offset timestamp. Wrapper for date_i18n function. * * @since 3.0.0 * @param string $format Date format. * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-datetime.php:103
- public __wakeup()
- public format(string $format)
- public modify(string $modifier)
- public add(DateInterval $interval)
- public sub(DateInterval $interval)
- public getTimezone()
- public setTimestamp(int $timestamp)
- public static __set_state(array $array)
- ⇄public static createFromImmutable(DateTimeImmutable $object)\DateTime::createFromImmutable(DateTimeImmutable $object)
- ⇄public static createFromInterface(DateTimeInterface $object): DateTime\DateTime::createFromInterface(DateTimeInterface $object)
- ⇄public static createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null)\DateTime::createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null)
- ⇄public static getLastErrors()\DateTime::getLastErrors()
- ⇄const ATOM :: string (13) "Y-m-d\TH:i:sP"\WC_DateTime::ATOM
- ⇄const COOKIE :: string (16) "l, d-M-Y H:i:s T"\WC_DateTime::COOKIE
- ⇄const ISO8601 :: string (13) "Y-m-d\TH:i:sO"\WC_DateTime::ISO8601
- ⇄const RFC822 :: string (16) "D, d M y H:i:s O"\WC_DateTime::RFC822
- ⇄const RFC850 :: string (16) "l, d-M-y H:i:s T"\WC_DateTime::RFC850
- ⇄const RFC1036 :: string (16) "D, d M y H:i:s O"\WC_DateTime::RFC1036
- ⇄const RFC1123 :: string (16) "D, d M Y H:i:s O"\WC_DateTime::RFC1123
- ⇄const RFC7231 :: string (21) "D, d M Y H:i:s \G\M\T"\WC_DateTime::RFC7231
- ⇄const RFC2822 :: string (16) "D, d M Y H:i:s O"\WC_DateTime::RFC2822
- ⇄const RFC3339 :: string (13) "Y-m-d\TH:i:sP"\WC_DateTime::RFC3339
- ⇄const RFC3339_EXTENDED :: string (15) "Y-m-d\TH:i:s.vP"\WC_DateTime::RFC3339_EXTENDED
- ⇄const RSS :: string (16) "D, d M Y H:i:s O"\WC_DateTime::RSS
- ⇄const W3C :: string (13) "Y-m-d\TH:i:sP"\WC_DateTime::W3C
- ⇄const ATOM :: string (13) "Y-m-d\TH:i:sP"
- status => string (7) "publish"
- featured => boolean false
- catalog_visibility => string (7) "visible"
- description => string (30) "Valid: VALID: 03/16/2023 (Thu)"
- short_description => string (30) "Valid: VALID: 03/16/2023 (Thu)"
- sku => string (15) "universal151866"
- price => string (6) "153.36"
- regular_price => string (6) "153.36"
- sale_price => string (0) ""
- date_on_sale_from => null
- date_on_sale_to => null
- total_sales => integer 15
- tax_status => string (7) "taxable"
- tax_class => string (0) ""
- manage_stock => boolean false
- stock_quantity => null
- stock_status => string (7) "instock"
- backorders => string (2) "no"
- low_stock_amount => string (0) ""
- sold_individually => boolean false
- weight => string (0) ""
- length => string (0) ""
- width => string (0) ""
- height => string (0) ""
- upsell_ids => array (0)
- cross_sell_ids => array (0)
- parent_id => integer 0
- reviews_allowed => boolean true
- purchase_note => string (0) ""
- attributes => array (0)
- default_attributes => array (0)
- menu_order => integer 0
- post_password => string (0) ""
- virtual => boolean false
- downloadable => boolean false
- ⧉category_ids => array (1)
- 0 => integer 15
- tag_ids => array (0)
- shipping_class_id => integer 0
- downloads => array (0)
- image_id => string (3) "260"
- gallery_image_ids => array (0)
- download_limit => integer -1
- download_expiry => integer -1
- rating_counts => array (0)
- average_rating => string (1) "0"
- review_count => integer 0
- ⧉protected supports -> array (1)
- 0 => string (16) "ajax_add_to_cart"
- protected id -> integer 5412
- protected changes -> array (0)
- protected object_read -> boolean true
- protected extra_data -> array (0)
- ⧉protected default_data -> array (50)
- name => string (0) ""
- slug => string (0) ""
- date_created => null
- date_modified => null
- status => boolean false
- featured => boolean false
- catalog_visibility => string (7) "visible"
- description => string (0) ""
- short_description => string (0) ""
- sku => string (0) ""
- price => string (0) ""
- regular_price => string (0) ""
- sale_price => string (0) ""
- date_on_sale_from => null
- date_on_sale_to => null
- total_sales => string (1) "0"
- tax_status => string (7) "taxable"
- tax_class => string (0) ""
- manage_stock => boolean false
- stock_quantity => null
- stock_status => string (7) "instock"
- backorders => string (2) "no"
- low_stock_amount => string (0) ""
- sold_individually => boolean false
- weight => string (0) ""
- length => string (0) ""
- width => string (0) ""
- height => string (0) ""
- upsell_ids => array (0)
- cross_sell_ids => array (0)
- parent_id => integer 0
- reviews_allowed => boolean true
- purchase_note => string (0) ""
- attributes => array (0)
- default_attributes => array (0)
- menu_order => integer 0
- post_password => string (0) ""
- virtual => boolean false
- downloadable => boolean false
- category_ids => array (0)
- tag_ids => array (0)
- shipping_class_id => integer 0
- downloads => array (0)
- image_id => string (0) ""
- gallery_image_ids => array (0)
- download_limit => integer -1
- download_expiry => integer -1
- rating_counts => array (0)
- average_rating => integer 0
- review_count => integer 0
- ⧉protected data_store -> WC_Data_Store (4)
- Properties (4)
- Available methods (12)
- ⧉private instance -> WC_Product_Data_Store_CPT (6)
- Properties (6)
- Available methods (63)
- ⧉protected internal_meta_keys -> array (42)
- 0 => string (11) "_visibility"
- 1 => string (4) "_sku"
- 2 => string (6) "_price"
- 3 => string (14) "_regular_price"
- 4 => string (11) "_sale_price"
- 5 => string (22) "_sale_price_dates_from"
- 6 => string (20) "_sale_price_dates_to"
- 7 => string (11) "total_sales"
- 8 => string (11) "_tax_status"
- 9 => string (10) "_tax_class"
- 10 => string (13) "_manage_stock"
- 11 => string (6) "_stock"
- 12 => string (13) "_stock_status"
- 13 => string (11) "_backorders"
- 14 => string (17) "_low_stock_amount"
- 15 => string (18) "_sold_individually"
- 16 => string (7) "_weight"
- 17 => string (7) "_length"
- 18 => string (6) "_width"
- 19 => string (7) "_height"
- 20 => string (11) "_upsell_ids"
- 21 => string (14) "_crosssell_ids"
- 22 => string (14) "_purchase_note"
- 23 => string (19) "_default_attributes"
- 24 => string (19) "_product_attributes"
- 25 => string (8) "_virtual"
- 26 => string (13) "_downloadable"
- 27 => string (15) "_download_limit"
- 28 => string (16) "_download_expiry"
- 29 => string (9) "_featured"
- 30 => string (19) "_downloadable_files"
- 31 => string (16) "_wc_rating_count"
- 32 => string (18) "_wc_average_rating"
- 33 => string (16) "_wc_review_count"
- 34 => string (22) "_variation_description"
- 35 => string (13) "_thumbnail_id"
- 36 => string (11) "_file_paths"
- 37 => string (22) "_product_image_gallery"
- 38 => string (16) "_product_version"
- 39 => string (12) "_wp_old_slug"
- 40 => string (10) "_edit_last"
- 41 => string (10) "_edit_lock"
- ⧉protected must_exist_meta_keys -> array (1)
- 0 => string (10) "_tax_class"
- protected extra_data_saved -> boolean false
- protected updated_props -> array (0)
- protected meta_type -> string (4) "post"
- protected object_id_field_for_meta -> string (0) ""
- ⧉public create(&$product) Method to create a new product in the database.
/** * Method to create a new product in the database. * * @param WC_Product $product Product object. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:110
- ⧉public read(&$product) Method to read a product from the database.
/** * Method to read a product from the database. * * @param WC_Product $product Product object. * @throws Exception If invalid product. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:162
- ⧉public update(&$product) Method to update a product in the database.
/** * Method to update a product in the database. * * @param WC_Product $product Product object. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:201
- ⧉public delete(&$product, $args = array()) Method to delete a product from the database.
/** * Method to delete a product from the database. * * @param WC_Product $product Product object. * @param array $args Array of args to pass to the delete method. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:284
- ⧉public read_stock_quantity(&$product, $new_stock = null) Re-reads stock from the DB ignoring changes.
/** * Re-reads stock from the DB ignoring changes. * * @param WC_Product $product Product object. * @param int|float $new_stock New stock level if already read. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:382
- ⧉public get_on_sale_products(): array Returns an array of on sale products, as an array of objects with an ID and pare...
/** * Returns an array of on sale products, as an array of objects with an * ID and parent_id present. Example: $return[0]->id, $return[0]->parent_id. * * @return array * @since 3.0.0 */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:896
- ⧉public get_featured_product_ids(): array Returns a list of product IDs ( id as key => parent as value) that are featured....
/** * Returns a list of product IDs ( id as key => parent as value) that are * featured. Uses get_posts instead of wc_get_products since we want * some extra meta queries and ALL products (posts_per_page = -1). * * @return array * @since 3.0.0 */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:945
- ⧉public is_existing_sku($product_id, $sku): bool Check if product sku is found for any other product IDs.
/** * Check if product sku is found for any other product IDs. * * @since 3.0.0 * @param int $product_id Product ID. * @param string $sku Will be slashed to work around https://core.trac.wordpress.org/ticket/27421. * @return bool */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:980
- ⧉public get_product_id_by_sku($sku): int Return product ID based on SKU.
/** * Return product ID based on SKU. * * @since 3.0.0 * @param string $sku Product SKU. * @return int */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1010
- ⧉public get_starting_sales(): array Returns an array of IDs of products that have sales starting soon.
/** * Returns an array of IDs of products that have sales starting soon. * * @since 3.0.0 * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1039
- ⧉public get_ending_sales(): array Returns an array of IDs of products that have sales which are due to end.
/** * Returns an array of IDs of products that have sales which are due to end. * * @since 3.0.0 * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1065
- ⧉public find_matching_product_variation($product, $match_attributes = array()): int Matching variation ID or 0. Find a matching (enabled) variation within a variable product.
/** * Find a matching (enabled) variation within a variable product. * * @since 3.0.0 * @param WC_Product $product Variable product. * @param array $match_attributes Array of attributes we want to try to match. * @return int Matching variation ID or 0. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1093
- ⧉public create_all_product_variations($product, $limit = -1): int Number of created variations. Creates all possible combinations of variations from the attributes, without cre...
/** * Creates all possible combinations of variations from the attributes, without creating duplicates. * * @since 3.6.0 * @todo Add to interface in 4.0. * @param WC_Product $product Variable product. * @param int $limit Limit the number of created variations. * @return int Number of created variations. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1185
- ⧉public sort_all_product_variations($parent_id) Make sure all variations have a sort order set so they can be reordered correctl...
/** * Make sure all variations have a sort order set so they can be reordered correctly. * * @param int $parent_id Product ID. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1235
- ⧉public get_related_products($cats_array, $tags_array, $exclude_ids, $limit, $product_id): array Return a list of related products (using data like categories and IDs).
/** * Return a list of related products (using data like categories and IDs). * * @since 3.0.0 * @param array $cats_array List of categories IDs. * @param array $tags_array List of tags IDs. * @param array $exclude_ids Excluded IDs. * @param int $limit Limit of results. * @param int $product_id Product ID. * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1264
- ⧉public get_related_products_query($cats_array, $tags_array, $exclude_ids, $limit): array Builds the related posts query.
/** * Builds the related posts query. * * @since 3.0.0 * * @param array $cats_array List of categories IDs. * @param array $tags_array List of tags IDs. * @param array $exclude_ids Excluded IDs. * @param int $limit Limit of results. * * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1292
- ⧉public update_product_stock($product_id_with_stock, $stock_quantity = null, $operation = 'set'): int|float New stock level. Update a product's stock amount directly.
/** * Update a product's stock amount directly. * * Uses queries rather than update_post_meta so we can do this in one query (to avoid stock issues). * Ignores manage stock setting on the product and sets quantities directly in the db: post meta and lookup tables. * Uses locking to update the quantity. If the lock is not acquired, change is lost. * * @since 3.0.0 this supports set, increase and decrease. * @param int $product_id_with_stock Product ID. * @param int|float|null $stock_quantity Stock quantity. * @param string $operation Set, increase and decrease. * @return int|float New stock level. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1381
- ⧉public update_product_sales($product_id, $quantity = null, $operation = 'set') Update a product's sale count directly.
/** * Update a product's sale count directly. * * Uses queries rather than update_post_meta so we can do this in one query for performance. * * @since 3.0.0 this supports set, increase and decrease. * @param int $product_id Product ID. * @param int|null $quantity Quantity. * @param string $operation set, increase and decrease. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1457
- ⧉public update_average_rating($product) Update a products average rating meta.
/** * Update a products average rating meta. * * @since 3.0.0 * @todo Deprecate unused function? * @param WC_Product $product Product object. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1515
- ⧉public update_review_count($product) Update a products review count meta.
/** * Update a products review count meta. * * @since 3.0.0 * @todo Deprecate unused function? * @param WC_Product $product Product object. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1527
- ⧉public update_rating_counts($product) Update a products rating counts.
/** * Update a products rating counts. * * @since 3.0.0 * @todo Deprecate unused function? * @param WC_Product $product Product object. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1538
- ⧉public get_shipping_class_id_by_slug($slug): int|false Get shipping class ID by slug.
/** * Get shipping class ID by slug. * * @since 3.0.0 * @param string $slug Product shipping class slug. * @return int|false */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1549
- ⧉public get_products($args = array()): array|object Returns an array of products.
/** * Returns an array of products. * * @param array $args Args to pass to WC_Product_Query(). * @return array|object * @see wc_get_products */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1565
- ⧉public search_products($term, $type = '', $include_variations = false, $all_statuses = false, $limit = null, $include = null, $exclude = null): array of ids Search product data for a term and return ids.
/** * Search product data for a term and return ids. * * @param string $term Search term. * @param string $type Type of product. * @param bool $include_variations Include variations in search or not. * @param bool $all_statuses Should we search all statuses or limit to published. * @param null|int $limit Limit returned results. @since 3.5.0. * @param null|array $include Keep specific results. @since 3.6.0. * @param null|array $exclude Discard specific results. @since 3.6.0. * @return array of ids */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1582
- ⧉public get_product_type($product_id): bool|string Get the product type based on product ID.
/** * Get the product type based on product ID. * * @since 3.0.0 * @param int $product_id Product ID. * @return bool|string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1727
- ⧉public reviews_allowed_query_where($where, $wp_query): string Add ability to get products by 'reviews_allowed' in WC_Product_Query.
/** * Add ability to get products by 'reviews_allowed' in WC_Product_Query. * * @since 3.2.0 * @param string $where Where clause. * @param WP_Query $wp_query WP_Query instance. * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1759
- ⧉public query($query_vars): array|object Query for Products matching specific criteria.
/** * Query for Products matching specific criteria. * * @since 3.2.0 * * @param array $query_vars Query vars from a WC_Product_Query. * * @return array|object */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:2032
- ⧉public get_query_for_stock($product_id): string|void Query statement. Returns query statement for getting current `_stock` of a product.
/** * Returns query statement for getting current `_stock` of a product. * * @internal MAX function below is used to make sure result is a scalar. * @param int $product_id Product ID. * @return string|void Query statement. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:2119
- ⧉public read_meta(&$object): array Returns an array of meta for an object.
/** * Returns an array of meta for an object. * * @since 3.0.0 * @param WC_Data $object WC_Data object. * @return array */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:83
- ⧉public filter_raw_meta_data(&$object, $raw_meta_data): mixed|void Helper method to filter internal meta keys from all meta data rows for the objec...
/** * Helper method to filter internal meta keys from all meta data rows for the object. * * @since 4.7.0 * * @param WC_Data $object WC_Data object. * @param array $raw_meta_data Array of std object of meta data to be filtered. * * @return mixed|void */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:110
- ⧉public delete_meta(&$object, $meta) Deletes meta based on meta ID.
/** * Deletes meta based on meta ID. * * @since 3.0.0 * @param WC_Data $object WC_Data object. * @param stdClass $meta (containing at least ->id). */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:123
- ⧉public add_meta(&$object, $meta): int meta ID Add new piece of meta.
/** * Add new piece of meta. * * @since 3.0.0 * @param WC_Data $object WC_Data object. * @param stdClass $meta (containing ->key and ->value). * @return int meta ID */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:135
- ⧉public update_meta(&$object, $meta) Update meta.
/** * Update meta. * * @since 3.0.0 * @param WC_Data $object WC_Data object. * @param stdClass $meta (containing ->id, ->key and ->value). */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:146
- ⧉public parse_date_for_wp_query($query_var, $key, $wp_query_args = array()): array Modified $wp_query_args Map a valid date query var to WP_Query arguments. Valid date formats: YYYY-MM-DD...
/** * Map a valid date query var to WP_Query arguments. * Valid date formats: YYYY-MM-DD or timestamp, possibly combined with an operator from $valid_operators. * Also accepts a WC_DateTime object. * * @since 3.2.0 * @param mixed $query_var A valid date format. * @param string $key meta or db column key. * @param array $wp_query_args WP_Query args. * @return array Modified $wp_query_args */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:334
- ⧉public get_internal_meta_keys(): array Return list of internal meta keys.
/** * Return list of internal meta keys. * * @since 3.2.0 * @return array */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:497
- ⧉public delete_from_lookup_table($id, $table) Delete lookup table data for an ID.
/** * Delete lookup table data for an ID. * * @since 3.6.0 * @param int $id ID of object to update. * @param string $table Lookup table name. */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:626
- ⧉protected read_product_data(&$product) Read product data. Can be overridden by child classes to load other props.
/** * Read product data. Can be overridden by child classes to load other props. * * @param WC_Product $product Product object. * @since 3.0.0 */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:323
- ⧉protected read_extra_data(&$product) Read extra data associated with the product, like button text or product URL for...
/** * Read extra data associated with the product, like button text or product URL for external products. * * @param WC_Product $product Product object. * @since 3.0.0 */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:395
- ⧉protected read_visibility(&$product) Convert visibility terms to props. Catalog visibility valid values are 'visible'...
/** * Convert visibility terms to props. * Catalog visibility valid values are 'visible', 'catalog', 'search', and 'hidden'. * * @param WC_Product $product Product object. * @since 3.0.0 */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:411
- ⧉protected read_attributes(&$product) Read attributes from post meta.
/** * Read attributes from post meta. * * @param WC_Product $product Product object. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:441
- ⧉protected read_downloads(&$product) Read downloads from post meta.
/** * Read downloads from post meta. * * @param WC_Product $product Product object. * @since 3.0.0 */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:490
- ⧉protected update_post_meta(&$product, $force = false) Helper method that updates all the post meta for a product based on it's setting...
/** * Helper method that updates all the post meta for a product based on it's settings in the WC_Product class. * * @param WC_Product $product Product object. * @param bool $force Force update. Used during create. * @since 3.0.0 */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:516
- ⧉protected handle_updated_props(&$product) Handle updated meta props after updating meta data.
/** * Handle updated meta props after updating meta data. * * @since 3.0.0 * @param WC_Product $product Product Object. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:639
- ⧉protected update_terms(&$product, $force = false) For all stored terms in all taxonomies, save them to the DB.
/** * For all stored terms in all taxonomies, save them to the DB. * * @param WC_Product $product Product object. * @param bool $force Force update. Used during create. * @since 3.0.0 */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:695
- ⧉protected update_visibility(&$product, $force = false) Update visibility terms based on props.
/** * Update visibility terms based on props. * * @since 3.0.0 * * @param WC_Product $product Product object. * @param bool $force Force update. Used during create. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:725
- ⧉protected update_attributes(&$product, $force = false) Update attributes which are a mix of terms and meta data.
/** * Update attributes which are a mix of terms and meta data. * * @param WC_Product $product Product object. * @param bool $force Force update. Used during create. * @since 3.0.0 */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:771
- ⧉protected update_downloads(&$product, $force = false): bool If updated or not. Update downloads.
/** * Update downloads. * * @since 3.0.0 * @param WC_Product $product Product object. * @param bool $force Force update. Used during create. * @return bool If updated or not. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:822
- ⧉protected update_version_and_type(&$product) Make sure we store the product type and version (to track data changes).
/** * Make sure we store the product type and version (to track data changes). * * @param WC_Product $product Product object. * @since 3.0.0 */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:853
- ⧉protected clear_caches(&$product) Clear any caches.
/** * Clear any caches. * * @param WC_Product $product Product object. * @since 3.0.0 */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:873
- ⧉protected set_product_stock($product_id_with_stock, $stock_quantity) Update a product's stock amount directly in the database.
/** * Update a product's stock amount directly in the database. * * Updates both post meta and lookup tables. Ignores manage stock setting on the product. * * @param int $product_id_with_stock Product ID. * @param int|float|null $stock_quantity Stock quantity. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1347
- ⧉protected get_wp_query_args($query_vars): array Get valid WP_Query args from a WC_Product_Query's query variables.
/** * Get valid WP_Query args from a WC_Product_Query's query variables. * * @since 3.2.0 * @param array $query_vars Query vars from a WC_Product_Query. * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:1780
- ⧉protected get_data_for_lookup_table($id, $table): array Get data to save to a lookup table.
/** * Get data to save to a lookup table. * * @since 3.6.0 * @param int $id ID of object to update. * @param string $table Lookup table name. * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:2071
- ⧉protected get_primary_key_for_lookup_table($table): string Get primary key name for lookup table.
/** * Get primary key name for lookup table. * * @since 3.6.0 * @param string $table Lookup table name. * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:2105
- ⧉protected get_term_ids($object, $taxonomy): array of terms Get and store terms from a taxonomy.
/** * Get and store terms from a taxonomy. * * @since 3.0.0 * @param WC_Data|integer $object WC_Data object or object ID. * @param string $taxonomy Taxonomy name e.g. product_cat. * @return array of terms */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:63
- ⧉protected get_db_info(): array Array elements: table, object_id_field, meta_id_field Table structure is slightly different between meta types, this function will ret...
/** * Table structure is slightly different between meta types, this function will return what we need to know. * * @since 3.0.0 * @return array Array elements: table, object_id_field, meta_id_field */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:156
- ⧉protected prefix_key($key): string Internal meta keys we don't want exposed as part of meta_data. This is in additi...
/** * Internal meta keys we don't want exposed as part of meta_data. This is in * addition to all data props with _ prefix. * * @since 2.6.0 * * @param string $key Prefix to be added to meta keys. * @return string */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:196
- ⧉protected exclude_internal_meta_keys($meta): bool Callback to remove unwanted meta data.
/** * Callback to remove unwanted meta data. * * @param object $meta Meta object to check if it should be excluded or not. * @return bool */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:206
- ⧉protected get_props_to_update($object, $meta_key_to_props, $meta_type = 'post'): array A mapping of meta keys => prop names, filtered by ones that should be updated. Gets a list of props and meta keys that need updated based on change state or if...
/** * Gets a list of props and meta keys that need updated based on change state * or if they are present in the database or not. * * @param WC_Data $object The WP_Data object (WC_Coupon for coupons, etc). * @param array $meta_key_to_props A mapping of meta keys => prop names. * @param string $meta_type The internal WP meta type (post, user, etc). * @return array A mapping of meta keys => prop names, filtered by ones that should be updated. */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:219
- ⧉protected update_or_delete_post_meta($object, $meta_key, $meta_value): bool True if updated/deleted. Update meta data in, or delete it from, the database.
/** * Update meta data in, or delete it from, the database. * * Avoids storing meta when it's either an empty string or empty array. * Other empty values such as numeric 0 and null should still be stored. * Data-stores can force meta to exist using `must_exist_meta_keys`. * * Note: WordPress `get_metadata` function returns an empty string when meta data does not exist. * * @param WC_Data $object The WP_Data object (WC_Coupon for coupons, etc). * @param string $meta_key Meta key to update. * @param mixed $meta_value Value to save. * * @since 3.6.0 Added to prevent empty meta being stored unless required. * * @return bool True if updated/deleted. */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:250
- ⧉protected get_valid_search_terms($terms): array Terms that are not stopwords. Check if the terms are suitable for searching.
/** * Check if the terms are suitable for searching. * * Uses an array of stopwords (terms) that are excluded from the separate * term matching when searching for posts. The list of English stopwords is * the approximate search engines list, and is translatable. * * @since 3.4.0 * @param array $terms Terms to check. * @return array Terms that are not stopwords. */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:512
- ⧉protected get_search_stopwords(): array Stopwords. Retrieve stopwords used when parsing search terms.
/** * Retrieve stopwords used when parsing search terms. * * @since 3.4.0 * @return array Stopwords. */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:545
- ⧉protected update_lookup_table($id, $table): NULL Update a lookup table for an object.
/** * Update a lookup table for an object. * * @since 3.6.0 * @param int $id ID of object to update. * @param string $table Lookup table name. * * @return NULL */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:597
- ⧉protected string_to_timestamp($time_string): int|null The date string converted to a timestamp or null. Converts a WP post date string into a timestamp.
/** * Converts a WP post date string into a timestamp. * * @since 4.8.0 * * @param string $time_string The WP post date string. * @return int|null The date string converted to a timestamp or null. */ Inherited from WC_Data_Store_WP Defined in <ROOT>/wp-content/plugins/woocommerce/includes/data-stores/class-wc-data-store-wp.php:655
- ⧉private stores -> array (40)
- coupon => string (24) "WC_Coupon_Data_Store_CPT"
- customer => string (22) "WC_Customer_Data_Store"
- customer-download => string (31) "WC_Customer_Download_Data_Store"
- customer-download-log => string (35) "WC_Customer_Download_Log_Data_Store"
- customer-session => string (30) "WC_Customer_Data_Store_Session"
- order => string (23) "WC_Order_Data_Store_CPT"
- order-refund => string (30) "WC_Order_Refund_Data_Store_CPT"
- order-item => string (24) "WC_Order_Item_Data_Store"
- order-item-coupon => string (31) "WC_Order_Item_Coupon_Data_Store"
- order-item-fee => string (28) "WC_Order_Item_Fee_Data_Store"
- order-item-product => string (32) "WC_Order_Item_Product_Data_Store"
- order-item-shipping => string (33) "WC_Order_Item_Shipping_Data_Store"
- order-item-tax => string (28) "WC_Order_Item_Tax_Data_Store"
- payment-token => string (27) "WC_Payment_Token_Data_Store"
- product => string (25) "WC_Product_Data_Store_CPT"
- product-grouped => string (33) "WC_Product_Grouped_Data_Store_CPT"
- product-variable => string (34) "WC_Product_Variable_Data_Store_CPT"
- product-variation => string (35) "WC_Product_Variation_Data_Store_CPT"
- shipping-zone => string (27) "WC_Shipping_Zone_Data_Store"
- webhook => string (21) "WC_Webhook_Data_Store"
- report-revenue-stats => string (63) "Automattic\WooCommerce\Admin\API\Reports\Orders\Stats\DataStore"
- report-orders => string (57) "Automattic\WooCommerce\Admin\API\Reports\Orders\DataStore"
- report-orders-stats => string (63) "Automattic\WooCommerce\Admin\API\Reports\Orders\Stats\DataStore"
- report-products => string (59) "Automattic\WooCommerce\Admin\API\Reports\Products\DataStore"
- report-variations => string (61) "Automattic\WooCommerce\Admin\API\Reports\Variations\DataStore"
- report-products-stats => string (65) "Automattic\WooCommerce\Admin\API\Reports\Products\Stats\DataStore"
- report-variations-stats => string (67) "Automattic\WooCommerce\Admin\API\Reports\Variations\Stats\DataStore"
- report-categories => string (61) "Automattic\WooCommerce\Admin\API\Reports\Categories\DataStore"
- report-taxes => string (56) "Automattic\WooCommerce\Admin\API\Reports\Taxes\DataStore"
- report-taxes-stats => string (62) "Automattic\WooCommerce\Admin\API\Reports\Taxes\Stats\DataStore"
- report-coupons => string (58) "Automattic\WooCommerce\Admin\API\Reports\Coupons\DataStore"
- report-coupons-stats => string (64) "Automattic\WooCommerce\Admin\API\Reports\Coupons\Stats\DataStore"
- report-downloads => string (60) "Automattic\WooCommerce\Admin\API\Reports\Downloads\DataStore"
- report-downloads-stats => string (66) "Automattic\WooCommerce\Admin\API\Reports\Downloads\Stats\DataStore"
- admin-note => string (44) "Automattic\WooCommerce\Admin\Notes\DataStore"
- report-customers => string (60) "Automattic\WooCommerce\Admin\API\Reports\Customers\DataStore"
- report-customers-stats => string (66) "Automattic\WooCommerce\Admin\API\Reports\Customers\Stats\DataStore"
- report-stock-stats => string (62) "Automattic\WooCommerce\Admin\API\Reports\Stock\Stats\DataStore"
- wishlist => string (29) "YITH_WCWL_Wishlist_Data_Store"
- wishlist-item => string (34) "YITH_WCWL_Wishlist_Item_Data_Store"
- private current_class_name -> string (25) "WC_Product_Data_Store_CPT"
- private object_type -> string (14) "product-simple"
- ⧉public __construct($object_type) Tells WC_Data_Store which object (coupon, product, order, etc) store we want to ...
/** * Tells WC_Data_Store which object (coupon, product, order, etc) * store we want to work with. * * @throws Exception When validation fails. * @param string $object_type Name of object. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:80
- ⧉public __sleep(): array Only store the object type to avoid serializing the data store instance.
/** * Only store the object type to avoid serializing the data store instance. * * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:116
- ⧉public __wakeup() Re-run the constructor with the object type.
/** * Re-run the constructor with the object type. * * @throws Exception When validation fails. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:125
- ⧉public get_current_class_name(): string Returns the class name of the current data store.
/** * Returns the class name of the current data store. * * @since 3.0.0 * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:148
- ⧉public read(&$data) Reads an object from the data store.
/** * Reads an object from the data store. * * @since 3.0.0 * @param WC_Data $data WooCommerce data instance. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:158
- ⧉public read_multiple(&$objects = array()) Reads multiple objects from the data store.
/** * Reads multiple objects from the data store. * * @since 6.9.0 * @param array[WC_Data] $objects Array of object instances to read. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:168
- ⧉public create(&$data) Create an object in the data store.
/** * Create an object in the data store. * * @since 3.0.0 * @param WC_Data $data WooCommerce data instance. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:185
- ⧉public update(&$data) Update an object in the data store.
/** * Update an object in the data store. * * @since 3.0.0 * @param WC_Data $data WooCommerce data instance. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:195
- ⧉public delete(&$data, $args = array()) Delete an object from the data store.
/** * Delete an object from the data store. * * @since 3.0.0 * @param WC_Data $data WooCommerce data instance. * @param array $args Array of args to pass to the delete method. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:206
- ⧉public __call($method, $parameters): mixed Data stores can define additional functions (for example, coupons have some help...
/** * Data stores can define additional functions (for example, coupons have * some helper methods for increasing or decreasing usage). This passes * through to the instance if that function exists. * * @since 3.0.0 * @param string $method Method. * @param mixed $parameters Parameters. * @return mixed */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:220
- ⧉public has_callable(string $method): bool Check if the data store we are working with has a callable method.
/** * Check if the data store we are working with has a callable method. * * @param string $method Method name. * * @return bool Whether the passed method is callable. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:235
- ⇄⧉public static load($object_type): WC_Data_Store Loads a data store.\WC_Data_Store::load($object_type)
/** * Loads a data store. * * @param string $object_type Name of object. * * @since 3.0.0 * @throws Exception When validation fails. * @return WC_Data_Store */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:138
- protected meta_data -> null
- protected legacy_datastore_props -> array (0)
- ⇄⧉public __construct($product0) Initialize simple product.new \WC_Product_Simple($product0)
/** * Initialize simple product. * * @param WC_Product|int $product Product instance or ID. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-product-simple.php:22
- ⇄⧉public get_type(): string Get internal type.$input->legacy_values['data']->get_type()
/** * Get internal type. * * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-product-simple.php:32
- ⇄⧉public add_to_cart_url(): string Get the add to url used mainly in loops.$input->legacy_values['data']->add_to_cart_url()
/** * Get the add to url used mainly in loops. * * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-product-simple.php:41
- ⇄⧉public add_to_cart_text(): string Get the add to cart button text.$input->legacy_values['data']->add_to_cart_text()
/** * Get the add to cart button text. * * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-product-simple.php:59
- ⇄⧉public add_to_cart_description(): string Get the add to cart button text description - used in aria tags.$input->legacy_values['data']->add_to_cart_description()
/** * Get the add to cart button text description - used in aria tags. * * @since 3.3.0 * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-product-simple.php:71
- ⇄⧉public get_name($context = 'view'): string Get product name.$input->legacy_values['data']->get_name($context = 'view')
/** * Get product name. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:161
- ⇄⧉public get_slug($context = 'view'): string Get product slug.$input->legacy_values['data']->get_slug($context = 'view')
/** * Get product slug. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:172
- ⇄⧉public get_date_created($context = 'view'): WC_DateTime|NULL object if the date is set or null if there is no date. Get product created date.$input->legacy_values['data']->get_date_created($context = 'view')
/** * Get product created date. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return WC_DateTime|NULL object if the date is set or null if there is no date. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:183
- ⇄⧉public get_date_modified($context = 'view'): WC_DateTime|NULL object if the date is set or null if there is no date. Get product modified date.$input->legacy_values['data']->get_date_modified($context = 'view')
/** * Get product modified date. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return WC_DateTime|NULL object if the date is set or null if there is no date. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:194
- ⇄⧉public get_status($context = 'view'): string Get product status.$input->legacy_values['data']->get_status($context = 'view')
/** * Get product status. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:205
- ⇄⧉public get_featured($context = 'view'): boolean If the product is featured.$input->legacy_values['data']->get_featured($context = 'view')
/** * If the product is featured. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return boolean */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:216
- ⇄⧉public get_catalog_visibility($context = 'view'): string Get catalog visibility.$input->legacy_values['data']->get_catalog_visibility($context = 'view')
/** * Get catalog visibility. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:227
- ⇄⧉public get_description($context = 'view'): string Get product description.$input->legacy_values['data']->get_description($context = 'view')
/** * Get product description. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:238
- ⇄⧉public get_short_description($context = 'view'): string Get product short description.$input->legacy_values['data']->get_short_description($context = 'view')
/** * Get product short description. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:249
- ⇄⧉public get_sku($context = 'view'): string Get SKU (Stock-keeping unit) - product unique ID.$input->legacy_values['data']->get_sku($context = 'view')
/** * Get SKU (Stock-keeping unit) - product unique ID. * * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:259
- ⇄⧉public get_price($context = 'view'): string price Returns the product's active price.$input->legacy_values['data']->get_price($context = 'view')
/** * Returns the product's active price. * * @param string $context What the value is for. Valid values are view and edit. * @return string price */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:269
- ⇄⧉public get_regular_price($context = 'view'): string price Returns the product's regular price.$input->legacy_values['data']->get_regular_price($context = 'view')
/** * Returns the product's regular price. * * @param string $context What the value is for. Valid values are view and edit. * @return string price */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:279
- ⇄⧉public get_sale_price($context = 'view'): string price Returns the product's sale price.$input->legacy_values['data']->get_sale_price($context = 'view')
/** * Returns the product's sale price. * * @param string $context What the value is for. Valid values are view and edit. * @return string price */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:289
- ⇄⧉public get_date_on_sale_from($context = 'view'): WC_DateTime|NULL object if the date is set or null if there is no date. Get date on sale from.$input->legacy_values['data']->get_date_on_sale_from($context = 'view')
/** * Get date on sale from. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return WC_DateTime|NULL object if the date is set or null if there is no date. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:300
- ⇄⧉public get_date_on_sale_to($context = 'view'): WC_DateTime|NULL object if the date is set or null if there is no date. Get date on sale to.$input->legacy_values['data']->get_date_on_sale_to($context = 'view')
/** * Get date on sale to. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return WC_DateTime|NULL object if the date is set or null if there is no date. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:311
- ⇄⧉public get_total_sales($context = 'view'): int Get number total of sales.$input->legacy_values['data']->get_total_sales($context = 'view')
/** * Get number total of sales. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return int */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:322
- ⇄⧉public get_tax_status($context = 'view'): string Returns the tax status.$input->legacy_values['data']->get_tax_status($context = 'view')
/** * Returns the tax status. * * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:332
- ⇄⧉public get_tax_class($context = 'view'): string Returns the tax class.$input->legacy_values['data']->get_tax_class($context = 'view')
/** * Returns the tax class. * * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:342
- ⇄⧉public get_manage_stock($context = 'view'): boolean Return if product manage stock.$input->legacy_values['data']->get_manage_stock($context = 'view')
/** * Return if product manage stock. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return boolean */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:353
- ⇄⧉public get_stock_quantity($context = 'view'): int|null Returns number of items available for sale.$input->legacy_values['data']->get_stock_quantity($context = 'view')
/** * Returns number of items available for sale. * * @param string $context What the value is for. Valid values are view and edit. * @return int|null */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:363
- ⇄⧉public get_stock_status($context = 'view'): string Return the stock status.$input->legacy_values['data']->get_stock_status($context = 'view')
/** * Return the stock status. * * @param string $context What the value is for. Valid values are view and edit. * @since 3.0.0 * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:374
- ⇄⧉public get_backorders($context = 'view'): string yes no or notify Get backorders.$input->legacy_values['data']->get_backorders($context = 'view')
/** * Get backorders. * * @param string $context What the value is for. Valid values are view and edit. * @since 3.0.0 * @return string yes no or notify */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:385
- ⇄⧉public get_low_stock_amount($context = 'view'): int|string Returns empty string if value not set Get low stock amount.$input->legacy_values['data']->get_low_stock_amount($context = 'view')
/** * Get low stock amount. * * @param string $context What the value is for. Valid values are view and edit. * @since 3.5.0 * @return int|string Returns empty string if value not set */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:396
- ⇄⧉public get_sold_individually($context = 'view'): boolean Return if should be sold individually.$input->legacy_values['data']->get_sold_individually($context = 'view')
/** * Return if should be sold individually. * * @param string $context What the value is for. Valid values are view and edit. * @since 3.0.0 * @return boolean */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:407
- ⇄⧉public get_weight($context = 'view'): string Returns the product's weight.$input->legacy_values['data']->get_weight($context = 'view')
/** * Returns the product's weight. * * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:417
- ⇄⧉public get_length($context = 'view'): string Returns the product length.$input->legacy_values['data']->get_length($context = 'view')
/** * Returns the product length. * * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:427
- ⇄⧉public get_width($context = 'view'): string Returns the product width.$input->legacy_values['data']->get_width($context = 'view')
/** * Returns the product width. * * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:437
- ⇄⧉public get_height($context = 'view'): string Returns the product height.$input->legacy_values['data']->get_height($context = 'view')
/** * Returns the product height. * * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:447
- ⇄⧉public get_dimensions($formatted = true): string|array Returns formatted dimensions.$input->legacy_values['data']->get_dimensions($formatted = true)
/** * Returns formatted dimensions. * * @param bool $formatted True by default for legacy support - will be false/not set in future versions to return the array only. Use wc_format_dimensions for formatted versions instead. * @return string|array */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:457
- ⇄⧉public get_upsell_ids($context = 'view'): array Get upsell IDs.$input->legacy_values['data']->get_upsell_ids($context = 'view')
/** * Get upsell IDs. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return array */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:476
- ⇄⧉public get_cross_sell_ids($context = 'view'): array Get cross sell IDs.$input->legacy_values['data']->get_cross_sell_ids($context = 'view')
/** * Get cross sell IDs. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return array */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:487
- ⇄⧉public get_parent_id($context = 'view'): int Get parent ID.$input->legacy_values['data']->get_parent_id($context = 'view')
/** * Get parent ID. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return int */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:498
- ⇄⧉public get_reviews_allowed($context = 'view'): bool Return if reviews is allowed.$input->legacy_values['data']->get_reviews_allowed($context = 'view')
/** * Return if reviews is allowed. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:509
- ⇄⧉public get_purchase_note($context = 'view'): string Get purchase note.$input->legacy_values['data']->get_purchase_note($context = 'view')
/** * Get purchase note. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:520
- ⇄⧉public get_attributes($context = 'view'): array Returns product attributes.$input->legacy_values['data']->get_attributes($context = 'view')
/** * Returns product attributes. * * @param string $context What the value is for. Valid values are view and edit. * @return array */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:530
- ⇄⧉public get_default_attributes($context = 'view'): array Get default attributes.$input->legacy_values['data']->get_default_attributes($context = 'view')
/** * Get default attributes. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return array */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:541
- ⇄⧉public get_menu_order($context = 'view'): int Get menu order.$input->legacy_values['data']->get_menu_order($context = 'view')
/** * Get menu order. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return int */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:552
- ⇄⧉public get_post_password($context = 'view'): int Get post password.$input->legacy_values['data']->get_post_password($context = 'view')
/** * Get post password. * * @since 3.6.0 * @param string $context What the value is for. Valid values are view and edit. * @return int */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:563
- ⇄⧉public get_category_ids($context = 'view'): array Get category ids.$input->legacy_values['data']->get_category_ids($context = 'view')
/** * Get category ids. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return array */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:574
- ⇄⧉public get_tag_ids($context = 'view'): array Get tag ids.$input->legacy_values['data']->get_tag_ids($context = 'view')
/** * Get tag ids. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return array */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:585
- ⇄⧉public get_virtual($context = 'view'): bool Get virtual.$input->legacy_values['data']->get_virtual($context = 'view')
/** * Get virtual. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:596
- ⇄⧉public get_gallery_image_ids($context = 'view'): array Returns the gallery attachment ids.$input->legacy_values['data']->get_gallery_image_ids($context = 'view')
/** * Returns the gallery attachment ids. * * @param string $context What the value is for. Valid values are view and edit. * @return array */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:606
- ⇄⧉public get_shipping_class_id($context = 'view'): int Get shipping class ID.$input->legacy_values['data']->get_shipping_class_id($context = 'view')
/** * Get shipping class ID. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return int */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:617
- ⇄⧉public get_downloads($context = 'view'): array Get downloads.$input->legacy_values['data']->get_downloads($context = 'view')
/** * Get downloads. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return array */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:628
- ⇄⧉public get_download_expiry($context = 'view'): int Get download expiry.$input->legacy_values['data']->get_download_expiry($context = 'view')
/** * Get download expiry. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return int */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:639
- ⇄⧉public get_downloadable($context = 'view'): bool Get downloadable.$input->legacy_values['data']->get_downloadable($context = 'view')
/** * Get downloadable. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:650
- ⇄⧉public get_download_limit($context = 'view'): int Get download limit.$input->legacy_values['data']->get_download_limit($context = 'view')
/** * Get download limit. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return int */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:661
- ⇄⧉public get_image_id($context = 'view'): string Get main image ID.$input->legacy_values['data']->get_image_id($context = 'view')
/** * Get main image ID. * * @since 3.0.0 * @param string $context What the value is for. Valid values are view and edit. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:672
- ⇄⧉public get_rating_counts($context = 'view'): array of counts Get rating count.$input->legacy_values['data']->get_rating_counts($context = 'view')
/** * Get rating count. * * @param string $context What the value is for. Valid values are view and edit. * @return array of counts */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:682
- ⇄⧉public get_average_rating($context = 'view'): float Get average rating.$input->legacy_values['data']->get_average_rating($context = 'view')
/** * Get average rating. * * @param string $context What the value is for. Valid values are view and edit. * @return float */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:692
- ⇄⧉public get_review_count($context = 'view'): int Get review count.$input->legacy_values['data']->get_review_count($context = 'view')
/** * Get review count. * * @param string $context What the value is for. Valid values are view and edit. * @return int */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:702
- ⇄⧉public set_name($name) Set product name.$input->legacy_values['data']->set_name($name)
/** * Set product name. * * @since 3.0.0 * @param string $name Product name. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:722
- ⇄⧉public set_slug($slug) Set product slug.$input->legacy_values['data']->set_slug($slug)
/** * Set product slug. * * @since 3.0.0 * @param string $slug Product slug. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:732
- ⇄⧉public set_date_created($date = null) Set product created date.$input->legacy_values['data']->set_date_created($date = null)
/** * Set product created date. * * @since 3.0.0 * @param string|integer|null $date UTC timestamp, or ISO 8601 DateTime. If the DateTime string has no timezone or offset, WordPress site timezone will be assumed. Null if their is no date. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:742
- ⇄⧉public set_date_modified($date = null) Set product modified date.$input->legacy_values['data']->set_date_modified($date = null)
/** * Set product modified date. * * @since 3.0.0 * @param string|integer|null $date UTC timestamp, or ISO 8601 DateTime. If the DateTime string has no timezone or offset, WordPress site timezone will be assumed. Null if their is no date. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:752
- ⇄⧉public set_status($status) Set product status.$input->legacy_values['data']->set_status($status)
/** * Set product status. * * @since 3.0.0 * @param string $status Product status. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:762
- ⇄⧉public set_featured($featured) Set if the product is featured.$input->legacy_values['data']->set_featured($featured)
/** * Set if the product is featured. * * @since 3.0.0 * @param bool|string $featured Whether the product is featured or not. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:772
- ⇄⧉public set_catalog_visibility($visibility) Set catalog visibility.$input->legacy_values['data']->set_catalog_visibility($visibility)
/** * Set catalog visibility. * * @since 3.0.0 * @throws WC_Data_Exception Throws exception when invalid data is found. * @param string $visibility Options: 'hidden', 'visible', 'search' and 'catalog'. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:783
- ⇄⧉public set_description($description) Set product description.$input->legacy_values['data']->set_description($description)
/** * Set product description. * * @since 3.0.0 * @param string $description Product description. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:797
- ⇄⧉public set_short_description($short_description) Set product short description.$input->legacy_values['data']->set_short_description($short_description)
/** * Set product short description. * * @since 3.0.0 * @param string $short_description Product short description. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:807
- ⇄⧉public set_sku($sku) Set SKU.$input->legacy_values['data']->set_sku($sku)
/** * Set SKU. * * @since 3.0.0 * @throws WC_Data_Exception Throws exception when invalid data is found. * @param string $sku Product SKU. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:818
- ⇄⧉public set_price($price) Set the product's active price.$input->legacy_values['data']->set_price($price)
/** * Set the product's active price. * * @param string $price Price. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:833
- ⇄⧉public set_regular_price($price) Set the product's regular price.$input->legacy_values['data']->set_regular_price($price)
/** * Set the product's regular price. * * @since 3.0.0 * @param string $price Regular price. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:843
- ⇄⧉public set_sale_price($price) Set the product's sale price.$input->legacy_values['data']->set_sale_price($price)
/** * Set the product's sale price. * * @since 3.0.0 * @param string $price sale price. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:853
- ⇄⧉public set_date_on_sale_from($date = null) Set date on sale from.$input->legacy_values['data']->set_date_on_sale_from($date = null)
/** * Set date on sale from. * * @since 3.0.0 * @param string|integer|null $date UTC timestamp, or ISO 8601 DateTime. If the DateTime string has no timezone or offset, WordPress site timezone will be assumed. Null if their is no date. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:863
- ⇄⧉public set_date_on_sale_to($date = null) Set date on sale to.$input->legacy_values['data']->set_date_on_sale_to($date = null)
/** * Set date on sale to. * * @since 3.0.0 * @param string|integer|null $date UTC timestamp, or ISO 8601 DateTime. If the DateTime string has no timezone or offset, WordPress site timezone will be assumed. Null if their is no date. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:873
- ⇄⧉public set_total_sales($total) Set number total of sales.$input->legacy_values['data']->set_total_sales($total)
/** * Set number total of sales. * * @since 3.0.0 * @param int $total Total of sales. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:883
- ⇄⧉public set_tax_status($status) Set the tax status.$input->legacy_values['data']->set_tax_status($status)
/** * Set the tax status. * * @since 3.0.0 * @throws WC_Data_Exception Throws exception when invalid data is found. * @param string $status Tax status. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:894
- ⇄⧉public set_tax_class($class) Set the tax class.$input->legacy_values['data']->set_tax_class($class)
/** * Set the tax class. * * @since 3.0.0 * @param string $class Tax class. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:919
- ⇄⧉public set_manage_stock($manage_stock) Set if product manage stock.$input->legacy_values['data']->set_manage_stock($manage_stock)
/** * Set if product manage stock. * * @since 3.0.0 * @param bool $manage_stock Whether or not manage stock is enabled. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:946
- ⇄⧉public set_stock_quantity($quantity) Set number of items available for sale.$input->legacy_values['data']->set_stock_quantity($quantity)
/** * Set number of items available for sale. * * @since 3.0.0 * @param float|null $quantity Stock quantity. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:956
- ⇄⧉public set_stock_status($status = 'instock') Set stock status.$input->legacy_values['data']->set_stock_status($status = 'instock')
/** * Set stock status. * * @param string $status New status. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:965
- ⇄⧉public set_backorders($backorders) Set backorders.$input->legacy_values['data']->set_backorders($backorders)
/** * Set backorders. * * @since 3.0.0 * @param string $backorders Options: 'yes', 'no' or 'notify'. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:981
- ⇄⧉public set_low_stock_amount($amount) Set low stock amount.$input->legacy_values['data']->set_low_stock_amount($amount)
/** * Set low stock amount. * * @param int|string $amount Empty string if value not set. * @since 3.5.0 */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:991
- ⇄⧉public set_sold_individually($sold_individually) Set if should be sold individually.$input->legacy_values['data']->set_sold_individually($sold_individually)
/** * Set if should be sold individually. * * @since 3.0.0 * @param bool $sold_individually Whether or not product is sold individually. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1001
- ⇄⧉public set_weight($weight) Set the product's weight.$input->legacy_values['data']->set_weight($weight)
/** * Set the product's weight. * * @since 3.0.0 * @param float|string $weight Total weight. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1011
- ⇄⧉public set_length($length) Set the product length.$input->legacy_values['data']->set_length($length)
/** * Set the product length. * * @since 3.0.0 * @param float|string $length Total length. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1021
- ⇄⧉public set_width($width) Set the product width.$input->legacy_values['data']->set_width($width)
/** * Set the product width. * * @since 3.0.0 * @param float|string $width Total width. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1031
- ⇄⧉public set_height($height) Set the product height.$input->legacy_values['data']->set_height($height)
/** * Set the product height. * * @since 3.0.0 * @param float|string $height Total height. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1041
- ⇄⧉public set_upsell_ids($upsell_ids) Set upsell IDs.$input->legacy_values['data']->set_upsell_ids($upsell_ids)
/** * Set upsell IDs. * * @since 3.0.0 * @param array $upsell_ids IDs from the up-sell products. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1051
- ⇄⧉public set_cross_sell_ids($cross_sell_ids) Set crosssell IDs.$input->legacy_values['data']->set_cross_sell_ids($cross_sell_ids)
/** * Set crosssell IDs. * * @since 3.0.0 * @param array $cross_sell_ids IDs from the cross-sell products. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1061
- ⇄⧉public set_parent_id($parent_id) Set parent ID.$input->legacy_values['data']->set_parent_id($parent_id)
/** * Set parent ID. * * @since 3.0.0 * @param int $parent_id Product parent ID. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1071
- ⇄⧉public set_reviews_allowed($reviews_allowed) Set if reviews is allowed.$input->legacy_values['data']->set_reviews_allowed($reviews_allowed)
/** * Set if reviews is allowed. * * @since 3.0.0 * @param bool $reviews_allowed Reviews allowed or not. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1081
- ⇄⧉public set_purchase_note($purchase_note) Set purchase note.$input->legacy_values['data']->set_purchase_note($purchase_note)
/** * Set purchase note. * * @since 3.0.0 * @param string $purchase_note Purchase note. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1091
- ⇄⧉public set_attributes($raw_attributes) Set product attributes.$input->legacy_values['data']->set_attributes($raw_attributes)
/** * Set product attributes. * * Attributes are made up of: * id - 0 for product level attributes. ID for global attributes. * name - Attribute name. * options - attribute value or array of term ids/names. * position - integer sort order. * visible - If visible on frontend. * variation - If used for variations. * Indexed by unqiue key to allow clearing old ones after a set. * * @since 3.0.0 * @param array $raw_attributes Array of WC_Product_Attribute objects. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1110
- ⇄⧉public set_default_attributes($default_attributes) Set default attributes. These will be saved as strings and should map to attribu...$input->legacy_values['data']->set_default_attributes($default_attributes)
/** * Set default attributes. These will be saved as strings and should map to attribute values. * * @since 3.0.0 * @param array $default_attributes List of default attributes. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1128
- ⇄⧉public set_menu_order($menu_order) Set menu order.$input->legacy_values['data']->set_menu_order($menu_order)
/** * Set menu order. * * @since 3.0.0 * @param int $menu_order Menu order. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1138
- ⇄⧉public set_post_password($post_password) Set post password.$input->legacy_values['data']->set_post_password($post_password)
/** * Set post password. * * @since 3.6.0 * @param int $post_password Post password. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1148
- ⇄⧉public set_category_ids($term_ids) Set the product categories.$input->legacy_values['data']->set_category_ids($term_ids)
/** * Set the product categories. * * @since 3.0.0 * @param array $term_ids List of terms IDs. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1158
- ⇄⧉public set_tag_ids($term_ids) Set the product tags.$input->legacy_values['data']->set_tag_ids($term_ids)
/** * Set the product tags. * * @since 3.0.0 * @param array $term_ids List of terms IDs. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1168
- ⇄⧉public set_virtual($virtual) Set if the product is virtual.$input->legacy_values['data']->set_virtual($virtual)
/** * Set if the product is virtual. * * @since 3.0.0 * @param bool|string $virtual Whether product is virtual or not. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1178
- ⇄⧉public set_shipping_class_id($id) Set shipping class ID.$input->legacy_values['data']->set_shipping_class_id($id)
/** * Set shipping class ID. * * @since 3.0.0 * @param int $id Product shipping class id. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1188
- ⇄⧉public set_downloadable($downloadable) Set if the product is downloadable.$input->legacy_values['data']->set_downloadable($downloadable)
/** * Set if the product is downloadable. * * @since 3.0.0 * @param bool|string $downloadable Whether product is downloadable or not. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1198
- ⇄⧉public set_downloads($downloads_array) Set downloads.$input->legacy_values['data']->set_downloads($downloads_array)
/** * Set downloads. * * @throws WC_Data_Exception If an error relating to one of the downloads is encountered. * * @param array $downloads_array Array of WC_Product_Download objects or arrays. * * @since 3.0.0 */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1211
- ⇄⧉public set_download_limit($download_limit) Set download limit.$input->legacy_values['data']->set_download_limit($download_limit)
/** * Set download limit. * * @since 3.0.0 * @param int|string $download_limit Product download limit. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1298
- ⇄⧉public set_download_expiry($download_expiry) Set download expiry.$input->legacy_values['data']->set_download_expiry($download_expiry)
/** * Set download expiry. * * @since 3.0.0 * @param int|string $download_expiry Product download expiry. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1308
- ⇄⧉public set_gallery_image_ids($image_ids) Set gallery attachment ids.$input->legacy_values['data']->set_gallery_image_ids($image_ids)
/** * Set gallery attachment ids. * * @since 3.0.0 * @param array $image_ids List of image ids. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1318
- ⇄⧉public set_image_id($image_id = '') Set main image ID.$input->legacy_values['data']->set_image_id($image_id = '')
/** * Set main image ID. * * @since 3.0.0 * @param int|string $image_id Product image id. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1330
- ⇄⧉public set_rating_counts($counts) Set rating counts. Read only.$input->legacy_values['data']->set_rating_counts($counts)
/** * Set rating counts. Read only. * * @param array $counts Product rating counts. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1339
- ⇄⧉public set_average_rating($average) Set average rating. Read only.$input->legacy_values['data']->set_average_rating($average)
/** * Set average rating. Read only. * * @param float $average Product average rating. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1348
- ⇄⧉public set_review_count($count) Set review count. Read only.$input->legacy_values['data']->set_review_count($count)
/** * Set review count. Read only. * * @param int $count Product review count. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1357
- ⇄⧉public validate_props() Ensure properties are set correctly before save.$input->legacy_values['data']->validate_props()
/** * Ensure properties are set correctly before save. * * @since 3.0.0 */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1372
- ⇄⧉public save(): int Save data (either create or update depending on if we are working on an existing...$input->legacy_values['data']->save()
/** * Save data (either create or update depending on if we are working on an existing product). * * @since 3.0.0 * @return int */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1401
- ⇄⧉public delete($force_delete = false): bool result Delete the product, set its ID to 0, and return result.$input->legacy_values['data']->delete($force_delete = false)
/** * Delete the product, set its ID to 0, and return result. * * @param bool $force_delete Should the product be deleted permanently. * @return bool result */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1469
- ⇄⧉public supports($feature): bool True if the product supports the feature, false otherwise. Check if a product supports a given feature.$input->legacy_values['data']->supports($feature)
/** * Check if a product supports a given feature. * * Product classes should override this to declare support (or lack of support) for a feature. * * @param string $feature string The name of a feature to test support for. * @return bool True if the product supports the feature, false otherwise. * @since 2.5.0 */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1506
- ⇄⧉public exists(): bool Returns whether or not the product post exists.$input->legacy_values['data']->exists()
/** * Returns whether or not the product post exists. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1515
- ⇄⧉public is_type($type): bool Checks the product type.$input->legacy_values['data']->is_type($type)
/** * Checks the product type. * * Backwards compatibility with downloadable/virtual. * * @param string|array $type Array or string of types. * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1527
- ⇄⧉public is_downloadable(): bool Checks if a product is downloadable.$input->legacy_values['data']->is_downloadable()
/** * Checks if a product is downloadable. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1536
- ⇄⧉public is_virtual(): bool Checks if a product is virtual (has no shipping).$input->legacy_values['data']->is_virtual()
/** * Checks if a product is virtual (has no shipping). * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1545
- ⇄⧉public is_featured(): bool Returns whether or not the product is featured.$input->legacy_values['data']->is_featured()
/** * Returns whether or not the product is featured. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1554
- ⇄⧉public is_sold_individually(): bool Check if a product is sold individually (no quantities).$input->legacy_values['data']->is_sold_individually()
/** * Check if a product is sold individually (no quantities). * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1563
- ⇄⧉public is_visible(): bool Returns whether or not the product is visible in the catalog.$input->legacy_values['data']->is_visible()
/** * Returns whether or not the product is visible in the catalog. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1572
- ⇄⧉public is_purchasable(): bool Returns false if the product cannot be bought.$input->legacy_values['data']->is_purchasable()
/** * Returns false if the product cannot be bought. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1611
- ⇄⧉public is_on_sale($context = 'view'): bool Returns whether or not the product is on sale.$input->legacy_values['data']->is_on_sale($context = 'view')
/** * Returns whether or not the product is on sale. * * @param string $context What the value is for. Valid values are view and edit. * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1621
- ⇄⧉public has_dimensions(): bool Returns whether or not the product has dimensions set.$input->legacy_values['data']->has_dimensions()
/** * Returns whether or not the product has dimensions set. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1643
- ⇄⧉public has_weight(): bool Returns whether or not the product has weight set.$input->legacy_values['data']->has_weight()
/** * Returns whether or not the product has weight set. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1652
- ⇄⧉public is_in_stock(): bool Returns whether or not the product can be purchased. This returns true for 'inst...$input->legacy_values['data']->is_in_stock()
/** * Returns whether or not the product can be purchased. * This returns true for 'instock' and 'onbackorder' stock statuses. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1662
- ⇄⧉public needs_shipping(): bool Checks if a product needs shipping.$input->legacy_values['data']->needs_shipping()
/** * Checks if a product needs shipping. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1671
- ⇄⧉public is_taxable(): bool Returns whether or not the product is taxable.$input->legacy_values['data']->is_taxable()
/** * Returns whether or not the product is taxable. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1680
- ⇄⧉public is_shipping_taxable(): bool Returns whether or not the product shipping is taxable.$input->legacy_values['data']->is_shipping_taxable()
/** * Returns whether or not the product shipping is taxable. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1689
- ⇄⧉public managing_stock(): bool Returns whether or not the product is stock managed.$input->legacy_values['data']->managing_stock()
/** * Returns whether or not the product is stock managed. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1698
- ⇄⧉public backorders_allowed(): bool Returns whether or not the product can be backordered.$input->legacy_values['data']->backorders_allowed()
/** * Returns whether or not the product can be backordered. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1710
- ⇄⧉public backorders_require_notification(): bool Returns whether or not the product needs to notify the customer on backorder.$input->legacy_values['data']->backorders_require_notification()
/** * Returns whether or not the product needs to notify the customer on backorder. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1719
- ⇄⧉public is_on_backorder($qty_in_cart0): bool Check if a product is on backorder.$input->legacy_values['data']->is_on_backorder($qty_in_cart0)
/** * Check if a product is on backorder. * * @param int $qty_in_cart (default: 0). * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1729
- ⇄⧉public has_enough_stock($quantity): bool Returns whether or not the product has enough stock for the order.$input->legacy_values['data']->has_enough_stock($quantity)
/** * Returns whether or not the product has enough stock for the order. * * @param mixed $quantity Quantity of a product added to an order. * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1743
- ⇄⧉public has_attributes(): boolean Returns whether or not the product has any visible attributes.$input->legacy_values['data']->has_attributes()
/** * Returns whether or not the product has any visible attributes. * * @return boolean */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1752
- ⇄⧉public has_child(): bool Returns whether or not the product has any child product.$input->legacy_values['data']->has_child()
/** * Returns whether or not the product has any child product. * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1766
- ⇄⧉public child_has_dimensions(): bool Does a child have dimensions?$input->legacy_values['data']->child_has_dimensions()
/** * Does a child have dimensions? * * @since 3.0.0 * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1776
- ⇄⧉public child_has_weight(): boolean Does a child have a weight?$input->legacy_values['data']->child_has_weight()
/** * Does a child have a weight? * * @since 3.0.0 * @return boolean */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1786
- ⇄⧉public has_file($download_id = ''): bool Whether downloadable product has a file attached. Check if downloadable product has a file attached.$input->legacy_values['data']->has_file($download_id = '')
/** * Check if downloadable product has a file attached. * * @since 1.6.2 * * @param string $download_id file identifier. * @return bool Whether downloadable product has a file attached. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1798
- ⇄⧉public has_options(): boolean Returns whether or not the product has additional options that need selecting be...$input->legacy_values['data']->has_options()
/** * Returns whether or not the product has additional options that need * selecting before adding to cart. * * @since 3.0.0 * @return boolean */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1809
- ⇄⧉public get_title(): string Get the product's title. For products this is the product name.$input->legacy_values['data']->get_title()
/** * Get the product's title. For products this is the product name. * * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1824
- ⇄⧉public get_permalink(): string Product permalink.$input->legacy_values['data']->get_permalink()
/** * Product permalink. * * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1833
- ⇄⧉public get_children(): array of IDs Returns the children IDs if applicable. Overridden by child classes.$input->legacy_values['data']->get_children()
/** * Returns the children IDs if applicable. Overridden by child classes. * * @return array of IDs */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1842
- ⇄⧉public get_stock_managed_by_id(): int If the stock level comes from another product ID, this should be modified.$input->legacy_values['data']->get_stock_managed_by_id()
/** * If the stock level comes from another product ID, this should be modified. * * @since 3.0.0 * @return int */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1852
- ⇄⧉public get_price_html($deprecated = ''): string Returns the price in html format.$input->legacy_values['data']->get_price_html($deprecated = '')
/** * Returns the price in html format. * * @param string $deprecated Deprecated param. * * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1863
- ⇄⧉public get_formatted_name(): string Formatted product name Get product name with SKU or ID. Used within admin.$input->legacy_values['data']->get_formatted_name()
/** * Get product name with SKU or ID. Used within admin. * * @return string Formatted product name */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1880
- ⇄⧉public get_min_purchase_quantity(): int Get min quantity which can be purchased at once.$input->legacy_values['data']->get_min_purchase_quantity()
/** * Get min quantity which can be purchased at once. * * @since 3.0.0 * @return int */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1895
- ⇄⧉public get_max_purchase_quantity(): int Quantity or -1 if unlimited. Get max quantity which can be purchased at once.$input->legacy_values['data']->get_max_purchase_quantity()
/** * Get max quantity which can be purchased at once. * * @since 3.0.0 * @return int Quantity or -1 if unlimited. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1905
- ⇄⧉public single_add_to_cart_text(): string Get the add to cart button text for the single page.$input->legacy_values['data']->single_add_to_cart_text()
/** * Get the add to cart button text for the single page. * * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1923
- ⇄⧉public get_image($size = 'woocommerce_thumbnail', $attr = array(), $placeholder = true): string Returns the main product image.$input->legacy_values['data']->get_image($size = 'woocommerce_thumbnail', $attr = array(), $placeholder = true)
/** * Returns the main product image. * * @param string $size (default: 'woocommerce_thumbnail'). * @param array $attr Image attributes. * @param bool $placeholder True to return $placeholder if no image is found, or false to return an empty string. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1955
- ⇄⧉public get_shipping_class(): string Returns the product shipping class SLUG.$input->legacy_values['data']->get_shipping_class()
/** * Returns the product shipping class SLUG. * * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1978
- ⇄⧉public get_attribute($attribute): string Returns a single product attribute as a string.$input->legacy_values['data']->get_attribute($attribute)
/** * Returns a single product attribute as a string. * * @param string $attribute to get. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1996
- ⇄⧉public get_rating_count($value = null): int Get the total amount (COUNT) of ratings, or just the count for one rating e.g. n...$input->legacy_values['data']->get_rating_count($value = null)
/** * Get the total amount (COUNT) of ratings, or just the count for one rating e.g. number of 5 star ratings. * * @param int $value Optional. Rating value to get the count for. By default returns the count of all rating values. * @return int */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:2016
- ⇄⧉public get_file($download_id = ''): array|false if not found Get a file by $download_id.$input->legacy_values['data']->get_file($download_id = '')
/** * Get a file by $download_id. * * @param string $download_id file identifier. * @return array|false if not found */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:2034
- ⇄⧉public get_file_download_path($download_id): string Get file download path identified by $download_id.$input->legacy_values['data']->get_file_download_path($download_id)
/** * Get file download path identified by $download_id. * * @param string $download_id file identifier. * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:2054
- ⇄⧉public get_price_suffix($price = '', $qty = 1): string Get the suffix to display after prices > 0.$input->legacy_values['data']->get_price_suffix($price = '', $qty = 1)
/** * Get the suffix to display after prices > 0. * * @param string $price to calculate, left blank to just use get_price(). * @param integer $qty passed on to get_price_including_tax() or get_price_excluding_tax(). * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:2069
- ⇄⧉public get_availability(): string[] Returns the availability of the product.$input->legacy_values['data']->get_availability()
/** * Returns the availability of the product. * * @return string[] */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:2091
- ⧉public __isset($key): bool Magic __isset method for backwards compatibility. Legacy properties which could ...
/** * Magic __isset method for backwards compatibility. Legacy properties which could be accessed directly in the past. * * @param string $key Key name. * @return bool */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:26
- ⧉public __get($key): mixed Magic __get method for backwards compatibility. Maps legacy vars to new getters.
/** * Magic __get method for backwards compatibility. Maps legacy vars to new getters. * * @param string $key Key name. * @return mixed */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:66
- ⇄⧉public get_variation_default_attributes(): array If set, get the default attributes for a variable product.$input->legacy_values['data']->get_variation_default_attributes()
/** * If set, get the default attributes for a variable product. * * @deprecated 3.0.0 * @return array */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:163
- ⇄⧉public get_gallery_attachment_ids(): array Returns the gallery attachment ids.$input->legacy_values['data']->get_gallery_attachment_ids()
/** * Returns the gallery attachment ids. * * @deprecated 3.0.0 * @return array */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:174
- ⇄⧉public set_stock($amount = null, $mode = 'set'): int Set stock level of the product.$input->legacy_values['data']->set_stock($amount = null, $mode = 'set')
/** * Set stock level of the product. * * @deprecated 3.0.0 * * @param int $amount * @param string $mode * * @return int */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:189
- ⇄⧉public reduce_stock($amount = 1): int new stock level Reduce stock level of the product.$input->legacy_values['data']->reduce_stock($amount = 1)
/** * Reduce stock level of the product. * * @deprecated 3.0.0 * @param int $amount Amount to reduce by. Default: 1 * @return int new stock level */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:201
- ⇄⧉public increase_stock($amount = 1): int new stock level Increase stock level of the product.$input->legacy_values['data']->increase_stock($amount = 1)
/** * Increase stock level of the product. * * @deprecated 3.0.0 * @param int $amount Amount to increase by. Default 1. * @return int new stock level */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:213
- ⇄⧉public check_stock_status() Check if the stock status needs changing.$input->legacy_values['data']->check_stock_status()
/** * Check if the stock status needs changing. * * @deprecated 3.0.0 Sync is done automatically on read/save, so calling this should not be needed any more. */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:223
- ⇄⧉public get_related($limit = 5): array Get and return related products.$input->legacy_values['data']->get_related($limit = 5)
/** * Get and return related products. * @deprecated 3.0.0 Use wc_get_related_products instead. * * @param int $limit * * @return array */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:235
- ⇄⧉public get_child($child_id): WC_Product|WC_Product|WC_Product_variation Returns the child product.$input->legacy_values['data']->get_child($child_id)
/** * Returns the child product. * @deprecated 3.0.0 Use wc_get_product instead. * @param mixed $child_id * @return WC_Product|WC_Product|WC_Product_variation */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:274
- ⇄⧉public get_price_html_from_text(): string Functions for getting parts of a price, in html, used by get_price_html.$input->legacy_values['data']->get_price_html_from_text()
/** * Functions for getting parts of a price, in html, used by get_price_html. * * @deprecated 3.0.0 * @return string */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:285
- ⇄⧉public get_price_html_from_to($from, $to): string Functions for getting parts of a price, in html, used by get_price_html.$input->legacy_values['data']->get_price_html_from_to($from, $to)
/** * Functions for getting parts of a price, in html, used by get_price_html. * * @deprecated 3.0.0 Use wc_format_sale_price instead. * @param string $from String or float to wrap with 'from' text * @param mixed $to String or float to wrap with 'to' text * @return string */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:298
- ⇄⧉public list_attributes() Lists a table of attributes for the product page.$input->legacy_values['data']->list_attributes()
/** * Lists a table of attributes for the product page. * @deprecated 3.0.0 Use wc_display_product_attributes instead. */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:307
- ⇄⧉public get_price_including_tax($qty = 1, $price = ''): string Returns the price (including tax). Uses customer tax rates. Can work for a speci...$input->legacy_values['data']->get_price_including_tax($qty = 1, $price = '')
/** * Returns the price (including tax). Uses customer tax rates. Can work for a specific $qty for more accurate taxes. * * @deprecated 3.0.0 Use wc_get_price_including_tax instead. * @param int $qty * @param string $price to calculate, left blank to just use get_price() * @return string */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:320
- ⇄⧉public get_display_price($price = '', $qty = 1): string Returns the price including or excluding tax, based on the 'woocommerce_tax_disp...$input->legacy_values['data']->get_display_price($price = '', $qty = 1)
/** * Returns the price including or excluding tax, based on the 'woocommerce_tax_display_shop' setting. * * @deprecated 3.0.0 Use wc_get_price_to_display instead. * @param string $price to calculate, left blank to just use get_price() * @param integer $qty passed on to get_price_including_tax() or get_price_excluding_tax() * @return string */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:333
- ⇄⧉public get_price_excluding_tax($qty = 1, $price = ''): string Returns the price (excluding tax) - ignores tax_class filters since the price ma...$input->legacy_values['data']->get_price_excluding_tax($qty = 1, $price = '')
/** * Returns the price (excluding tax) - ignores tax_class filters since the price may *include* tax and thus needs subtracting. * Uses store base tax rates. Can work for a specific $qty for more accurate taxes. * * @deprecated 3.0.0 Use wc_get_price_excluding_tax instead. * @param int $qty * @param string $price to calculate, left blank to just use get_price() * @return string */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:347
- ⇄⧉public adjust_price($price) Adjust a products price dynamically.$input->legacy_values['data']->adjust_price($price)
/** * Adjust a products price dynamically. * * @deprecated 3.0.0 * @param mixed $price */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:358
- ⇄⧉public get_categories($sep = ', ', $before = '', $after = ''): string Returns the product categories.$input->legacy_values['data']->get_categories($sep = ', ', $before = '', $after = '')
/** * Returns the product categories. * * @deprecated 3.0.0 * @param string $sep (default: ', '). * @param string $before (default: ''). * @param string $after (default: ''). * @return string */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:372
- ⇄⧉public get_tags($sep = ', ', $before = '', $after = ''): array Returns the product tags.$input->legacy_values['data']->get_tags($sep = ', ', $before = '', $after = '')
/** * Returns the product tags. * * @deprecated 3.0.0 * @param string $sep (default: ', '). * @param string $before (default: ''). * @param string $after (default: ''). * @return array */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:386
- ⇄⧉public get_post_data(): WP_Post Get the product's post data.$input->legacy_values['data']->get_post_data()
/** * Get the product's post data. * * @deprecated 3.0.0 * @return WP_Post */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:397
- ⇄⧉public get_parent(): int Get the parent of the post.$input->legacy_values['data']->get_parent()
/** * Get the parent of the post. * * @deprecated 3.0.0 * @return int */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:416
- ⇄⧉public get_upsells(): array Returns the upsell product ids.$input->legacy_values['data']->get_upsells()
/** * Returns the upsell product ids. * * @deprecated 3.0.0 * @return array */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:427
- ⇄⧉public get_cross_sells(): array Returns the cross sell product ids.$input->legacy_values['data']->get_cross_sells()
/** * Returns the cross sell product ids. * * @deprecated 3.0.0 * @return array */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:438
- ⇄⧉public has_default_attributes(): bool Check if variable product has default attributes set.$input->legacy_values['data']->has_default_attributes()
/** * Check if variable product has default attributes set. * * @deprecated 3.0.0 * @return bool */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:449
- ⇄⧉public get_variation_id(): int Get variation ID.$input->legacy_values['data']->get_variation_id()
/** * Get variation ID. * * @deprecated 3.0.0 * @return int */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:463
- ⇄⧉public get_variation_description(): string Get product variation description.$input->legacy_values['data']->get_variation_description()
/** * Get product variation description. * * @deprecated 3.0.0 * @return string */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:474
- ⇄⧉public has_all_attributes_set(): boolean Check if all variation's attributes are set.$input->legacy_values['data']->has_all_attributes_set()
/** * Check if all variation's attributes are set. * * @deprecated 3.0.0 * @return boolean */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:485
- ⇄⧉public parent_is_visible(): bool Returns whether or not the variations parent is visible.$input->legacy_values['data']->parent_is_visible()
/** * Returns whether or not the variations parent is visible. * * @deprecated 3.0.0 * @return bool */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:505
- ⇄⧉public get_total_stock(): int Get total stock - This is the stock of parent and children combined.$input->legacy_values['data']->get_total_stock()
/** * Get total stock - This is the stock of parent and children combined. * * @deprecated 3.0.0 * @return int */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:516
- ⇄⧉public get_formatted_variation_attributes($flat = false): string Get formatted variation data with WC < 2.4 back compat and proper formatting of ...$input->legacy_values['data']->get_formatted_variation_attributes($flat = false)
/** * Get formatted variation data with WC < 2.4 back compat and proper formatting of text-based attribute names. * * @deprecated 3.0.0 * * @param bool $flat * * @return string */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:542
- ⇄⧉public variable_product_sync($product_id0) Sync variable product prices with the children lowest/highest prices.$input->legacy_values['data']->variable_product_sync($product_id0)
/** * Sync variable product prices with the children lowest/highest prices. * * @deprecated 3.0.0 not used in core. * * @param int $product_id */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:554
- ⇄⧉public get_matching_variation($match_attributes = array()) Match a variation to a given set of attributes using a WP_Query.$input->legacy_values['data']->get_matching_variation($match_attributes = array())
/** * Match a variation to a given set of attributes using a WP_Query. * @deprecated 3.0.0 in favour of Product data store's find_matching_product_variation. * * @param array $match_attributes */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:620
- ⇄⧉public enable_dimensions_display(): bool Returns whether or not we are showing dimensions on the product page.$input->legacy_values['data']->enable_dimensions_display()
/** * Returns whether or not we are showing dimensions on the product page. * @deprecated 3.0.0 Unused. * @return bool */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:631
- ⇄⧉public get_rating_html($rating = null): string Returns the product rating in html format.$input->legacy_values['data']->get_rating_html($rating = null)
/** * Returns the product rating in html format. * * @deprecated 3.0.0 * @param string $rating (default: '') * @return string */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:643
- ⇄⧉public get_files(): array Same as get_downloads in CRUD.$input->legacy_values['data']->get_files()
/** * Same as get_downloads in CRUD. * * @deprecated 3.0.0 * @return array */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:681
- ⇄⧉public grouped_product_sync()$input->legacy_values['data']->grouped_product_sync()
/** * @deprecated 3.0.0 Sync is taken care of during save - no need to call this directly. */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:689
- ⧉public __sleep(): array Only store the object ID to avoid serializing the data object instance.
/** * Only store the object ID to avoid serializing the data object instance. * * @return array */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:135
- ⧉public __wakeup() Re-run the constructor with the object ID.
/** * Re-run the constructor with the object ID. * * If the object no longer exists, remove the ID. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:144
- ⇄⧉public __clone() When the object is cloned, make sure meta is duplicated correctly.clone $input->legacy_values['data']
/** * When the object is cloned, make sure meta is duplicated correctly. * * @since 3.0.2 */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:158
- ⇄⧉public get_data_store(): object Get the data store.$input->legacy_values['data']->get_data_store()
/** * Get the data store. * * @since 3.0.0 * @return object */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:176
- ⇄⧉public get_id(): int Returns the unique ID for this object.$input->legacy_values['data']->get_id()
/** * Returns the unique ID for this object. * * @since 2.6.0 * @return int */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:186
- ⇄⧉public __toString(): string Change data to JSON format.(string) $input->legacy_values['data']
/** * Change data to JSON format. * * @since 2.6.0 * @return string Data in JSON format. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:248
- ⇄⧉public get_data(): array Returns all data for this object.$input->legacy_values['data']->get_data()
/** * Returns all data for this object. * * @since 2.6.0 * @return array */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:258
- ⇄⧉public get_data_keys(): array Returns array of expected data keys for this object.$input->legacy_values['data']->get_data_keys()
/** * Returns array of expected data keys for this object. * * @since 3.0.0 * @return array */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:268
- ⇄⧉public get_extra_data_keys(): array Returns all "extra" data keys for an object (for sub objects like product types)...$input->legacy_values['data']->get_extra_data_keys()
/** * Returns all "extra" data keys for an object (for sub objects like product types). * * @since 3.0.0 * @return array */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:278
- ⇄⧉public get_meta_data(): array of objects. Get All Meta Data.$input->legacy_values['data']->get_meta_data()
/** * Get All Meta Data. * * @since 2.6.0 * @return array of objects. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:299
- ⇄⧉public get_meta($key = '', $single = true, $context = 'view'): mixed Get Meta Data by Key.$input->legacy_values['data']->get_meta($key = '', $single = true, $context = 'view')
/** * Get Meta Data by Key. * * @since 2.6.0 * @param string $key Meta Key. * @param bool $single return first found meta with key, or all with $key. * @param string $context What the value is for. Valid values are view and edit. * @return mixed */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:343
- ⇄⧉public meta_exists($key = ''): boolean See if meta data exists, since get_meta always returns a '' or array().$input->legacy_values['data']->meta_exists($key = '')
/** * See if meta data exists, since get_meta always returns a '' or array(). * * @since 3.0.0 * @param string $key Meta Key. * @return boolean */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:380
- ⇄⧉public set_meta_data($data) Set all meta data from array.$input->legacy_values['data']->set_meta_data($data)
/** * Set all meta data from array. * * @since 2.6.0 * @param array $data Key/Value pairs. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:392
- ⇄⧉public add_meta_data($key, $value, $unique = false) Add meta data.$input->legacy_values['data']->add_meta_data($key, $value, $unique = false)
/** * Add meta data. * * @since 2.6.0 * * @param string $key Meta key. * @param string|array $value Meta value. * @param bool $unique Should this be a unique key?. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:419
- ⇄⧉public update_meta_data($key, $value, $meta_id0) Update meta data by key or ID, if provided.$input->legacy_values['data']->update_meta_data($key, $value, $meta_id0)
/** * Update meta data by key or ID, if provided. * * @since 2.6.0 * * @param string $key Meta key. * @param string|array $value Meta value. * @param int $meta_id Meta ID. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:449
- ⇄⧉public delete_meta_data($key) Delete meta data.$input->legacy_values['data']->delete_meta_data($key)
/** * Delete meta data. * * @since 2.6.0 * @param string $key Meta key. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:498
- ⇄⧉public delete_meta_data_by_mid($mid) Delete meta data.$input->legacy_values['data']->delete_meta_data_by_mid($mid)
/** * Delete meta data. * * @since 2.6.0 * @param int $mid Meta ID. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:515
- ⇄⧉public get_meta_cache_key(): string Helper method to compute meta cache key. Different from WP Meta cache key in tha...$input->legacy_values['data']->get_meta_cache_key()
/** * Helper method to compute meta cache key. Different from WP Meta cache key in that meta data cached using this key also contains meta_id column. * * @since 4.7.0 * * @return string */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:544
- ⇄⧉public read_meta_data($force_read = false) Read Meta Data from the database. Ignore any internal properties. Uses it's own ...$input->legacy_values['data']->read_meta_data($force_read = false)
/** * Read Meta Data from the database. Ignore any internal properties. * Uses it's own caches because get_metadata does not provide meta_ids. * * @since 2.6.0 * @param bool $force_read True to force a new DB read (and update cache). */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:588
- ⇄⧉public init_meta_data(array $filtered_meta_data = array()) Helper function to initialize metadata entries from filtered raw meta data.$input->legacy_values['data']->init_meta_data(array $filtered_meta_data = array())
/** * Helper function to initialize metadata entries from filtered raw meta data. * * @param array $filtered_meta_data Filtered metadata fetched from DB. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:628
- ⇄⧉public save_meta_data() Update Meta Data in the database.$input->legacy_values['data']->save_meta_data()
/** * Update Meta Data in the database. * * @since 2.6.0 */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:646
- ⇄⧉public set_id($id) Set ID.$input->legacy_values['data']->set_id($id)
/** * Set ID. * * @since 3.0.0 * @param int $id ID. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:678
- ⇄⧉public set_defaults() Set all props to default values.$input->legacy_values['data']->set_defaults()
/** * Set all props to default values. * * @since 3.0.0 */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:687
- ⇄⧉public set_object_read($read = true) Set object read property.$input->legacy_values['data']->set_object_read($read = true)
/** * Set object read property. * * @since 3.0.0 * @param boolean $read Should read?. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:699
- ⇄⧉public get_object_read(): boolean Get object read property.$input->legacy_values['data']->get_object_read()
/** * Get object read property. * * @since 3.0.0 * @return boolean */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:709
- ⇄⧉public set_props($props, $context = 'set'): bool|WP_Error Set a collection of props in one go, collect any errors, and return the result. ...$input->legacy_values['data']->set_props($props, $context = 'set')
/** * Set a collection of props in one go, collect any errors, and return the result. * Only sets using public methods. * * @since 3.0.0 * * @param array $props Key value pairs to set. Key is the prop and should map to a setter function name. * @param string $context In what context to run this. * * @return bool|WP_Error */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:724
- ⇄⧉public get_changes(): array Return data changes only.$input->legacy_values['data']->get_changes()
/** * Return data changes only. * * @since 3.0.0 * @return array */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:779
- ⇄⧉public apply_changes() Merge changes with data and clear.$input->legacy_values['data']->apply_changes()
/** * Merge changes with data and clear. * * @since 3.0.0 */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:788
- ⧉protected get_valid_tax_classes(): array valid tax classes Return an array of valid tax classes
/** * Return an array of valid tax classes * * @return array valid tax classes */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:936
- ⧉protected before_data_store_save_or_update(): mixed A state value that will be passed to after_data_store_save_or_update. Do any extra processing needed before the actual product save (but after trigger...
/** * Do any extra processing needed before the actual product save * (but after triggering the 'woocommerce_before_..._object_save' action) * * @return mixed A state value that will be passed to after_data_store_save_or_update. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1450
- ⧉protected after_data_store_save_or_update($state) Do any extra processing needed after the actual product save (but before trigger...
/** * Do any extra processing needed after the actual product save * (but before triggering the 'woocommerce_after_..._object_save' action) * * @param mixed $state The state object that was returned by before_data_store_save_or_update. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1459
- ⧉protected maybe_defer_product_sync() If this is a child product, queue its parent for syncing at the end of the reque...
/** * If this is a child product, queue its parent for syncing at the end of the request. */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1484
- ⧉protected is_visible_core(): bool Returns whether or not the product is visible in the catalog (doesn't trigger fi...
/** * Returns whether or not the product is visible in the catalog (doesn't trigger filters). * * @return bool */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1582
- ⧉protected get_availability_text(): string Get availability text based on stock status.
/** * Get availability text based on stock status. * * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:2107
- ⧉protected get_availability_class(): string Get availability classname based on stock status.
/** * Get availability classname based on stock status. * * @return string */ Inherited from WC_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:2127
- ⧉protected get_related_terms($term): array Retrieves related product terms.
/** * Retrieves related product terms. * @deprecated 3.0.0 Use wc_get_product_term_ids instead. * * @param $term * * @return array */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:248
- ⧉protected build_related_query($cats_array, $tags_array, $exclude_ids, $limit) Builds the related posts query.
/** * Builds the related posts query. * @deprecated 3.0.0 Use Product Data Store get_related_products_query instead. * * @param $cats_array * @param $tags_array * @param $exclude_ids * @param $limit */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:262
- ⧉protected filter_null_meta($meta): bool Filter null meta values from array.
/** * Filter null meta values from array. * * @since 3.0.0 * @param mixed $meta Meta value to check. * @return bool */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:289
- ⧉protected is_internal_meta_key($key): bool true if it's an internal key, false otherwise Check if the key is an internal one.
/** * Check if the key is an internal one. * * @since 3.2.0 * @param string $key Key to check. * @return bool true if it's an internal key, false otherwise */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:311
- ⧉protected maybe_read_meta_data() Read meta data if null.
/** * Read meta data if null. * * @since 3.0.0 */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:531
- ⧉protected set_prop($prop, $value) Sets a prop for a setter method.
/** * Sets a prop for a setter method. * * This stores changes in a special array so we can track what needs saving * the the DB later. * * @since 3.0.0 * @param string $prop Name of prop to set. * @param mixed $value Value of the prop. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:761
- ⧉protected get_hook_prefix(): string Prefix for action and filter hooks on data.
/** * Prefix for action and filter hooks on data. * * @since 3.0.0 * @return string */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:799
- ⧉protected get_prop($prop, $context = 'view'): mixed Gets a prop for a getter method.
/** * Gets a prop for a getter method. * * Gets the value from either current pending changes, or the data itself. * Context controls what happens to the value before it's returned. * * @since 3.0.0 * @param string $prop Name of prop to get. * @param string $context What the value is for. Valid values are view and edit. * @return mixed */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:814
- ⧉protected set_date_prop($prop, $value) Sets a date prop whilst handling formatting and datetime objects.
/** * Sets a date prop whilst handling formatting and datetime objects. * * @since 3.0.0 * @param string $prop Name of prop to set. * @param string|integer $value Value of the prop. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:835
- ⧉protected error($code, $message, $http_status_code = 400, $data = array()) When invalid data is found, throw an exception unless reading from the DB.
/** * When invalid data is found, throw an exception unless reading from the DB. * * @throws WC_Data_Exception Data Exception. * @since 3.0.0 * @param string $code Error code. * @param string $message Error message. * @param int $http_status_code HTTP status code. * @param array $data Extra error data. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:879
- ⇄⧉public static sync_attributes($product, $children = false) Sync the variable product's attributes with the variations.\WC_Abstract_Legacy_Product::sync_attributes($product, $children = false)
/** * Sync the variable product's attributes with the variations. * * @param $product * @param bool $children */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:572
- ⇄⧉public static sync_average_rating($post_id) Sync product rating. Can be called statically.\WC_Abstract_Legacy_Product::sync_average_rating($post_id)
/** * Sync product rating. Can be called statically. * * @deprecated 3.0.0 * @param int $post_id */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:654
- ⇄⧉public static sync_rating_count($post_id) Sync product rating count. Can be called statically.\WC_Abstract_Legacy_Product::sync_rating_count($post_id)
/** * Sync product rating count. Can be called statically. * * @deprecated 3.0.0 * @param int $post_id */ Inherited from WC_Abstract_Legacy_Product Defined in <ROOT>/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-product.php:669
- ⇄⧉public static generate_meta_cache_key($id, $cache_group): string Meta cache key. Generate cache key from id and group.\WC_Data::generate_meta_cache_key($id, $cache_group)
/** * Generate cache key from id and group. * * @since 4.7.0 * * @param int|string $id Object ID. * @param string $cache_group Group name use to store cache. Whole group cache can be invalidated in one go. * * @return string Meta cache key. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:562
- ⇄⧉public static prime_raw_meta_data_cache($raw_meta_data_collection, $cache_group) Prime caches for raw meta data. This includes meta_id column as well, which is n...\WC_Data::prime_raw_meta_data_cache($raw_meta_data_collection, $cache_group)
/** * Prime caches for raw meta data. This includes meta_id column as well, which is not included by default in WP meta data. * * @since 4.7.0 * * @param array $raw_meta_data_collection Array of objects of { object_id => array( meta_row_1, meta_row_2, ... }. * @param string $cache_group Name of cache group. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:574
- ⇄⧉public __construct($product0) Initialize simple product.
- ⇄key => string (32) "56dc0997d871e9177069bb472574eb29"
- ⇄public legacy_cart_item_key -> string (32) "56dc0997d871e9177069bb472574eb29"$input->legacy_cart_item_key
- ⇄⧉public set_quantity($value) Set quantity.$input->set_quantity($value)
/** * Set quantity. * * @param int $value Quantity. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:49
- ⇄⧉public set_tax_class($value) Set tax class.$input->set_tax_class($value)
/** * Set tax class. * * @param string $value Tax class. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:58
- ⇄⧉public set_product_id($value) Set Product ID$input->set_product_id($value)
/** * Set Product ID * * @param int $value Product ID. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:70
- ⇄⧉public set_variation_id($value) Set variation ID.$input->set_variation_id($value)
/** * Set variation ID. * * @param int $value Variation ID. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:82
- ⇄⧉public set_subtotal($value) Line subtotal (before discounts).$input->set_subtotal($value)
/** * Line subtotal (before discounts). * * @param string $value Subtotal. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:94
- ⇄⧉public set_total($value) Line total (after discounts).$input->set_total($value)
/** * Line total (after discounts). * * @param string $value Total. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:109
- ⇄⧉public set_subtotal_tax($value) Line subtotal tax (before discounts).$input->set_subtotal_tax($value)
/** * Line subtotal tax (before discounts). * * @param string $value Subtotal tax. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:129
- ⇄⧉public set_total_tax($value) Line total tax (after discounts).$input->set_total_tax($value)
/** * Line total tax (after discounts). * * @param string $value Total tax. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:138
- ⇄⧉public set_taxes($raw_tax_data) Set line taxes and totals for passed in taxes.$input->set_taxes($raw_tax_data)
/** * Set line taxes and totals for passed in taxes. * * @param array $raw_tax_data Raw tax data. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:147
- ⇄⧉public set_variation($data = array()) Set variation data (stored as meta data - write only).$input->set_variation($data = array())
/** * Set variation data (stored as meta data - write only). * * @param array $data Key/Value pairs. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:178
- ⇄⧉public set_product($product) Set properties based on passed in product object.$input->set_product($product)
/** * Set properties based on passed in product object. * * @param WC_Product $product Product instance. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:191
- ⇄⧉public set_backorder_meta() Set meta data for backordered products.$input->set_backorder_meta()
/** * Set meta data for backordered products. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:209
- ⇄⧉public get_type(): string Get order item type.$input->get_type()
/** * Get order item type. * * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:227
- ⇄⧉public get_product_id($context = 'view'): int Get product ID.$input->get_product_id($context = 'view')
/** * Get product ID. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return int */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:237
- ⇄⧉public get_variation_id($context = 'view'): int Get variation ID.$input->get_variation_id($context = 'view')
/** * Get variation ID. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return int */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:247
- ⇄⧉public get_quantity($context = 'view'): int Get quantity.$input->get_quantity($context = 'view')
/** * Get quantity. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return int */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:257
- ⇄⧉public get_tax_class($context = 'view'): string Get tax class.$input->get_tax_class($context = 'view')
/** * Get tax class. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:267
- ⇄⧉public get_subtotal($context = 'view'): string Get subtotal.$input->get_subtotal($context = 'view')
/** * Get subtotal. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:277
- ⇄⧉public get_subtotal_tax($context = 'view'): string Get subtotal tax.$input->get_subtotal_tax($context = 'view')
/** * Get subtotal tax. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:287
- ⇄⧉public get_total($context = 'view'): string Get total.$input->get_total($context = 'view')
/** * Get total. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:297
- ⇄⧉public get_total_tax($context = 'view'): string Get total tax.$input->get_total_tax($context = 'view')
/** * Get total tax. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:307
- ⇄⧉public get_taxes($context = 'view'): array Get taxes.$input->get_taxes($context = 'view')
/** * Get taxes. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:317
- ⇄⧉public get_product(): WC_Product|bool Get the associated product.$input->get_product()
/** * Get the associated product. * * @return WC_Product|bool */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:326
- ⇄⧉public get_item_download_url($download_id): string Get the Download URL.$input->get_item_download_url($download_id)
/** * Get the Download URL. * * @param int $download_id Download ID. * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:347
- ⇄⧉public get_item_downloads(): array Get any associated downloadable files.$input->get_item_downloads()
/** * Get any associated downloadable files. * * @return array */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:366
- ⇄⧉public get_tax_status(): string Get tax status.$input->get_tax_status()
/** * Get tax status. * * @return string */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:411
- ⇄⧉public offsetGet($offset): mixed OffsetGet for ArrayAccess/Backwards compatibility.$input->offsetGet($offset)
/** * OffsetGet for ArrayAccess/Backwards compatibility. * * @param string $offset Offset. * @return mixed */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:432
- ⇄⧉public offsetSet($offset, $value) OffsetSet for ArrayAccess/Backwards compatibility.$input->offsetSet($offset, $value)
/** * OffsetSet for ArrayAccess/Backwards compatibility. * * @deprecated 4.4.0 * @param string $offset Offset. * @param mixed $value Value. */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:457
- ⇄⧉public offsetExists($offset): bool OffsetExists for ArrayAccess.$input->offsetExists($offset)
/** * OffsetExists for ArrayAccess. * * @param string $offset Offset. * @return bool */ Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php:482
- ⇄⧉public __construct($item0) Constructor.new \WC_Order_Item_Product($item0)
/** * Constructor. * * @param int|object|array $item ID to load from the DB, or WC_Order_Item object. */ Inherited from WC_Order_Item Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item.php:60
- ⇄⧉public apply_changes() Merge changes with data and clear. Overrides WC_Data::apply_changes. array_repla...$input->apply_changes()
/** * Merge changes with data and clear. * Overrides WC_Data::apply_changes. * array_replace_recursive does not work well for order items because it merges taxes instead * of replacing them. * * @since 3.2.0 */ Inherited from WC_Order_Item Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item.php:86
- ⇄⧉public get_order_id($context = 'view'): int Get order ID this meta belongs to.$input->get_order_id($context = 'view')
/** * Get order ID this meta belongs to. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return int */ Inherited from WC_Order_Item Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item.php:109
- ⇄⧉public get_name($context = 'view'): string Get order item name.$input->get_name($context = 'view')
/** * Get order item name. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return string */ Inherited from WC_Order_Item Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item.php:119
- ⇄⧉public get_order(): WC_Order Get parent order object.$input->get_order()
/** * Get parent order object. * * @return WC_Order */ Inherited from WC_Order_Item Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item.php:164
- ⇄⧉public set_order_id($value) Set order ID.$input->set_order_id($value)
/** * Set order ID. * * @param int $value Order ID. */ Inherited from WC_Order_Item Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item.php:179
- ⇄⧉public set_name($value) Set order item name.$input->set_name($value)
/** * Set order item name. * * @param string $value Item name. */ Inherited from WC_Order_Item Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item.php:188
- ⇄⧉public is_type($type): boolean Type checking.$input->is_type($type)
/** * Type checking. * * @param string|array $type Type. * @return boolean */ Inherited from WC_Order_Item Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item.php:204
- ⇄⧉public calculate_taxes($calculate_tax_for = array()): bool True if taxes were calculated. Calculate item taxes.$input->calculate_taxes($calculate_tax_for = array())
/** * Calculate item taxes. * * @since 3.2.0 * @param array $calculate_tax_for Location data to get taxes for. Required. * @return bool True if taxes were calculated. */ Inherited from WC_Order_Item Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item.php:215
- ⇄⧉public get_all_formatted_meta_data($hideprefix = '_', $include_all = true): array Wrapper for get_formatted_meta_data that includes all metadata by default. See h...$input->get_all_formatted_meta_data($hideprefix = '_', $include_all = true)
/** * Wrapper for get_formatted_meta_data that includes all metadata by default. See https://github.com/woocommerce/woocommerce/pull/30948 * * @param string $hideprefix Meta data prefix, (default: _). * @param bool $include_all Include all meta data, this stop skip items with values already in the product name. * @return array */ Inherited from WC_Order_Item Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item.php:257
- ⇄⧉public get_formatted_meta_data($hideprefix = '_', $include_all = false): array Expands things like term slugs before return.$input->get_formatted_meta_data($hideprefix = '_', $include_all = false)
/** * Expands things like term slugs before return. * * @param string $hideprefix Meta data prefix, (default: _). * @param bool $include_all Include all meta data, this stop skip items with values already in the product name. * @return array */ Inherited from WC_Order_Item Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item.php:268
- ⇄⧉public offsetUnset($offset) OffsetUnset for ArrayAccess.$input->offsetUnset($offset)
/** * OffsetUnset for ArrayAccess. * * @param string $offset Offset. */ Inherited from WC_Order_Item Defined in <ROOT>/wp-content/plugins/woocommerce/includes/class-wc-order-item.php:350
- ⧉public __sleep(): array Only store the object ID to avoid serializing the data object instance.
/** * Only store the object ID to avoid serializing the data object instance. * * @return array */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:135
- ⧉public __wakeup() Re-run the constructor with the object ID.
/** * Re-run the constructor with the object ID. * * If the object no longer exists, remove the ID. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:144
- ⇄⧉public __clone() When the object is cloned, make sure meta is duplicated correctly.clone $input
/** * When the object is cloned, make sure meta is duplicated correctly. * * @since 3.0.2 */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:158
- ⇄⧉public get_data_store(): object Get the data store.$input->get_data_store()
/** * Get the data store. * * @since 3.0.0 * @return object */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:176
- ⇄⧉public get_id(): int Returns the unique ID for this object.$input->get_id()
/** * Returns the unique ID for this object. * * @since 2.6.0 * @return int */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:186
- ⇄⧉public delete($force_delete = false): bool result Delete an object, set the ID to 0, and return result.$input->delete($force_delete = false)
/** * Delete an object, set the ID to 0, and return result. * * @since 2.6.0 * @param bool $force_delete Should the date be deleted permanently. * @return bool result */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:197
- ⇄⧉public save(): int Save should create or update based on object existence.$input->save()
/** * Save should create or update based on object existence. * * @since 2.6.0 * @return int */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:212
- ⇄⧉public __toString(): string Change data to JSON format.(string) $input
/** * Change data to JSON format. * * @since 2.6.0 * @return string Data in JSON format. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:248
- ⇄⧉public get_data(): array Returns all data for this object.$input->get_data()
/** * Returns all data for this object. * * @since 2.6.0 * @return array */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:258
- ⇄⧉public get_data_keys(): array Returns array of expected data keys for this object.$input->get_data_keys()
/** * Returns array of expected data keys for this object. * * @since 3.0.0 * @return array */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:268
- ⇄⧉public get_extra_data_keys(): array Returns all "extra" data keys for an object (for sub objects like product types)...$input->get_extra_data_keys()
/** * Returns all "extra" data keys for an object (for sub objects like product types). * * @since 3.0.0 * @return array */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:278
- ⇄⧉public get_meta_data(): array of objects. Get All Meta Data.$input->get_meta_data()
/** * Get All Meta Data. * * @since 2.6.0 * @return array of objects. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:299
- ⇄⧉public get_meta($key = '', $single = true, $context = 'view'): mixed Get Meta Data by Key.$input->get_meta($key = '', $single = true, $context = 'view')
/** * Get Meta Data by Key. * * @since 2.6.0 * @param string $key Meta Key. * @param bool $single return first found meta with key, or all with $key. * @param string $context What the value is for. Valid values are view and edit. * @return mixed */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:343
- ⇄⧉public meta_exists($key = ''): boolean See if meta data exists, since get_meta always returns a '' or array().$input->meta_exists($key = '')
/** * See if meta data exists, since get_meta always returns a '' or array(). * * @since 3.0.0 * @param string $key Meta Key. * @return boolean */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:380
- ⇄⧉public set_meta_data($data) Set all meta data from array.$input->set_meta_data($data)
/** * Set all meta data from array. * * @since 2.6.0 * @param array $data Key/Value pairs. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:392
- ⇄⧉public add_meta_data($key, $value, $unique = false) Add meta data.$input->add_meta_data($key, $value, $unique = false)
/** * Add meta data. * * @since 2.6.0 * * @param string $key Meta key. * @param string|array $value Meta value. * @param bool $unique Should this be a unique key?. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:419
- ⇄⧉public update_meta_data($key, $value, $meta_id0) Update meta data by key or ID, if provided.$input->update_meta_data($key, $value, $meta_id0)
/** * Update meta data by key or ID, if provided. * * @since 2.6.0 * * @param string $key Meta key. * @param string|array $value Meta value. * @param int $meta_id Meta ID. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:449
- ⇄⧉public delete_meta_data($key) Delete meta data.$input->delete_meta_data($key)
/** * Delete meta data. * * @since 2.6.0 * @param string $key Meta key. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:498
- ⇄⧉public delete_meta_data_by_mid($mid) Delete meta data.$input->delete_meta_data_by_mid($mid)
/** * Delete meta data. * * @since 2.6.0 * @param int $mid Meta ID. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:515
- ⇄⧉public get_meta_cache_key(): string Helper method to compute meta cache key. Different from WP Meta cache key in tha...$input->get_meta_cache_key()
/** * Helper method to compute meta cache key. Different from WP Meta cache key in that meta data cached using this key also contains meta_id column. * * @since 4.7.0 * * @return string */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:544
- ⇄⧉public read_meta_data($force_read = false) Read Meta Data from the database. Ignore any internal properties. Uses it's own ...$input->read_meta_data($force_read = false)
/** * Read Meta Data from the database. Ignore any internal properties. * Uses it's own caches because get_metadata does not provide meta_ids. * * @since 2.6.0 * @param bool $force_read True to force a new DB read (and update cache). */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:588
- ⇄⧉public init_meta_data(array $filtered_meta_data = array()) Helper function to initialize metadata entries from filtered raw meta data.$input->init_meta_data(array $filtered_meta_data = array())
/** * Helper function to initialize metadata entries from filtered raw meta data. * * @param array $filtered_meta_data Filtered metadata fetched from DB. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:628
- ⇄⧉public save_meta_data() Update Meta Data in the database.$input->save_meta_data()
/** * Update Meta Data in the database. * * @since 2.6.0 */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:646
- ⇄⧉public set_id($id) Set ID.$input->set_id($id)
/** * Set ID. * * @since 3.0.0 * @param int $id ID. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:678
- ⇄⧉public set_defaults() Set all props to default values.$input->set_defaults()
/** * Set all props to default values. * * @since 3.0.0 */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:687
- ⇄⧉public set_object_read($read = true) Set object read property.$input->set_object_read($read = true)
/** * Set object read property. * * @since 3.0.0 * @param boolean $read Should read?. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:699
- ⇄⧉public get_object_read(): boolean Get object read property.$input->get_object_read()
/** * Get object read property. * * @since 3.0.0 * @return boolean */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:709
- ⇄⧉public set_props($props, $context = 'set'): bool|WP_Error Set a collection of props in one go, collect any errors, and return the result. ...$input->set_props($props, $context = 'set')
/** * Set a collection of props in one go, collect any errors, and return the result. * Only sets using public methods. * * @since 3.0.0 * * @param array $props Key value pairs to set. Key is the prop and should map to a setter function name. * @param string $context In what context to run this. * * @return bool|WP_Error */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:724
- ⇄⧉public get_changes(): array Return data changes only.$input->get_changes()
/** * Return data changes only. * * @since 3.0.0 * @return array */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:779
- ⧉protected filter_null_meta($meta): bool Filter null meta values from array.
/** * Filter null meta values from array. * * @since 3.0.0 * @param mixed $meta Meta value to check. * @return bool */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:289
- ⧉protected is_internal_meta_key($key): bool true if it's an internal key, false otherwise Check if the key is an internal one.
/** * Check if the key is an internal one. * * @since 3.2.0 * @param string $key Key to check. * @return bool true if it's an internal key, false otherwise */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:311
- ⧉protected maybe_read_meta_data() Read meta data if null.
/** * Read meta data if null. * * @since 3.0.0 */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:531
- ⧉protected set_prop($prop, $value) Sets a prop for a setter method.
/** * Sets a prop for a setter method. * * This stores changes in a special array so we can track what needs saving * the the DB later. * * @since 3.0.0 * @param string $prop Name of prop to set. * @param mixed $value Value of the prop. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:761
- ⧉protected get_hook_prefix(): string Prefix for action and filter hooks on data.
/** * Prefix for action and filter hooks on data. * * @since 3.0.0 * @return string */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:799
- ⧉protected get_prop($prop, $context = 'view'): mixed Gets a prop for a getter method.
/** * Gets a prop for a getter method. * * Gets the value from either current pending changes, or the data itself. * Context controls what happens to the value before it's returned. * * @since 3.0.0 * @param string $prop Name of prop to get. * @param string $context What the value is for. Valid values are view and edit. * @return mixed */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:814
- ⧉protected set_date_prop($prop, $value) Sets a date prop whilst handling formatting and datetime objects.
/** * Sets a date prop whilst handling formatting and datetime objects. * * @since 3.0.0 * @param string $prop Name of prop to set. * @param string|integer $value Value of the prop. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:835
- ⧉protected error($code, $message, $http_status_code = 400, $data = array()) When invalid data is found, throw an exception unless reading from the DB.
/** * When invalid data is found, throw an exception unless reading from the DB. * * @throws WC_Data_Exception Data Exception. * @since 3.0.0 * @param string $code Error code. * @param string $message Error message. * @param int $http_status_code HTTP status code. * @param array $data Extra error data. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:879
- ⇄⧉public static generate_meta_cache_key($id, $cache_group): string Meta cache key. Generate cache key from id and group.\WC_Data::generate_meta_cache_key($id, $cache_group)
/** * Generate cache key from id and group. * * @since 4.7.0 * * @param int|string $id Object ID. * @param string $cache_group Group name use to store cache. Whole group cache can be invalidated in one go. * * @return string Meta cache key. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:562
- ⇄⧉public static prime_raw_meta_data_cache($raw_meta_data_collection, $cache_group) Prime caches for raw meta data. This includes meta_id column as well, which is n...\WC_Data::prime_raw_meta_data_cache($raw_meta_data_collection, $cache_group)
/** * Prime caches for raw meta data. This includes meta_id column as well, which is not included by default in WP meta data. * * @since 4.7.0 * * @param array $raw_meta_data_collection Array of objects of { object_id => array( meta_row_1, meta_row_2, ... }. * @param string $cache_group Name of cache group. */ Inherited from WC_Data Defined in <ROOT>/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:574
- ⇄⧉public set_quantity($value) Set quantity.