• Hi,

    WooCommerce is showing some notices when trying to build the reports array here:
    woocommerce/packages/woocommerce-admin/includes/connect-existing-pages.php:21

    	foreach ( $all_reports as $report_id => $report_data ) {
    		$report_tabs[ $report_id ] = $report_data['title'];
    	}
    

    Seems that the title is not provided in your plugin for that array.

    Your function add_eu_vat_reports should be sth like this:
    eu-vat-for-woocommerce/includes/admin/class-alg-wc-eu-vat-admin.php:79

    
    	function add_eu_vat_reports( $reports ) {
            	$reports['taxes']['title'] = __( 'EU VAT', 'eu-vat-for-woocommerce' );
    		$reports['taxes']['reports']['alg_wc_eu_vat'] = array(
    			'title'       => __( 'EU VAT', 'eu-vat-for-woocommerce' ),
    			'description' => '',
    			'hide_title'  => true,
    			'callback'    => array( $this, 'output_eu_vat_report' ),
    		);
    		return $reports;
    	}
    

    is there a github repo to make a PR? Would be easy to do this that way…

    Thank you!!

  • The topic ‘Notice: Undefined index: title in connect-existing-pages.php on line 21’ is closed to new replies.