Easy Digital Downloads
  • Package
  • Class
  • Tree

Packages

  • EDD
    • Admin
      • Actions
      • Add-ons
      • Dashboard
      • Discounts
      • Downloads
      • Export
      • Notices
      • Pages
      • Payments
      • Reports
      • Settings
      • System
      • Upgrades
      • Upload
      • Welcome
    • Cart
    • Checkout
    • Classes
      • API
      • Fees
      • HTML
      • Roles
      • Session
    • Emails
    • Functions
      • AJAX
      • Compatibility
      • Errors
      • Formatting
      • Install
      • Login
      • Taxes
      • Templates
    • Gateways
    • Logging
    • Payments
    • Shortcodes
    • Widgets

Classes

  • EDD_Fees

Class EDD_Fees

EDD_Fees Class

Package: EDD\Classes\Fees
Copyright: Copyright (c) 2012, Pippin Williamson
License: GNU Public License
Since: 1.5
Located at includes/class-edd-fees.php

Methods summary

public
# __construct( )

Setup the EDD Fees

Setup the EDD Fees

Since

1.5
public array
# add_fee( integer $amount = '', string $label = '', string $id = '' )

Adds a new Fee

Adds a new Fee

Parameters

$amount
integer
$amount Fee Amount
$label
string
$label Fee label
$id
string
$id Fee ID

Returns

array
$fees

Since

1.5

Uses

EDD_Fees::get_fees()
EDD_Session::set()
public array
# remove_fee( string $id = '' )

Remove an Existing Fee

Remove an Existing Fee

Parameters

$id
string
$id Fee ID

Returns

array
$fees

Since

1.5

Uses

EDD_Fees::get_fees()
EDD_Session::set()
public boolean
# has_fees( )

Check if any fees are present

Check if any fees are present

Returns

boolean

Since

1.5

Uses

EDD_Fees::get_fees()

Used by

EDD_Fees::total()
public mixed
# get_fees( )

Retrieve all active fees

Retrieve all active fees

Returns

mixed
array|bool

Since

1.5

Uses

EDD_Session::get()

Used by

EDD_Fees::add_fee()
EDD_Fees::remove_fee()
EDD_Fees::has_fees()
EDD_Fees::get_fee()
EDD_Fees::total()
public mixed
# get_fee( mixed $id = '' )

Retrieve a specific fee

Retrieve a specific fee

Returns

mixed
array|bool

Since

1.5

Uses

EDD_Fees::get_fees()
public float
# total( )

Calculate the total fee amount

Calculate the total fee amount

Can be negative

Returns

float
$total Total fee amount

Since

1.5

Uses

EDD_Fees::get_fees()
EDD_Fees::has_fees()
public array
# record_fees( array $payment_meta, array $payment_data )

Stores the fees in the payment meta

Stores the fees in the payment meta

Parameters

$payment_meta
array
$payment_meta The meta data to store with the payment
$payment_data
array
$payment_data The info sent from process-purchase.php

Returns

array
$payment_meta Return the payment meta with the fees added

Since

1.5

Uses

EDD_Session::set()

Magic methods summary

Easy Digital Downloads API documentation generated by ApiGen 2.8.0