PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.9.14
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.9.14
1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 All 163 releases
woocommerce-pos / templates / wp-overnight-invoice.php

wp-overnight-invoice.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.9.14, at templates/wp-overnight-invoice.php

33 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WP Overnight invoice receipt template.
4 *
5 * Renders inline HTML by delegating to PDF Invoices & Packing Slips for WooCommerce.
6 *
7 * @package WCPOS\WooCommercePOS
8 */
9
10 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- Template files use short variable names by convention.
11
12 if ( ! \defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 if ( empty( $order ) ) {
17 echo esc_html__( 'The WP Overnight invoice document is not available.', 'woocommerce-pos' );
18 return;
19 }
20
21 $document = apply_filters( 'woocommerce_pos_wp_overnight_pdf_document', null, 'invoice', $order );
22
23 if ( null === $document && \function_exists( 'wcpdf_get_document' ) ) {
24 $document = wcpdf_get_document( 'invoice', $order, true );
25 }
26
27 if ( ! $document || ! \is_callable( array( $document, 'get_html' ) ) ) {
28 echo esc_html__( 'The WP Overnight invoice document could not be rendered for this order.', 'woocommerce-pos' );
29 return;
30 }
31
32 echo $document->get_html(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Trusted HTML generated by the WP Overnight document API.
33