Пример #1
0
 public static function renderDashboardWidgetPendingPayments()
 {
     RCCore::includeVendor('InvoicexpressClient/InvoicexpressInvoices');
     $options = get_option('wpie_settings');
     if (!empty($options)) {
         $Invoices = new InvoicexpressInvoices($options['domain'], $options['api_key']);
         $pending = $Invoices->all()->filter('status', 'final')->get();
         $drafts = $Invoices->all()->filter('status', 'draft')->get();
         RCCore::render('widget_dashboard_invoices', ['pending' => $pending, 'drafts' => $drafts]);
     } else {
         RCCore::render('el_config_missing');
         RCCore::render('el_affiliate');
     }
 }