Viewing 1 replies (of 1 total)
  • Thread Starter prakashtyata

    (@prakashtyata)

    function total_doner_matt() {
    $count = 0;
    $testquery = new Give_Payments_Query( array( ‘number’ => 100000, ) );
    $payments = $testquery->get_payments();
    // var_dump($payments);
    if ( $payments ) {
    foreach ( $payments as $payment ) {
    $id = $payment-> form_id;
    if($id == “373”){
    $count++;
    }
    }
    }
    return $count;
    }
    add_shortcode(‘matt_total’, ‘total_doner_matt’);

    this is how I solve this issue

    • This reply was modified 4 years, 6 months ago by prakashtyata.
    • This reply was modified 4 years, 6 months ago by prakashtyata.
Viewing 1 replies (of 1 total)
  • The topic ‘How can I count total donation to each form’ is closed to new replies.