Méthode |
Description |
|
find_matching_product_variation ( WC_Product $product, array $match_attributes = [] ) : integer |
Find a matching (enabled) variation within a variable product. |
|
get_ending_sales ( ) : array |
Returns an array of IDs of products that have sales which are due to end. |
|
get_featured_product_ids ( ) : array |
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). |
|
get_on_sale_products ( ) : array |
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. |
|
get_product_id_by_sku ( string $sku ) : integer |
Return product ID based on SKU. |
|
get_products ( array $args = [] ) : array |
Returns an array of products. |
|
get_related_products ( array $cats_array, array $tags_array, array $exclude_ids, integer $limit, integer $product_id ) : array |
Return a list of related products (using data like categories and IDs). |
|
get_shipping_class_id_by_slug ( $slug ) : integer | false |
Get shipping class ID by slug. |
|
get_starting_sales ( ) : array |
Returns an array of IDs of products that have sales starting soon. |
|
is_existing_sku ( integer $product_id, string $sku ) : boolean |
Check if product sku is found for any other product IDs. |
|
update_product_stock ( $product_id_with_stock, integer | null $stock_quantity = null, string $operation = 'set' ) |
Update a product's stock amount directly. |
|