admin_status_reports->get_woocommerce_pages_status(); $fields = array(); if ( false === $pages_status->is_error ) { $fields['pllwc']['label'] = __( 'WooCommerce pages translations', 'polylang-wc' ); $fields['pllwc']['value'] = __( 'All WooCommerce pages are translated.', 'polylang-wc' ); } else { foreach ( $pages_status->pages as $page => $value ) { if ( true === $value->is_error ) { $fields[ $page ]['label'] = $value->page_name; $fields[ $page ]['value'] = $value->page_id . ' - ' . $value->error_message; } } } $debug_info['polylang-wc'] = array( 'label' => 'Polylang for WooCommerce', 'fields' => $fields, ); return $debug_info; } }