WooCommerce Code Reference
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Hook Reference
  • WooCommerce Docs
  • REST API Docs

Packages

  • None
  • WooCommerce
    • Abstracts
    • Admin
      • Customize
      • Functions
      • Importers
      • Meta
      • Reports
      • System
    • API
    • Classes
      • Data
        • Store
      • Emails
      • Embed
      • Integrations
      • Interfaces
      • Log
        • Handlers
      • Payment
      • Products
      • Shipping
      • Walkers
    • Export
    • Functions
    • Import
    • l10n
    • PaymentTokens
    • PayPal
    • Shortcodes
      • Cart
      • Checkout
      • My
        • Account
      • Order
        • Tracking
    • Webhooks
    • Widgets
  • WP-Background-Processing

Classes

  • WC_Comments
  • WC_Post_types
  • WC_Product_External
  • WC_Product_Grouped
  • WC_Product_Simple
  • WC_Product_Variable

Class WC_Product_Simple

Simple Product Class.

The default product type kinda product.

WC_Data
Extended by WC_Abstract_Legacy_Product
Extended by WC_Product
Extended by WC_Product_Simple

Direct known subclasses

WC_Product_Variation

Package: WooCommerce\Classes\Products
Category: Class
Author: WooThemes
Class: WC_Product_Simple
Located at class-wc-product-simple.php

Methods summary

public
# __construct( mixed $product = 0 )

Initialize simple product.

Initialize simple product.

Parameters

$product

Overrides

WC_Product::__construct
public string
# get_type( )

Get internal type.

Get internal type.

Returns

string

Overrides

WC_Product::get_type
public string
# add_to_cart_url( )

Get the add to url used mainly in loops.

Get the add to url used mainly in loops.

Returns

string

Overrides

WC_Product::add_to_cart_url
public string
# add_to_cart_text( )

Get the add to cart button text.

Get the add to cart button text.

Returns

string

Overrides

WC_Product::add_to_cart_text
public string
# add_to_cart_description( )

Get the add to cart button text description - used in aria tags.

Get the add to cart button text description - used in aria tags.

Returns

string

Since

3.3.0

Overrides

WC_Product::add_to_cart_description

Methods inherited from WC_Product

backorders_allowed(), backorders_require_notification(), child_has_dimensions(), child_has_weight(), exists(), get_attribute(), get_attributes(), get_availability(), get_availability_class(), get_availability_text(), get_average_rating(), get_backorders(), get_catalog_visibility(), get_category_ids(), get_children(), get_cross_sell_ids(), get_date_created(), get_date_modified(), get_date_on_sale_from(), get_date_on_sale_to(), get_default_attributes(), get_description(), get_dimensions(), get_download_expiry(), get_download_limit(), get_downloadable(), get_downloads(), get_featured(), get_file(), get_file_download_path(), get_formatted_name(), get_gallery_image_ids(), get_height(), get_image(), get_image_id(), get_length(), get_manage_stock(), get_max_purchase_quantity(), get_menu_order(), get_min_purchase_quantity(), get_name(), get_parent_id(), get_permalink(), get_price(), get_price_html(), get_price_suffix(), get_purchase_note(), get_rating_count(), get_rating_counts(), get_regular_price(), get_review_count(), get_reviews_allowed(), get_sale_price(), get_shipping_class(), get_shipping_class_id(), get_short_description(), get_sku(), get_slug(), get_sold_individually(), get_status(), get_stock_managed_by_id(), get_stock_quantity(), get_stock_status(), get_tag_ids(), get_tax_class(), get_tax_status(), get_title(), get_total_sales(), get_upsell_ids(), get_valid_tax_classes(), get_virtual(), get_weight(), get_width(), has_attributes(), has_child(), has_dimensions(), has_enough_stock(), has_file(), has_options(), has_weight(), is_downloadable(), is_featured(), is_in_stock(), is_on_backorder(), is_on_sale(), is_purchasable(), is_shipping_taxable(), is_sold_individually(), is_taxable(), is_type(), is_virtual(), is_visible(), managing_stock(), needs_shipping(), save(), set_attributes(), set_average_rating(), set_backorders(), set_catalog_visibility(), set_category_ids(), set_cross_sell_ids(), set_date_created(), set_date_modified(), set_date_on_sale_from(), set_date_on_sale_to(), set_default_attributes(), set_description(), set_download_expiry(), set_download_limit(), set_downloadable(), set_downloads(), set_featured(), set_gallery_image_ids(), set_height(), set_image_id(), set_length(), set_manage_stock(), set_menu_order(), set_name(), set_parent_id(), set_price(), set_purchase_note(), set_rating_counts(), set_regular_price(), set_review_count(), set_reviews_allowed(), set_sale_price(), set_shipping_class_id(), set_short_description(), set_sku(), set_slug(), set_sold_individually(), set_status(), set_stock_quantity(), set_stock_status(), set_tag_ids(), set_tax_class(), set_tax_status(), set_total_sales(), set_upsell_ids(), set_virtual(), set_weight(), set_width(), single_add_to_cart_text(), supports(), validate_props()

Methods inherited from WC_Abstract_Legacy_Product

__get(), __isset(), adjust_price(), build_related_query(), check_stock_status(), enable_dimensions_display(), get_categories(), get_child(), get_cross_sells(), get_display_price(), get_files(), get_formatted_variation_attributes(), get_gallery_attachment_ids(), get_matching_variation(), get_parent(), get_post_data(), get_price_excluding_tax(), get_price_html_from_text(), get_price_html_from_to(), get_price_including_tax(), get_rating_html(), get_related(), get_related_terms(), get_tags(), get_total_stock(), get_upsells(), get_variation_default_attributes(), get_variation_description(), get_variation_id(), grouped_product_sync(), has_all_attributes_set(), has_default_attributes(), increase_stock(), list_attributes(), parent_is_visible(), reduce_stock(), set_stock(), sync_attributes(), sync_average_rating(), sync_rating_count(), variable_product_sync()

Methods inherited from WC_Data

__clone(), __sleep(), __toString(), __wakeup(), add_meta_data(), apply_changes(), delete(), delete_meta_data(), delete_meta_data_by_mid(), error(), filter_null_meta(), get_changes(), get_data(), get_data_keys(), get_data_store(), get_extra_data_keys(), get_hook_prefix(), get_id(), get_meta(), get_meta_data(), get_object_read(), get_prop(), is_internal_meta_key(), maybe_read_meta_data(), meta_exists(), read_meta_data(), save_meta_data(), set_date_prop(), set_defaults(), set_id(), set_meta_data(), set_object_read(), set_prop(), set_props(), update_meta_data()

Properties summary

Properties inherited from WC_Product

$cache_group, $data, $object_type, $post_type, $supports

Properties inherited from WC_Data

$changes, $data_store, $default_data, $extra_data, $id, $meta_data, $object_read

WooCommerce Code Reference API documentation generated by ApiGen