Exemplo n.º 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');
     }
 }
 public static function renderOptionsPage()
 {
     $options = get_option('wpie_settings');
     RCCore::render('admin_options', ['options' => $options]);
 }
		<p>In order to communicate with the Invoicexpress server, we need some information first.</p>

		<input type="text" size="45" placeholder="Your domain" name="wpie_settings[domain]" value="<?php 
echo esc_attr($options['domain']);
?>
">

		<input type="text" size="45" placeholder="Your API key" name="wpie_settings[api_key]" value="<?php 
echo esc_attr($options['api_key']);
?>
">

		<p>
			Your API Key can be found under your <a terget="_blank" href="https://app.invoicexpress.com/accounts/details">account menu option</a>.
		</p>

		<?php 
settings_fields('pluginPage');
submit_button();
?>

	</form>

	<?php 
RCCore::render('el_affiliate');
?>

	<p align="right">Created by <a href="http://barbershop.pt">Barbershop</a>.</p>

</div>