You appear to be a bot. Output may be restricted
Description
Decrease the earnings by the given amount
Usage
$float = EDD_Download::decrease_earnings( $amount );
Parameters
- $amount
- ( int|float ) required – Number to decrease earning with
Returns
float New number of total earnings
Source
File name: easy-digital-downloads/includes/class-edd-download.php
Lines:
1 to 23 of 23
public function decrease_earnings( $amount ) { // Only decrease if greater than zero if ( $this->get_earnings() > 0 ) { $current_earnings = $this->get_earnings(); $new_amount = apply_filters( 'edd_download_decrease_earnings_amount', $current_earnings - (float) $amount, $current_earnings, $amount, $this ); if ( $this->update_meta( '_edd_download_earnings', $new_amount ) ) { $this->earnings = $new_amount; do_action( 'edd_download_decrease_earnings', $this->ID, $this->earnings, $this ); return $this->earnings; } } return false; }