get_points_label( $points_balance );
$count = apply_filters( ‘wc_points_rewards_my_account_points_events’, 5, get_current_user_id() );
// get a set of points events, ordered newest to oldest
$args = array(
‘orderby’ => array(
‘field’ => ‘date’,
‘order’ => ‘DESC’,
),
‘per_page’ => $count,
‘paged’ => 0,
‘user’ => get_current_user_id(),
);
$events = WC_Points_Rewards_Points_Log::get_points_log_entries( $args );
// load the template
wc_get_template(
‘myaccount/my-points.php’,
array(
‘points_balance’ => $points_balance,
‘points_label’ => $points_label,
‘events’ => $events,
),
”,
$wc_points_rewards->get_plugin_path() . ‘/templates/’
);
}
}