You appear to be a bot. Output may be restricted
Description
Return the calculated completion percentage
Usage
$int = EDD_Tools_Recount_Store_Earnings::get_percentage_complete();
Parameters
Returns
int
Source
File name: easy-digital-downloads/includes/admin/tools/class-edd-tools-recount-store-earnings.php
Lines:
1 to 26 of 26
public function get_percentage_complete() { $total = $this->get_stored_data( 'edd_recount_earnings_total' ); if ( false === $total ) { $args = apply_filters( 'edd_recount_earnings_total_args', array() ); $counts = edd_count_payments( $args ); $total = absint( $counts->publish ) + absint( $counts->revoked ); $total = apply_filters( 'edd_recount_store_earnings_total', $total ); $this->store_data( 'edd_recount_earnings_total', $total ); } $percentage = 100; if( $total > 0 ) { $percentage = ( ( $this->per_step * $this->step ) / $total ) * 100; } if( $percentage > 100 ) { $percentage = 100; } return $percentage; }