/**
 * Checks if the user has enabled the option to calculate taxes after discounts
 * have been entered
 *
 * @since 1.4.1
 * @deprecated 2.1
 * @global $edd_options
 * @return bool Whether or not taxes are calculated after discount
 */
function edd_taxes_after_discounts()
{
    $backtrace = debug_backtrace();
    _edd_deprecated_function(__FUNCTION__, '2.1', 'none', $backtrace);
    global $edd_options;
    $ret = isset($edd_options['taxes_after_discounts']) && edd_use_taxes();
    return apply_filters('edd_taxes_after_discounts', $ret);
}
Ejemplo n.º 2
0
/**
 * Reduces earnings and sales stats when a purchase is refunded
 *
 * @since 1.8.2
 * @param $data Arguments passed
 * @return void
 */
function edd_undo_purchase_on_refund($payment_id, $new_status, $old_status)
{
    $backtrace = debug_backtrace();
    _edd_deprecated_function('edd_undo_purchase_on_refund', '2.5.7', 'EDD_Payment->refund()', $backtrace);
    $payment = new EDD_Payment($payment_id);
    $payment->refund();
}
/**
 * Get Success Page URL
 *
 * @param string $query_string
 * @access      public
 * @since       1.0
 * @deprecated  2.6 Please avoid usage of this function in favor of edd_get_success_page_uri()
 * @return      string
*/
function edd_get_success_page_url($query_string = null)
{
    $backtrace = debug_backtrace();
    _edd_deprecated_function(__FUNCTION__, '2.6', 'edd_get_success_page_uri()', $backtrace);
    return apply_filters('edd_success_page_url', edd_get_success_page_uri($query_string));
}
/**
 * Get Menu Access Level
 *
 * Returns the access level required to access the downloads menu. Currently not
 * changeable, but here for a future update.
 *
 * @since 1.0
 * @deprecated 1.4.4
 * @return string
*/
function edd_get_menu_access_level()
{
    $backtrace = debug_backtrace();
    _edd_deprecated_function(__FUNCTION__, '1.4.4', 'current_user_can(\'manage_shop_settings\')', $backtrace);
    return apply_filters('edd_menu_access_level', 'manage_options');
}
/**
 * Get Downloads Of Purchase
 *
 * Retrieves an array of all files purchased.
 *
 * @access      public
 * @since       1.0
 * @deprecated  1.4
 * @param       int $payment_id - the ID number of the purchase
 * @return      mixed - array if purchase exists, false otherwise
*/
function edd_get_downloads_of_purchase($payment_id, $payment_meta = null)
{
    _edd_deprecated_function(__FUNCTION__, '1.4', 'edd_get_payment_meta_downloads');
    if (is_null($payment_meta)) {
        $payment_meta = edd_get_payment_meta($payment_id);
    }
    $downloads = maybe_unserialize($payment_meta['downloads']);
    if ($downloads) {
        return $downloads;
    }
    return false;
}