• 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::empty_cart() – Empty the cart

You appear to be a bot. Output may be restricted

Description

Empty the cart

Usage

$void = EDD_Cart::empty_cart();

Parameters

Returns

void

Source

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

1 to 16 of 16
  public function empty_cart() {
    // Remove cart contents.
    EDD()->session->set( 'edd_cart', NULL );

    // Remove all cart fees.
    EDD()->session->set( 'edd_cart_fees', NULL );

    // Remove any resuming payments.
    EDD()->session->set( 'edd_resume_payment', NULL );

    // Remove any active discounts
    $this->remove_all_discounts();
    $this->contents = array();

    do_action( 'edd_empty_cart' );
  }
 

 View on GitHub View on Trac

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

Primary Sidebar

Information

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

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