injection here is not permitted // even as a fallback path. The local copy above is the only source. // Register reports script wp_register_script( 'easy-invoice-reports', EASY_INVOICE_PLUGIN_URL . 'assets/js/reports.js', array( 'jquery', 'chartjs' ), EASY_INVOICE_VERSION, true ); // Enqueue the scripts wp_enqueue_script( 'chartjs' ); wp_enqueue_script( 'easy-invoice-reports' ); } /** * Display method implementation * * @since 1.0.0 * @param array $args Display arguments * @return void */ public function display( array $args = [] ) { // Check if this is a premium feature if ( ! easy_invoice_has_pro() ) { // Show premium popup instead of reports page $this->displayPremiumPopup(); return; } $page = $args['page'] ?? 'easy-invoice-reports'; // Get report data $report_data = $this->getReportData(); // Display the reports page $this->displayReportsPage( $report_data ); } /** * Display premium popup for reports feature */ private function displayPremiumPopup() { ?>
Unlock powerful insights into your business performance
Get comprehensive insights into your business with advanced reporting features