★★★★★', $review_url ); $review_invitation = sprintf( /* translators: ★★★★★ (5-star) */ __( 'If you like PDF Invoices & Packing Slips for WooCommerce please leave us a %s rating. A huge thank you in advance!', 'woocommerce-pdf-invoices-packing-slips' ), $review_link ); $active_tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : $default_tab; $active_section = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : ''; ?>

documents->get_documents( 'enabled', 'any' ); $document_type = 'invoice'; $document = null; $output_format = 'pdf'; if ( ! empty( $_GET['section'] ) ) { $document_type = sanitize_text_field( wp_unslash( $_GET['section'] ) ); } elseif ( ! empty( $_GET['preview'] ) ) { $document_type = sanitize_text_field( wp_unslash( $_GET['preview'] ) ); } if ( $document_type ) { $document = WPO_WCPDF()->documents->get_document( $document_type, null ); } if ( ! empty( $_GET['output_format'] ) ) { $output_format = sanitize_text_field( wp_unslash( $_GET['output_format'] ) ); } ?>
<?php esc_html_e( 'Clear search text', 'woocommerce-pdf-invoices-packing-slips' ); ?>

output_formats as $document_output_format ) { if ( 'xml' === $document_output_format ) { if ( ! wpo_ips_edi_is_available() || ! wpo_ips_edi_preview_is_enabled() ) { continue; } $format = wpo_ips_edi_get_current_format( true ); $format_doc_types = is_array( $format['documents'] ) ? array_keys( $format['documents'] ) : array(); if ( ! in_array( $document_type, $format_doc_types, true ) ) { continue; } } $is_active = ( $output_format === $document_output_format ) || ( 'pdf' !== $output_format && ! in_array( $output_format, $document->output_formats ) ); $active_class = $is_active ? 'active' : ''; $tab_title = strtoupper( esc_html( $document_output_format ) ); printf( '%3$s', esc_url( add_query_arg( 'output_format', $document_output_format ) ), esc_attr( $active_class ), wp_kses_post( $tab_title ) ); } ?>
' . esc_html( $document->get_title() ) . '

'; } else { echo '

' . esc_html__( 'Invoice', 'woocommerce-pdf-invoices-packing-slips' ) . '

'; } ?>
    %2$s', esc_attr( $document->get_type() ), esc_html( $document->get_title() ) ); } ?>