• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WooCommerce a2z

WooCommerce a2z

WooCommerce

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / Classes / WC_Discounts

Methods

1 to 30 of 37
  • WC_Discounts::__construct() – WC_Discounts Constructor.
  • WC_Discounts::apply_coupon_custom() – Apply custom coupon discount to items.
  • WC_Discounts::apply_coupon_fixed_cart() – Apply fixed cart discount to items.
  • WC_Discounts::apply_coupon_fixed_product() – Apply fixed product discount to items.
  • WC_Discounts::apply_coupon_percent() – Apply percent discount to items and return an array of discounts granted.
  • WC_Discounts::apply_coupon_remainder() – Deal with remaining fractional discounts by splitting it over items until the amount is expired, discounting 1 cent at a time.
  • WC_Discounts::apply_coupon() – Apply a discount to all items using a coupon.
  • WC_Discounts::filter_products_with_price() – Filter out all products which have been fully discounted to 0.
  • WC_Discounts::get_discount() – Get discount by key with or without precision.
  • WC_Discounts::get_discounted_price_in_cents() – Get discounted price of an item to precision (in cents).
  • WC_Discounts::get_discounted_price() – Get discounted price of an item without precision.
  • WC_Discounts::get_discounts_by_coupon() – Get all discount totals per coupon.
  • WC_Discounts::get_discounts_by_item() – Get all discount totals per item.
  • WC_Discounts::get_discounts() – Get all discount totals.
  • WC_Discounts::get_items_to_apply_coupon() – Get items which the coupon should be applied to.
  • WC_Discounts::get_items_to_validate() – Get items to validate.
  • WC_Discounts::get_items() – Get items.
  • WC_Discounts::get_object_subtotal() – Get the object subtotal
  • WC_Discounts::get_object() – Get the object concerned.
  • WC_Discounts::is_coupon_valid() – Check if a coupon is valid.
  • WC_Discounts::set_items_from_cart() – Normalise cart items which will be discounted.
  • WC_Discounts::set_items_from_order() – Normalise order items which will be discounted.
  • WC_Discounts::set_items() – Set items directly. Used by WC_Cart_Totals.
  • WC_Discounts::sort_by_price() – Sort by price.
  • WC_Discounts::validate_coupon_eligible_items() – Cart discounts cannot be added if non-eligible product is found.
  • WC_Discounts::validate_coupon_excluded_items() – All exclusion rules must pass at the same time for a product coupon to be valid.
  • WC_Discounts::validate_coupon_excluded_product_categories() – Exclude categories from product list.
  • WC_Discounts::validate_coupon_excluded_product_ids() – Exclude products.
  • WC_Discounts::validate_coupon_exists() – Ensure coupon exists or throw exception.
  • WC_Discounts::validate_coupon_expiry_date() – Ensure coupon date is valid or throw exception.
[1] [2] Next »

Extended by

Class name: WC_Discounts
Plugin ref: WooCommerce
Version: 4.8.0
Sourcefile: includes/class-wc-discounts.php
File ref: includes/class-wc-discounts.php
API Letters: D,W

Published: 26th November 2019 | Last updated: 10th December 2020

Primary Sidebar

Information

Class name: WC_Discounts
Plugin ref: WooCommerce
Version: 4.8.0
Sourcefile: includes/class-wc-discounts.php
File ref: includes/class-wc-discounts.php
API Letters: D,W

Footer

WooCommerce a2z
WooCommerce a2z
WooCommerce
WordPress 5.6
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  woocommerce.wp-a2z.org
© Copyright WooCommerce a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites