• 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 / APIs / EDD_Cart::has_discounts() – Checks if any discounts have been applied to the cart

You appear to be a bot. Output may be restricted

Description

Checks if any discounts have been applied to the cart

Usage

$bool = EDD_Cart::has_discounts();

Parameters

Returns

bool

Source

File name: easy-digital-downloads/includes/cart/class-edd-cart.php
Lines:

1 to 16 of 16
  public function has_discounts() {
    if ( null !== $this->has_discounts ) {
      return $this->has_discounts;
    }

    $has_discounts = false;

    $discounts = $this->get_discounts();
    if ( ! empty( $discounts ) ) {
      $has_discounts = true;
    }

    $this->has_discounts = apply_filters( 'edd_cart_has_discounts', $has_discounts );

    return $this->has_discounts;
  }
 

 View on GitHub View on Trac

Published: 26th November 2019 | Last updated: 8th April 2020

Primary Sidebar

Information

Function name: EDD_Cart::has_discounts
Class ref: EDD_Cart
Plugin ref: Easy Digital Downloads
Version: 3.1.0.2
Sourcefile: includes/cart/class-edd-cart.php
File ref: includes/cart/class-edd-cart.php
Deprecated?: No
API Letters: C,D,E,H

Footer

Easy Digital Downloads a2z
Easy Digital Downloads a2z
Easy Digital Downloads a2z
WordPress 6.1.1
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-2023. All rights reserved.


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