• 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_get_price_option_amount() – Retrieves the amount of a variable price option

You appear to be a bot. Output may be restricted

Description

Retrieves the amount of a variable price option

Usage

$float = edd_get_price_option_amount( $download_id, $price_id );

Parameters

$download_id
( int ) optional – ID of the download
$price_id
( int ) optional – ID of the price option

Returns

float $amount Amount of the price option

Source

File name: easy-digital-downloads/includes/download-functions.php
Lines:

1 to 11 of 11
function edd_get_price_option_amount( $download_id = 0, $price_id = 0 ) {
  $prices = edd_get_variable_prices( $download_id );
  $amount = 0.00;

  if ( $prices && is_array( $prices ) ) {
    if ( isset( $prices[ $price_id ] ) )
      $amount = $prices[ $price_id ]['amount'];
  }

  return apply_filters( 'edd_get_price_option_amount', edd_sanitize_amount( $amount ), $download_id, $price_id );
}
 

 View on GitHub View on Trac

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

Primary Sidebar

Information

Function name: edd_get_price_option_amount
Plugin ref: Easy Digital Downloads
Version: 2.11.6
Sourcefile: includes/download-functions.php
File ref: includes/download-functions.php
Deprecated?: No
API Letters: A,E,G,O,P

Footer

Easy Digital Downloads a2z
Easy Digital Downloads a2z
Easy Digital Downloads a2z
WordPress 6.0
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