• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Easy Digital Downloads a2z

Easy Digital Downloads a2z

Easy Digital Downloads a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / Files / includes/class-edd-discount.php


Lines:

1 to 79 of 79
<?php

/**
 * Discount Object
 *
 * @package     EDD
 * @subpackage  Classes/Discount
 * @copyright   Copyright (c) 2016, Sunny Ratilal
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
 * @since       2.7
 */

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;

/* class EDD_Discount */
/* function EDD_Discount::__construct() – Constructor. */
/* function EDD_Discount::__get() – Magic __get method to dispatch a call to retrieve a protected property. */
/* function EDD_Discount::__set() – Magic __set method to dispatch a call to update a protected property. */
/* function EDD_Discount::__isset() – Magic __isset method to allow empty checks on protected elements */
/* function EDD_Discount::array_convert() – Converts the instance of the EDD_Discount object into an array for special cases. */
/* function EDD_Discount::find_by_code() – Find a discount in the database with the code supplied. */
/* function EDD_Discount::find_by_name() – Find a discount in the database with the name supplied. */
/* function EDD_Discount::setup_discount() – Setup object vars with discount WP_Post object. */
/* function EDD_Discount::setup_name() – Setup the name of the discount. */
/* function EDD_Discount::setup_code() – Setup the discount code. */
/* function EDD_Discount::setup_status() – Setup the discount status. */
/* function EDD_Discount::setup_type() – Setup the discount type. */
/* function EDD_Discount::setup_amount() – Setup the discount amount. */
/* function EDD_Discount::setup_product_requirements() – Setup the product requirements. */
/* function EDD_Discount::setup_excluded_products() – Setup the excluded products. */
/* function EDD_Discount::setup_start() – Setup the start date. */
/* function EDD_Discount::setup_expiration() – Setup the expiration date. */
/* function EDD_Discount::setup_uses() – Setup the uses. */
/* function EDD_Discount::setup_max_uses() – Setup the max uses. */
/* function EDD_Discount::setup_min_price() – Setup the min price. */
/* function EDD_Discount::setup_is_single_use() – Setup if the discount is single use or not. */
/* function EDD_Discount::setup_is_not_global() – Setup if the discount is not global. */
/* function EDD_Discount::setup_product_condition() – Setup if the discount is not global. */
/* function EDD_Discount::get_meta() – Helper method to retrieve meta data associated with the discount. */
/* function EDD_Discount::update_meta() – Helper method to update post meta associated with the discount. */
/* function EDD_Discount::get_ID() – Retrieve the ID of the WP_Post object. */
/* function EDD_Discount::get_name() – Retrieve the name of the discount. */
/* function EDD_Discount::get_code() – Retrieve the code used to apply the discount. */
/* function EDD_Discount::get_status() – Retrieve the status of the discount */
/* function EDD_Discount::get_status_label() – Retrieves the status label of the discount. */
/* function EDD_Discount::get_type() – Retrieve the type of discount. */
/* function EDD_Discount::get_amount() – Retrieve the discount amount. */
/* function EDD_Discount::get_product_reqs() – Retrieve the discount requirements for the discount to be satisfied. */
/* function EDD_Discount::get_excluded_products() – Retrieve the downloads that are excluded from having this discount code applied. */
/* function EDD_Discount::get_start() – Retrieve the start date. */
/* function EDD_Discount::get_expiration() – Retrieve the end date. */
/* function EDD_Discount::get_uses() – Retrieve the uses for the discount code. */
/* function EDD_Discount::get_max_uses() – Retrieve the maximum uses for the discount code. */
/* function EDD_Discount::get_min_price() – Retrieve the minimum spend required for the discount to be satisfied. */
/* function EDD_Discount::get_is_single_use() – Retrieve the usage limit per limit (if the discount can only be used once per customer). */
/* function EDD_Discount::get_is_not_global() – Retrieve the property determining if a discount is not global. */
/* function EDD_Discount::get_product_condition() – Retrieve the product condition. */
/* function EDD_Discount::exists() – Check if a discount exists. */
/* function EDD_Discount::insert_discount() – Build the base of the discount. */
/* function EDD_Discount::save() – Once object variables has been set, an update is needed to persist them to the database. */
/* function EDD_Discount::add() – Create a new discount. If the discount already exists in the database, update it. */
/* function EDD_Discount::update() – Update an existing discount in the database. */
/* function EDD_Discount::build_meta() – Build Discount Meta Array. */
/* function EDD_Discount::update_status() – Update the status of the discount. */
/* function EDD_Discount::is_started() – Check if the discount has started. */
/* function EDD_Discount::is_expired() – Check if the discount has expired. */
/* function EDD_Discount::is_maxed_out() – Check if the discount has maxed out. */
/* function EDD_Discount::is_min_price_met() – Check if the minimum cart amount is satisfied for the discount to hold. */
/* function EDD_Discount::is_single_use() – Is the discount single use or not? */
/* function EDD_Discount::is_product_requirements_met() – Are the product requirements met for the discount to hold. */
/* function EDD_Discount::is_used() – Has the discount code been used. */
/* function EDD_Discount::is_valid() – Checks whether a discount holds at the time of purchase. */
/* function EDD_Discount::is_active() – Checks if a discount code is active. */
/* function EDD_Discount::get_discounted_amount() – Get Discounted Amount. */
/* function EDD_Discount::increase_usage() – Increment the usage of the discount. */
/* function EDD_Discount::decrease_usage() – Decrement the usage of the discount. */
/* function EDD_Discount::edit_url() – Edit Discount Link. */
 

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      Call hooks

      File name: includes/class-edd-discount.php
      Plugin ref: Easy Digital Downloads
      Version: 2.11.6
      Deprecated?: No
      API Letters: C,D,E,I,P

      Published: 26th November 2019 | Last updated: 14th November 2021

      Primary Sidebar

      Information

      File name: includes/class-edd-discount.php
      Plugin ref: Easy Digital Downloads
      Version: 2.11.6
      Deprecated?: No
      API Letters: C,D,E,I,P

      includes

      Footer

      Easy Digital Downloads a2z
      Easy Digital Downloads a2z
      Easy Digital Downloads a2z
      WordPress 5.9.3
      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:  edd.wp-a2z.org
      © Copyright Easy Digital Downloads a2z 2014-2022. All rights reserved.


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

      • Home
      • Blog
      • Sitemap
      • Sites