includes/abstracts/abstract-wc-product.php


Lines:

1 to 100 of 184
<?php

/**
 * WooCommerce product base class.
 *
 * @package WooCommerce\Abstracts
 */

if ( ! defined( 'ABSPATH' ) ) {
  exit;
}

use Automattic\WooCommerce\Internal\ProductAttributesLookup\LookupDataStore as ProductAttributesLookupDataStore;


/**
 * Legacy product contains all deprecated methods for this class and can be
 * removed in the future.
 */
require_once WC_ABSPATH . 'includes/legacy/abstract-wc-legacy-product.php';

/* class WC_Product */
/* function WC_Product::__construct() – Get the product if ID is passed, otherwise the product is new and empty. */
/* function WC_Product::get_type() – Get internal type. Should return string and *should be overridden* by child classes. */
/* function WC_Product::get_name() – Get product name. */
/* function WC_Product::get_slug() – Get product slug. */
/* function WC_Product::get_date_created() – Get product created date. */
/* function WC_Product::get_date_modified() – Get product modified date. */
/* function WC_Product::get_status() – Get product status. */
/* function WC_Product::get_featured() – If the product is featured. */
/* function WC_Product::get_catalog_visibility() – Get catalog visibility. */
/* function WC_Product::get_description() – Get product description. */
/* function WC_Product::get_short_description() – Get product short description. */
/* function WC_Product::get_sku() – Get SKU (Stock-keeping unit) – product unique ID. */
/* function WC_Product::get_price() – Returns the product’s active price. */
/* function WC_Product::get_regular_price() – Returns the product’s regular price. */
/* function WC_Product::get_sale_price() – Returns the product’s sale price. */
/* function WC_Product::get_date_on_sale_from() – Get date on sale from. */
/* function WC_Product::get_date_on_sale_to() – Get date on sale to. */
/* function WC_Product::get_total_sales() – Get number total of sales. */
/* function WC_Product::get_tax_status() – Returns the tax status. */
/* function WC_Product::get_tax_class() – Returns the tax class. */
/* function WC_Product::get_manage_stock() – Return if product manage stock. */
/* function WC_Product::get_stock_quantity() – Returns number of items available for sale. */
/* function WC_Product::get_stock_status() – Return the stock status. */
/* function WC_Product::get_backorders() – Get backorders. */
/* function WC_Product::get_low_stock_amount() – Get low stock amount. */
/* function WC_Product::get_sold_individually() – Return if should be sold individually. */
/* function WC_Product::get_weight() – Returns the product’s weight. */
/* function WC_Product::get_length() – Returns the product length. */
/* function WC_Product::get_width() – Returns the product width. */
/* function WC_Product::get_height() – Returns the product height. */
/* function WC_Product::get_dimensions() – Returns formatted dimensions. */
/* function WC_Product::get_upsell_ids() – Get upsell IDs. */
/* function WC_Product::get_cross_sell_ids() – Get cross sell IDs. */
/* function WC_Product::get_parent_id() – Get parent ID. */
/* function WC_Product::get_reviews_allowed() – Return if reviews is allowed. */
/* function WC_Product::get_purchase_note() – Get purchase note. */
/* function WC_Product::get_attributes() – Returns product attributes. */
/* function WC_Product::get_default_attributes() – Get default attributes. */
/* function WC_Product::get_menu_order() – Get menu order. */
/* function WC_Product::get_post_password() – Get post password. */
/* function WC_Product::get_category_ids() – Get category ids. */
/* function WC_Product::get_tag_ids() – Get tag ids. */
/* function WC_Product::get_virtual() – Get virtual. */
/* function WC_Product::get_gallery_image_ids() – Returns the gallery attachment ids. */
/* function WC_Product::get_shipping_class_id() – Get shipping class ID. */
/* function WC_Product::get_downloads() – Get downloads. */
/* function WC_Product::get_download_expiry() – Get download expiry. */
/* function WC_Product::get_downloadable() – Get downloadable. */
/* function WC_Product::get_download_limit() – Get download limit. */
/* function WC_Product::get_image_id() – Get main image ID. */
/* function WC_Product::get_rating_counts() – Get rating count. */
/* function WC_Product::get_average_rating() – Get average rating. */
/* function WC_Product::get_review_count() – Get review count. */
/* function WC_Product::set_name() – Set product name. */
/* function WC_Product::set_slug() – Set product slug. */
/* function WC_Product::set_date_created() – Set product created date. */
/* function WC_Product::set_date_modified() – Set product modified date. */
/* function WC_Product::set_status() – Set product status. */
/* function WC_Product::set_featured() – Set if the product is featured. */
/* function WC_Product::set_catalog_visibility() – Set catalog visibility. */
/* function WC_Product::set_description() – Set product description. */
/* function WC_Product::set_short_description() – Set product short description. */
/* function WC_Product::set_sku() – Set SKU. */
/* function WC_Product::set_price() – Set the product’s active price. */
/* function WC_Product::set_regular_price() – Set the product’s regular price. */
/* function WC_Product::set_sale_price() – Set the product’s sale price. */
/* function WC_Product::set_date_on_sale_from() – Set date on sale from. */
/* function WC_Product::set_date_on_sale_to() – Set date on sale to. */
/* function WC_Product::set_total_sales() – Set number total of sales. */
/* function WC_Product::set_tax_status() – Set the tax status. */
/* function WC_Product::set_tax_class() – Set the tax class. */
/* function WC_Product::get_valid_tax_classes() – Return an array of valid tax classes */
/* function WC_Product::set_manage_stock() – Set if product manage stock. */
/* function WC_Product::set_stock_quantity() – Set number of items available for sale. */
/* function WC_Product::set_stock_status() – Set stock status. */
/* function WC_Product::set_backorders() – Set backorders. */
/* function WC_Product::set_low_stock_amount() – Set low stock amount. */
/* function WC_Product::set_sold_individually() – Set if should be sold individually. */

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      Call hooks

      API Letters: ,,,