From 08eea1d41f0f051da83f8aab58a39ce96137bde9 Mon Sep 17 00:00:00 2001 From: Alexandre Faustino Date: Wed, 2 Oct 2024 16:58:03 +0100 Subject: [PATCH 01/10] Fix: load plugin translations later on `init` (#871) --- woocommerce-pdf-invoices-packingslips.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/woocommerce-pdf-invoices-packingslips.php b/woocommerce-pdf-invoices-packingslips.php index 8d81b0ade..b2bbfd316 100644 --- a/woocommerce-pdf-invoices-packingslips.php +++ b/woocommerce-pdf-invoices-packingslips.php @@ -70,8 +70,8 @@ public function __construct() { require $this->plugin_path() . '/vendor/autoload.php'; // load the localisation & classes - add_action( 'plugins_loaded', array( $this, 'translations' ) ); - add_action( 'plugins_loaded', array( $this, 'load_classes' ), 9 ); + add_action( 'init', array( $this, 'translations' ), 8 ); + add_action( 'init', array( $this, 'load_classes' ), 9 ); // Pro runs on default 10, if this runs after it will not work add_action( 'in_plugin_update_message-'.$this->plugin_basename, array( $this, 'in_plugin_update_message' ) ); add_action( 'before_woocommerce_init', array( $this, 'woocommerce_hpos_compatible' ) ); add_action( 'admin_notices', array( $this, 'nginx_detected' ) ); From 2aa41877db826d8714eee71bd8804aa5b5f2a1a7 Mon Sep 17 00:00:00 2001 From: Mohamad <136313810+MohamadNateqi@users.noreply.github.com> Date: Thu, 3 Oct 2024 17:53:22 +0330 Subject: [PATCH 02/10] Fix: check user capabilities in the `enable_debug()` function (#872) --- includes/class-wcpdf-main.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/class-wcpdf-main.php b/includes/class-wcpdf-main.php index f24aebbbc..32ab6dbfb 100644 --- a/includes/class-wcpdf-main.php +++ b/includes/class-wcpdf-main.php @@ -1561,11 +1561,13 @@ public function get_document_printed_data( $document ) { } /** - * Enable PHP error output + * Enable PHP error output for administrators. */ - public function enable_debug () { - error_reporting( E_ALL ); - ini_set( 'display_errors', 1 ); + public function enable_debug() { + if ( \WPO_WCPDF()->settings->user_can_manage_settings() ) { + error_reporting( E_ALL ); + ini_set( 'display_errors', 1 ); + } } public function wc_webhook_topic_hooks( $topic_hooks, $wc_webhook ) { From 6469c196e7ae922eade1d221ddbf54a3f83e1000 Mon Sep 17 00:00:00 2001 From: Mohamad <136313810+MohamadNateqi@users.noreply.github.com> Date: Thu, 3 Oct 2024 19:06:29 +0330 Subject: [PATCH 03/10] Tweak: update due date hooks (#873) --- .../abstract-wcpdf-order-document.php | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/includes/documents/abstract-wcpdf-order-document.php b/includes/documents/abstract-wcpdf-order-document.php index 694bd3c23..0fb36cfae 100644 --- a/includes/documents/abstract-wcpdf-order-document.php +++ b/includes/documents/abstract-wcpdf-order-document.php @@ -1480,18 +1480,37 @@ public function get_due_date(): int { return 0; } - $due_date_days = apply_filters( 'wpo_wcpdf_due_date_days', $due_date_days, $this ); + $due_date_days = apply_filters_deprecated( + 'wpo_wcpdf_due_date_days', + array( $due_date_days, $this->get_type(), $this ), + '3.8.7', + 'wpo_wcpdf_document_due_date_days' + ); + $due_date_days = apply_filters( 'wpo_wcpdf_document_due_date_days', $due_date_days, $this ); if ( 0 >= intval( $due_date_days ) ) { return 0; } $document_creation_date = $this->get_date( $this->get_type(), $this->order ) ?? new \WC_DateTime( 'now', new \DateTimeZone( 'UTC' ) ); - $base_date = apply_filters( 'wpo_wcpdf_due_date_base_date', $document_creation_date, $this->get_type(), $this ); + $base_date = apply_filters_deprecated( + 'wpo_wcpdf_due_date_base_date', + array( $document_creation_date, $this->get_type(), $this ), + '3.8.7', + 'wpo_wcpdf_document_due_date_base_date' + ); + $base_date = apply_filters( 'wpo_wcpdf_document_due_date_base_date', $base_date, $this ); $due_date_datetime = clone $base_date; $due_date_datetime = $due_date_datetime->modify( "+$due_date_days days" ); - return apply_filters( 'wpo_wcpdf_due_date', $due_date_datetime->getTimestamp() ?? 0, $this ); + $due_date = apply_filters_deprecated( + 'wpo_wcpdf_due_date', + array( $due_date_datetime->getTimestamp() ?? 0, $this->get_type(), $this ), + '3.8.7', + 'wpo_wcpdf_document_due_date' + ); + + return apply_filters( 'wpo_wcpdf_document_due_date', $due_date ?? 0, $this ); } /** From d2cc365224f61494780a72984a1c18d36b9c69fd Mon Sep 17 00:00:00 2001 From: Alexandre Faustino Date: Thu, 3 Oct 2024 16:47:44 +0100 Subject: [PATCH 04/10] New: improved template titles registration (#867) --- .../abstract-wcpdf-order-document.php | 328 +++++++++++++++++- .../documents/class-wcpdf-bulk-document.php | 2 +- includes/documents/class-wcpdf-invoice.php | 60 ++-- .../documents/class-wcpdf-packing-slip.php | 45 ++- includes/wcpdf-functions.php | 20 ++ languages/strings.php | 16 - readme.txt | 2 +- templates/Simple/invoice.php | 28 +- templates/Simple/packing-slip.php | 25 +- 9 files changed, 433 insertions(+), 93 deletions(-) diff --git a/includes/documents/abstract-wcpdf-order-document.php b/includes/documents/abstract-wcpdf-order-document.php index 0fb36cfae..67e17c0ea 100644 --- a/includes/documents/abstract-wcpdf-order-document.php +++ b/includes/documents/abstract-wcpdf-order-document.php @@ -116,7 +116,8 @@ public function __construct( $order = 0 ) { $this->slug = ! empty( $this->type ) ? str_replace( '-', '_', $this->type ) : ''; // output formats - $this->output_formats = apply_filters( "wpo_wcpdf_{$this->slug}_output_formats", array( 'pdf' ), $this ); + $this->output_formats = apply_filters( 'wpo_wcpdf_document_output_formats', array( 'pdf' ), $this ); + $this->output_formats = apply_filters_deprecated( "wpo_wcpdf_{$this->slug}_output_formats", array( $this->output_formats, $this ), '3.8.7', 'wpo_wcpdf_document_output_formats' ); // load data if ( $this->order ) { @@ -584,42 +585,349 @@ public function get_creation_trigger( $document_type = '', $order = null, $conte return $this->get_data( 'creation_trigger', $document_type, $order, $context ); } + /** + * Get the document title + * + * @return string + */ public function get_title() { - return apply_filters( "wpo_wcpdf_{$this->slug}_title", $this->title, $this ); + return $this->get_title_for( 'document' ); } + /** + * Print the document number title + * + * @return void + */ public function title() { echo $this->get_title(); } + /** + * Get the document number title + * + * @return string + */ public function get_number_title() { - /* translators: %s: document name */ - $number_title = sprintf( __( '%s Number:', 'woocommerce-pdf-invoices-packing-slips' ), $this->title ); - return apply_filters( "wpo_wcpdf_{$this->slug}_number_title", $number_title, $this ); + return $this->get_title_for( 'document_number' ); } + /** + * Print the document number title + * + * @return void + */ public function number_title() { echo $this->get_number_title(); } + /** + * Get the document date title + * + * @return string + */ public function get_date_title() { - /* translators: %s: document name */ - $date_title = sprintf( __( '%s Date:', 'woocommerce-pdf-invoices-packing-slips' ), $this->title ); - return apply_filters( "wpo_wcpdf_{$this->slug}_date_title", $date_title, $this ); + return $this->get_title_for( 'document_date' ); } + /** + * Print the document date title + * + * @return void + */ public function date_title() { echo $this->get_date_title(); } + /** + * Get the document due date title + * + * @return string + */ public function get_due_date_title() { - $due_date_title = __( 'Due Date:', 'woocommerce-pdf-invoices-packing-slips' ); - return apply_filters( "wpo_wcpdf_{$this->slug}_due_date_title", $due_date_title, $this ); + return $this->get_title_for( 'document_due_date' ); } + /** + * Print the document due date title + * + * @return void + */ public function due_date_title() { echo $this->get_due_date_title(); } + + /** + * Get the billing address title + * + * @return string + */ + public function get_billing_address_title(): string { + return $this->get_title_for( 'billing_address' ); + } + + /** + * Print the billing address title + * + * @return void + */ + public function billing_address_title(): void { + echo $this->get_billing_address_title(); + } + + /** + * Get the shipping address title + * + * @return string + */ + public function get_shipping_address_title(): string { + return $this->get_title_for( 'shipping_address' ); + } + + /** + * Print the shipping address title + * + * @return void + */ + public function shipping_address_title(): void { + echo $this->get_shipping_address_title(); + } + + /** + * Get the order number title + * + * @return string + */ + public function get_order_number_title(): string { + return $this->get_title_for( 'order_number' ); + } + + /** + * Print the order number title + * + * @return void + */ + public function order_number_title(): void { + echo $this->get_order_number_title(); + } + + /** + * Get the order date title + * + * @return string + */ + public function get_order_date_title(): string { + return $this->get_title_for( 'order_date' ); + } + + /** + * Print the order date title + * + * @return void + */ + public function order_date_title(): void { + echo $this->get_order_date_title(); + } + + /** + * Get the payment method title + * + * @return string + */ + public function get_payment_method_title(): string { + return $this->get_title_for( 'payment_method' ); + } + + /** + * Print the payment method title + * + * @return void + */ + public function payment_method_title(): void { + echo $this->get_payment_method_title(); + } + + /** + * Get the payment date title + * + * @return string + */ + public function get_payment_date_title(): string { + return $this->get_title_for( 'payment_date' ); + } + + /** + * Print the payment date title + * + * @return void + */ + public function payment_date_title(): void { + echo $this->get_payment_date_title(); + } + + /** + * Get the shipping method title + * + * @return string + */ + public function get_shipping_method_title(): string { + return $this->get_title_for( 'shipping_method' ); + } + + /** + * Print the shipping method title + * + * @return void + */ + public function shipping_method_title(): void { + echo $this->get_shipping_method_title(); + } + + /** + * Get the SKU title + * + * @return string + */ + public function get_sku_title(): string { + return $this->get_title_for( 'sku' ); + } + + /** + * Print the SKU title + * + * @return void + */ + public function sku_title(): void { + echo $this->get_sku_title(); + } + + /** + * Get the weight title + * + * @return string + */ + public function get_weight_title(): string { + return $this->get_title_for( 'weight' ); + } + + /** + * Print the weight title + * + * @return void + */ + public function weight_title(): void { + echo $this->get_weight_title(); + } + + /** + * Get the notes title + * + * @return string + */ + public function get_notes_title(): string { + return $this->get_title_for( 'notes' ); + } + + /** + * Print the notes title + * + * @return void + */ + public function notes_title(): void { + echo $this->get_notes_title(); + } + + /** + * Get the customer notes title + * + * @return string + */ + public function get_customer_notes_title(): string { + return $this->get_title_for( 'customer_notes' ); + } + + /** + * Print the customer notes title + * + * @return void + */ + public function customer_notes_title(): void { + echo $this->get_customer_notes_title(); + } + + /** + * Get the title for a specific slug + * + * @param string $slug + * @return string + */ + public function get_title_for( string $slug ): string { + switch ( $slug ) { + case 'document': + $title = apply_filters_deprecated( "wpo_wcpdf_{$this->slug}_title", array( $this->title, $this ), '3.8.7', 'wpo_wcpdf_document_title' ); + break; + case 'document_number': + $title = sprintf( + /* translators: %s: document name */ + __( '%s Number:', 'woocommerce-pdf-invoices-packing-slips' ), + $this->title + ); + $title = apply_filters_deprecated( "wpo_wcpdf_{$this->slug}_number_title", array( $title, $this ), '3.8.7', 'wpo_wcpdf_document_number_title' ); + break; + case 'document_date': + $title = sprintf( + /* translators: %s: document name */ + __( '%s Date:', 'woocommerce-pdf-invoices-packing-slips' ), + $this->title + ); + $title = apply_filters_deprecated( "wpo_wcpdf_{$this->slug}_date_title", array( $title, $this ), '3.8.7', 'wpo_wcpdf_document_date_title' ); + break; + case 'document_due_date': + $title = __( 'Due Date:', 'woocommerce-pdf-invoices-packing-slips' ); + $title = apply_filters_deprecated( "wpo_wcpdf_{$this->slug}_due_date_title", array( $title, $this ), '3.8.7', 'wpo_wcpdf_document_due_date_title' ); + break; + case 'billing_address': + $title = __( 'Billing Address:', 'woocommerce-pdf-invoices-packing-slips' ); + break; + case 'shipping_address': + $title = __( 'Shipping Address:', 'woocommerce-pdf-invoices-packing-slips' ); + break; + case 'order_number': + $title = __( 'Order Number:', 'woocommerce-pdf-invoices-packing-slips' ); + break; + case 'order_date': + $title = __( 'Order Date:', 'woocommerce-pdf-invoices-packing-slips' ); + break; + case 'payment_method': + $title = __( 'Payment Method:', 'woocommerce-pdf-invoices-packing-slips' ); + break; + case 'payment_date': + $title = __( 'Payment Date:', 'woocommerce-pdf-invoices-packing-slips' ); + break; + case 'shipping_method': + $title = __( 'Shipping Method:', 'woocommerce-pdf-invoices-packing-slips' ); + break; + case 'sku': + $title = __( 'SKU:', 'woocommerce-pdf-invoices-packing-slips' ); + break; + case 'weight': + $title = __( 'Weight:', 'woocommerce-pdf-invoices-packing-slips' ); + break; + case 'notes': + $title = __( 'Notes:', 'woocommerce-pdf-invoices-packing-slips' ); + break; + case 'customer_notes': + $title = __( 'Customer Notes:', 'woocommerce-pdf-invoices-packing-slips' ); + break; + default: + $title = ''; + break; + } + + $title = apply_filters( 'wpo_wcpdf_title_for', $title, $slug, $this ); // used by Pro to translate strings + + return apply_filters( "wpo_wcpdf_{$slug}_title", $title, $this ); + } /** * Prints the due date. diff --git a/includes/documents/class-wcpdf-bulk-document.php b/includes/documents/class-wcpdf-bulk-document.php index a6db5514f..89abead52 100644 --- a/includes/documents/class-wcpdf-bulk-document.php +++ b/includes/documents/class-wcpdf-bulk-document.php @@ -64,7 +64,7 @@ public function __construct( $document_type, $order_ids = array() ) { $this->is_bulk = true; // output formats (placed after parent construct to override the abstract default) - $this->output_formats = apply_filters( "wpo_wcpdf_{$this->slug}_output_formats", array( 'pdf' ), $this ); + $this->output_formats = apply_filters( 'wpo_wcpdf_document_output_formats', array( 'pdf' ), $this ); } public function exists() { diff --git a/includes/documents/class-wcpdf-invoice.php b/includes/documents/class-wcpdf-invoice.php index a23417dc0..9dbb080be 100644 --- a/includes/documents/class-wcpdf-invoice.php +++ b/includes/documents/class-wcpdf-invoice.php @@ -13,11 +13,6 @@ class Invoice extends Order_Document_Methods { - public $type; - public $title; - public $icon; - public $output_formats; - /** * Init/load the order object. * @@ -33,7 +28,7 @@ public function __construct( $order = 0 ) { parent::__construct( $order ); // output formats (placed after parent construct to override the abstract default) - $this->output_formats = apply_filters( "wpo_wcpdf_{$this->slug}_output_formats", array( 'pdf', 'ubl' ), $this ); + $this->output_formats = apply_filters( 'wpo_wcpdf_document_output_formats', array( 'pdf', 'ubl' ), $this ); } public function use_historical_settings() { @@ -51,9 +46,44 @@ public function storing_settings_enabled() { return apply_filters( 'wpo_wcpdf_document_store_settings', true, $this ); } + /** + * Get the document title + * + * @return string + */ public function get_title() { // override/not using $this->title to allow for language switching! - return apply_filters( "wpo_wcpdf_{$this->slug}_title", __( 'Invoice', 'woocommerce-pdf-invoices-packing-slips' ), $this ); + return apply_filters( 'wpo_wcpdf_document_title', __( 'Invoice', 'woocommerce-pdf-invoices-packing-slips' ), $this ); + } + + /** + * Get the document number title + * + * @return string + */ + public function get_number_title() { + // override to allow for language switching! + return apply_filters( 'wpo_wcpdf_document_number_title', __( 'Invoice Number:', 'woocommerce-pdf-invoices-packing-slips' ), $this ); + } + + /** + * Get the document date title + * + * @return string + */ + public function get_date_title() { + // override to allow for language switching! + return apply_filters( 'wpo_wcpdf_document_date_title', __( 'Invoice Date:', 'woocommerce-pdf-invoices-packing-slips' ), $this ); + } + + /** + * Get the shipping address title + * + * @return string + */ + public function get_shipping_address_title(): string { + // override to allow for language switching! + return apply_filters( 'wpo_wcpdf_document_shipping_address_title', __( 'Ship To:', 'woocommerce-pdf-invoices-packing-slips' ), $this ); } public function init() { @@ -583,22 +613,6 @@ public function get_ubl_settings_fields( $option_name ) { return apply_filters( "wpo_wcpdf_{$this->type}_ubl_settings_fields", $settings_fields, $option_name, $this ); } - /** - * Document number title - */ - public function get_number_title() { - $number_title = __( 'Invoice Number:', 'woocommerce-pdf-invoices-packing-slips' ); - return apply_filters( "wpo_wcpdf_{$this->slug}_number_title", $number_title, $this ); - } - - /** - * Document date title - */ - public function get_date_title() { - $date_title = __( 'Invoice Date:', 'woocommerce-pdf-invoices-packing-slips' ); - return apply_filters( "wpo_wcpdf_{$this->slug}_date_title", $date_title, $this ); - } - } endif; // class_exists diff --git a/includes/documents/class-wcpdf-packing-slip.php b/includes/documents/class-wcpdf-packing-slip.php index e8913cc81..e3d84f331 100644 --- a/includes/documents/class-wcpdf-packing-slip.php +++ b/includes/documents/class-wcpdf-packing-slip.php @@ -28,12 +28,37 @@ public function __construct( $order = 0 ) { parent::__construct( $order ); // output formats (placed after parent construct to override the abstract default) - $this->output_formats = apply_filters( "wpo_wcpdf_{$this->slug}_output_formats", array( 'pdf' ), $this ); + $this->output_formats = apply_filters( 'wpo_wcpdf_document_output_formats', array( 'pdf' ), $this ); } + /** + * Get the document title + * + * @return string + */ public function get_title() { // override/not using $this->title to allow for language switching! - return apply_filters( "wpo_wcpdf_{$this->slug}_title", __( 'Packing Slip', 'woocommerce-pdf-invoices-packing-slips' ), $this ); + return apply_filters( 'wpo_wcpdf_document_title', __( 'Packing Slip', 'woocommerce-pdf-invoices-packing-slips' ), $this ); + } + + /** + * Get the document number title + * + * @return string + */ + public function get_number_title() { + // override to allow for language switching! + return apply_filters( 'wpo_wcpdf_document_number_title', __( 'Packing Slip Number:', 'woocommerce-pdf-invoices-packing-slips' ), $this ); + } + + /** + * Get the document date title + * + * @return string + */ + public function get_date_title() { + // override to allow for language switching! + return apply_filters( 'wpo_wcpdf_document_date_title', __( 'Packing Slip Date:', 'woocommerce-pdf-invoices-packing-slips' ), $this ); } public function get_filename( $context = 'download', $args = array() ) { @@ -177,22 +202,6 @@ public function init_settings() { } - /** - * Document number title - */ - public function get_number_title() { - $number_title = __( 'Packing Slip Number:', 'woocommerce-pdf-invoices-packing-slips' ); - return apply_filters( "wpo_wcpdf_{$this->slug}_number_title", $number_title, $this ); - } - - /** - * Document date title - */ - public function get_date_title() { - $date_title = __( 'Packing Slip Date:', 'woocommerce-pdf-invoices-packing-slips' ); - return apply_filters( "wpo_wcpdf_{$this->slug}_date_title", $date_title, $this ); - } - } endif; // class_exists diff --git a/includes/wcpdf-functions.php b/includes/wcpdf-functions.php index fe70221ee..8c9482c3e 100644 --- a/includes/wcpdf-functions.php +++ b/includes/wcpdf-functions.php @@ -959,3 +959,23 @@ function_exists( 'has_block' ) && return $is_block; } + +/** + * Get the default table headers for the Simple template. + * + * @param object $document + * @return array + */ +function wpo_wcpdf_get_simple_template_default_table_headers( $document ): array { + $headers = array( + 'product' => __( 'Product', 'woocommerce-pdf-invoices-packing-slips' ), + 'quantity' => __( 'Quantity', 'woocommerce-pdf-invoices-packing-slips' ), + 'price' => __( 'Price', 'woocommerce-pdf-invoices-packing-slips' ), + ); + + if ( 'packing-slip' === $document->get_type() ) { + unset( $headers['price'] ); + } + + return apply_filters( 'wpo_wcpdf_simple_template_default_table_headers', $headers, $document ); +} diff --git a/languages/strings.php b/languages/strings.php index 52da99151..7b9e0405e 100644 --- a/languages/strings.php +++ b/languages/strings.php @@ -10,19 +10,3 @@ __( 'Description', 'woocommerce-pdf-invoices-packing-slips' ); __( 'SKU', 'woocommerce-pdf-invoices-packing-slips' ); -// Simple template strings -__( 'Billing Address:', 'woocommerce-pdf-invoices-packing-slips' ); -__( 'Shipping Address:', 'woocommerce-pdf-invoices-packing-slips' ); -__( 'Ship To:', 'woocommerce-pdf-invoices-packing-slips' ); -__( 'Order Number:', 'woocommerce-pdf-invoices-packing-slips' ); -__( 'Order Date:', 'woocommerce-pdf-invoices-packing-slips' ); -__( 'Payment Method:', 'woocommerce-pdf-invoices-packing-slips' ); -__( 'Shipping Method:', 'woocommerce-pdf-invoices-packing-slips' ); -__( 'Product', 'woocommerce-pdf-invoices-packing-slips' ); -__( 'Quantity', 'woocommerce-pdf-invoices-packing-slips' ); -__( 'Price', 'woocommerce-pdf-invoices-packing-slips' ); -__( 'SKU:', 'woocommerce-pdf-invoices-packing-slips' ); -__( 'Weight:', 'woocommerce-pdf-invoices-packing-slips' ); -__( 'Notes', 'woocommerce-pdf-invoices-packing-slips' ); -__( 'Customer Notes', 'woocommerce-pdf-invoices-packing-slips' ); - diff --git a/readme.txt b/readme.txt index 2b69c634b..284f9b51c 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: woocommerce, pdf, ubl, invoices, packing slips Requires at least: 4.4 Tested up to: 6.6 Requires PHP: 7.2 -Stable tag: 3.8.7-beta-1 +Stable tag: 3.8.7-beta-2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html diff --git a/templates/Simple/invoice.php b/templates/Simple/invoice.php index 8f5100fdc..dbcaa6de4 100644 --- a/templates/Simple/invoice.php +++ b/templates/Simple/invoice.php @@ -37,7 +37,6 @@ - + - + get_payment_method() ) : ?> - + @@ -103,23 +102,26 @@ get_type(), $this->order ); ?>
- get_type(), $this->order ); ?>

billing_address(); ?>

get_type(), $this->order ); ?> @@ -50,7 +49,7 @@
show_shipping_address() ) : ?> -

+

shipping_address_title(); ?>

get_type(), $this->order ); ?>

shipping_address(); ?>

get_type(), $this->order ); ?> @@ -81,16 +80,16 @@
order_number_title(); ?> order_number(); ?>
order_date_title(); ?> order_date(); ?>
payment_method_title(); ?> payment_method(); ?>
+ - - - + $column_title ) { + printf( '', $column_class, $column_title ); + } + ?> get_order_items() as $item_id => $item ) : ?> - + @@ -134,7 +136,7 @@ get_type(), $this->order ); ?>
get_document_notes() ) : ?> -

+

notes_title(); ?>

document_notes(); ?>
@@ -142,7 +144,7 @@ get_type(), $this->order ); ?>
get_shipping_notes() ) : ?> -

+

customer_notes_title(); ?>

shipping_notes(); ?>
diff --git a/templates/Simple/packing-slip.php b/templates/Simple/packing-slip.php index 2970f7b52..02a928cc3 100644 --- a/templates/Simple/packing-slip.php +++ b/templates/Simple/packing-slip.php @@ -37,7 +37,6 @@
%s
get_type(), $item, $this->order ); ?>
-
-
+
sku_title(); ?>
+
weight_title(); ?>
get_type(), $item, $this->order ); ?>
- $column_title ) { printf( '', $column_class, $column_title ); } @@ -98,13 +98,21 @@ get_order_items() as $item_id => $item ) : ?> @@ -118,12 +126,12 @@ get_type(), $this->order ); ?> get_type(), $this->order ); ?> -
- get_shipping_notes() ) : ?> +get_shipping_notes() ) : ?> +

customer_notes_title() ?>

shipping_notes(); ?> - -
+
+get_type(), $this->order ); ?> get_footer() ) : ?> diff --git a/templates/Simple/style.css b/templates/Simple/style.css index 30368d8a5..190f43977 100644 --- a/templates/Simple/style.css +++ b/templates/Simple/style.css @@ -6,6 +6,7 @@ margin-right: 2cm; footer: docFooter; } + body { background: #fff; color: #000; @@ -43,8 +44,7 @@ ul { padding: 0; } -li, -ul { +li { margin-bottom: 0.75em; } @@ -58,7 +58,6 @@ p + p { } a { - border-bottom: 1px solid; text-decoration: none; } @@ -78,7 +77,7 @@ th, td { } table.container { - width:100%; + width: 100%; border: 0; } @@ -91,11 +90,23 @@ td.no-borders { width: auto; } +td.notes-cell { + width: 60%; +} + +td.totals-cell { + width: 40%; +} + div.bottom-spacer { clear: both; height: 8mm; } +span.label { + font-weight: bold; +} + /* Header */ table.head { margin-bottom: 12mm; @@ -106,6 +117,11 @@ td.header img { width: auto; } +/* .mpdf td.header img { */ + /* img width & heights can only be set with inline styles (mpdf 8.0) https://github.com/mpdf/mpdf/issues/366 */ + /* using wpo_wcpdf_header_logo_img_element filter instead in wcpdf-mpdf.php */ +/* } */ + td.header { font-size: 16pt; font-weight: 700; @@ -114,6 +130,7 @@ td.header { td.shop-info { width: 40%; } + .document-type-label { text-transform: uppercase; } @@ -153,8 +170,9 @@ td.order-data table th { } /* Order details */ -table.order-details { - width:100%; +table.order-details, +table.notes-totals { + width: 100%; margin-bottom: 8mm; page-break-before: avoid; } @@ -164,19 +182,23 @@ table.order-details { width: 20%; } -.order-details tr { +.order-details tr, +.notes-totals tr { page-break-inside: always; page-break-after: auto; } .order-details td, -.order-details th { - border-bottom: 1px #ccc solid; - border-top: 1px #ccc solid; +.order-details th, +.notes-totals td, +.notes-totals th { + border-bottom: 1px solid #ccc; + border-top: 1px solid #ccc; padding: 0.375em; } -.order-details th { +.order-details th, +.notes-totals th { font-weight: bold; text-align: left; } @@ -201,38 +223,37 @@ table.order-details { display: none; } -/* item meta formatting for WC2.6 and older */ -dl { - margin: 4px 0; -} - -dt, dd, dd p { - display: inline; +/* item meta formatting */ +.item-meta { + margin: 8px 0 0 0; font-size: 7pt; line-height: 7pt; + overflow-wrap: anywhere; } -dd { - margin-left: 5px; +/* 'ul' applies to Dompdf only */ +ul.wc-item-meta { + margin: 0; } -dd:after { - content: "\A"; - white-space: pre; -} -/* item-meta formatting for WC3.0+ */ -.wc-item-meta { - margin: 4px 0; - font-size: 7pt; - line-height: 7pt; - overflow-wrap: anywhere; +ul.wc-item-meta li { + margin-top: 4px; + margin-left: 0; } -.wc-item-meta p { + +ul.wc-item-meta li p { display: inline; } -.wc-item-meta li { + +/* with mPDF extension '.wc-item-meta' is not 'ul' but a 'div', see 'wpo_wcpdf_mpdf_modify_html()' */ +div.wc-item-meta { margin: 0; - margin-left: 5px; +} + +/* this applies to both Dompdf and mPDF */ +.wc-item-meta p, +.item-meta p { + margin-top: 4px; } /* Notes & Totals */ @@ -271,7 +292,13 @@ table.totals tr.payment_method { display: none; } +/* mPDF */ +.rtl { + direction: rtl; +} + /* Footer Imprint */ +/* mPDF footer styles are hooked via wpo_wcpdf_mpdf_premium_style_overrides() */ #footer { position: absolute; bottom: -2cm; @@ -288,6 +315,7 @@ table.totals tr.payment_method { .pagenum:before { content: counter(page); } + .pagenum,.pagecount { font-family: sans-serif; } From f035568169de83391a44d59c0bf479951dc345ad Mon Sep 17 00:00:00 2001 From: Alexandre Faustino Date: Mon, 7 Oct 2024 10:07:58 +0100 Subject: [PATCH 09/10] v3.8.7 --- readme.txt | 22 +++++++++++++++++++++- woocommerce-pdf-invoices-packingslips.php | 6 +++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/readme.txt b/readme.txt index 284f9b51c..b04e20798 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: woocommerce, pdf, ubl, invoices, packing slips Requires at least: 4.4 Tested up to: 6.6 Requires PHP: 7.2 -Stable tag: 3.8.7-beta-2 +Stable tag: 3.8.7 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -102,6 +102,26 @@ There's a setting on the Advanced tab of the settings page that allows you to to == Changelog == += 3.8.7 (2024-10-07) = +* New: Add full compatibility with mPDF to the Simple Template. +* New: Add refund reason and invoice number titles to the document methods abstract class. +* New: Improve template titles registration. +* New: Improve invoice due date setting. +* New: Add "You might also like these plugins" section to the Upgrade tab. +* New: Function to determine if checkout is using block: `wpo_wcpdf_checkout_is_block()`. +* New: Clean legacy Semaphore locks tool. +* New: Automatic cleanup of unlocked Semaphore locks and other improvements. +* New: Tool to remove expired Semaphore locks. +* New: Filter to modify PDF document data fields: `wpo_wcpdf_document_data_meta_box_fields`. +* Tweak: Lower hook priority (200) for invoice columns in WooCommerce orders list. +* Fix: Replace deprecated jQuery `change()` function usage. +* Fix: Correct path to generic document icon. +* Fix: Check user capabilities in the `enable_debug()` function. +* Fix: Load plugin translations later on the `init` hook. +* Fix: Unblock UI when a tool button is clicked. +* Translations: Update translation template (POT). +* Tested up to WooCommerce 9.4. + = 3.8.6 (2024-07-18) = * Fix: function `add_yith_product_bundles_classes()` errors * Fix: `get_header_logo_id()` return type fatal error diff --git a/woocommerce-pdf-invoices-packingslips.php b/woocommerce-pdf-invoices-packingslips.php index b2bbfd316..8e4e66402 100644 --- a/woocommerce-pdf-invoices-packingslips.php +++ b/woocommerce-pdf-invoices-packingslips.php @@ -4,14 +4,14 @@ * Requires Plugins: woocommerce * Plugin URI: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/ * Description: Create, print & email PDF or UBL Invoices & PDF Packing Slips for WooCommerce orders. - * Version: 3.8.7-beta-2 + * Version: 3.8.7 * Author: WP Overnight * Author URI: https://www.wpovernight.com * License: GPLv2 or later * License URI: https://opensource.org/licenses/gpl-license.php * Text Domain: woocommerce-pdf-invoices-packing-slips * WC requires at least: 3.3 - * WC tested up to: 9.3 + * WC tested up to: 9.4 */ if ( ! defined( 'ABSPATH' ) ) { @@ -22,7 +22,7 @@ class WPO_WCPDF { - public $version = '3.8.7-beta-2'; + public $version = '3.8.7'; public $version_php = '7.2'; public $version_woo = '3.3'; public $version_wp = '4.4'; From 6d9575dc10a3729be9e8bcd51637c840fb4e9c10 Mon Sep 17 00:00:00 2001 From: Alexandre Faustino Date: Mon, 7 Oct 2024 10:23:48 +0100 Subject: [PATCH 10/10] Update woocommerce-pdf-invoices-packing-slips.pot --- ...woocommerce-pdf-invoices-packing-slips.pot | 962 ++++++++++-------- 1 file changed, 525 insertions(+), 437 deletions(-) diff --git a/languages/woocommerce-pdf-invoices-packing-slips.pot b/languages/woocommerce-pdf-invoices-packing-slips.pot index be7b8f8a3..c67626c2e 100644 --- a/languages/woocommerce-pdf-invoices-packing-slips.pot +++ b/languages/woocommerce-pdf-invoices-packing-slips.pot @@ -2,14 +2,14 @@ # This file is distributed under the GPLv2 or later. msgid "" msgstr "" -"Project-Id-Version: PDF Invoices & Packing Slips for WooCommerce 3.8.5-beta-6\n" +"Project-Id-Version: PDF Invoices & Packing Slips for WooCommerce 3.8.7\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-07-15T12:35:46+02:00\n" +"POT-Creation-Date: 2024-10-07T11:13:49+02:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.7.1\n" "X-Domain: woocommerce-pdf-invoices-packing-slips\n" @@ -49,14 +49,14 @@ msgid "Yes you deserve it!" msgstr "" #: includes/class-wcpdf-admin.php:124 -#: includes/class-wcpdf-main.php:893 +#: includes/class-wcpdf-main.php:852 #: includes/views/attachment-settings-hint.php:12 #: includes/views/extensions.php:121 #: includes/views/promo.php:34 -#: woocommerce-pdf-invoices-packingslips.php:340 -#: woocommerce-pdf-invoices-packingslips.php:399 -#: woocommerce-pdf-invoices-packingslips.php:437 -#: woocommerce-pdf-invoices-packingslips.php:527 +#: woocommerce-pdf-invoices-packingslips.php:341 +#: woocommerce-pdf-invoices-packingslips.php:400 +#: woocommerce-pdf-invoices-packingslips.php:438 +#: woocommerce-pdf-invoices-packingslips.php:528 msgid "Hide this message" msgstr "" @@ -77,8 +77,8 @@ msgid "Jumpstart the plugin by following our wizard!" msgstr "" #: includes/class-wcpdf-admin.php:167 -#: includes/views/advanced-tools.php:62 -#: includes/views/advanced-tools.php:64 +#: includes/views/advanced-tools.php:150 +#: includes/views/advanced-tools.php:152 msgid "Run the Setup Wizard" msgstr "" @@ -87,18 +87,18 @@ msgid "I am the wizard" msgstr "" #: includes/class-wcpdf-admin.php:322 -#: includes/class-wcpdf-admin.php:1334 -#: includes/class-wcpdf-assets.php:228 -#: includes/class-wcpdf-main.php:1276 -#: includes/documents/class-wcpdf-invoice.php:314 +#: includes/class-wcpdf-admin.php:1342 +#: includes/class-wcpdf-assets.php:229 +#: includes/class-wcpdf-main.php:1235 +#: includes/documents/class-wcpdf-invoice.php:342 #: includes/views/setup-wizard/display-options.php:81 msgid "Invoice Number" msgstr "" #: includes/class-wcpdf-admin.php:323 -#: includes/class-wcpdf-main.php:1277 +#: includes/class-wcpdf-main.php:1236 #: includes/documents/abstract-wcpdf-order-document-methods.php:1306 -#: includes/documents/class-wcpdf-invoice.php:280 +#: includes/documents/class-wcpdf-invoice.php:310 #: includes/views/setup-wizard/display-options.php:60 msgid "Invoice Date" msgstr "" @@ -159,139 +159,139 @@ msgstr "" msgid "Notes (printed in the invoice):" msgstr "" -#: includes/class-wcpdf-admin.php:859 +#: includes/class-wcpdf-admin.php:867 msgid "View more details" msgstr "" -#: includes/class-wcpdf-admin.php:860 +#: includes/class-wcpdf-admin.php:868 msgid "Hide details" msgstr "" #. translators: document title -#: includes/class-wcpdf-admin.php:872 +#: includes/class-wcpdf-admin.php:880 msgid "Set %s number & date" msgstr "" -#: includes/class-wcpdf-admin.php:877 +#: includes/class-wcpdf-admin.php:885 msgid "You do not have sufficient permissions to edit this document." msgstr "" -#: includes/class-wcpdf-admin.php:889 +#: includes/class-wcpdf-admin.php:897 msgid "unformatted!" msgstr "" -#: includes/class-wcpdf-admin.php:931 +#: includes/class-wcpdf-admin.php:939 msgid "Save changes" msgstr "" -#: includes/class-wcpdf-admin.php:932 +#: includes/class-wcpdf-admin.php:940 msgid "Cancel" msgstr "" #. translators: %s: email title -#: includes/class-wcpdf-admin.php:1054 +#: includes/class-wcpdf-admin.php:1062 msgid "%s email notification manually sent." msgstr "" -#: includes/class-wcpdf-admin.php:1102 +#: includes/class-wcpdf-admin.php:1110 msgid "Nonce expired!" msgstr "" -#: includes/class-wcpdf-admin.php:1108 +#: includes/class-wcpdf-admin.php:1116 msgid "Bad action!" msgstr "" -#: includes/class-wcpdf-admin.php:1114 +#: includes/class-wcpdf-admin.php:1122 msgid "Incomplete request!" msgstr "" -#: includes/class-wcpdf-admin.php:1120 +#: includes/class-wcpdf-admin.php:1128 msgid "No permissions!" msgstr "" -#: includes/class-wcpdf-admin.php:1144 +#: includes/class-wcpdf-admin.php:1152 msgid "Document data saved!" msgstr "" -#: includes/class-wcpdf-admin.php:1145 +#: includes/class-wcpdf-admin.php:1153 msgid "An error occurred while saving the document data!" msgstr "" -#: includes/class-wcpdf-admin.php:1148 +#: includes/class-wcpdf-admin.php:1156 msgid "Document regenerated!" msgstr "" -#: includes/class-wcpdf-admin.php:1149 +#: includes/class-wcpdf-admin.php:1157 msgid "An error occurred while regenerating the document!" msgstr "" -#: includes/class-wcpdf-admin.php:1152 +#: includes/class-wcpdf-admin.php:1160 msgid "Document deleted!" msgstr "" -#: includes/class-wcpdf-admin.php:1153 +#: includes/class-wcpdf-admin.php:1161 msgid "An error occurred while deleting the document!" msgstr "" -#: includes/class-wcpdf-admin.php:1209 +#: includes/class-wcpdf-admin.php:1217 msgid "Document does not exist." msgstr "" -#: includes/class-wcpdf-admin.php:1223 +#: includes/class-wcpdf-admin.php:1231 msgid "Document is empty." msgstr "" -#: includes/class-wcpdf-admin.php:1254 +#: includes/class-wcpdf-admin.php:1262 msgid "DEBUG output enabled" msgstr "" -#: includes/class-wcpdf-assets.php:86 +#: includes/class-wcpdf-assets.php:87 msgid "You have to select order(s) first!" msgstr "" -#: includes/class-wcpdf-assets.php:87 +#: includes/class-wcpdf-assets.php:88 msgid "Are you sure you want to delete this document? This cannot be undone." msgstr "" -#: includes/class-wcpdf-assets.php:88 +#: includes/class-wcpdf-assets.php:89 msgid "Are you sure you want to regenerate this document? This will make the document reflect the most current settings (such as footer text, document name, etc.) rather than using historical settings." msgstr "" -#: includes/class-wcpdf-assets.php:117 +#: includes/class-wcpdf-assets.php:118 msgid "Preview" msgstr "" -#: includes/class-wcpdf-assets.php:120 -#: includes/settings/class-wcpdf-settings-debug.php:913 +#: includes/class-wcpdf-assets.php:121 +#: includes/settings/class-wcpdf-settings-debug.php:929 msgid "Settings" msgstr "" -#: includes/class-wcpdf-assets.php:175 +#: includes/class-wcpdf-assets.php:176 msgid "Document settings" msgstr "" -#: includes/class-wcpdf-assets.php:176 +#: includes/class-wcpdf-assets.php:177 msgid "Select a document in the dropdown menu above to edit its settings." msgstr "" -#: includes/class-wcpdf-assets.php:187 +#: includes/class-wcpdf-assets.php:188 msgid "The number should be smaller than 2147483647. Please note you should add your next document number without prefix, suffix or padding." msgstr "" -#: includes/class-wcpdf-assets.php:261 +#: includes/class-wcpdf-assets.php:262 msgid "Download" msgstr "" -#: includes/class-wcpdf-assets.php:262 +#: includes/class-wcpdf-assets.php:263 msgid "Are you sure you want to reset this settings? This cannot be undone." msgstr "" -#: includes/class-wcpdf-assets.php:263 +#: includes/class-wcpdf-assets.php:264 msgid "Please select a document type" msgstr "" #. translators: 1. open anchor tag, 2. close anchor tag -#: includes/class-wcpdf-assets.php:268 +#: includes/class-wcpdf-assets.php:269 msgid "Enabled: %1$sclick here%2$s to start using the tools." msgstr "" @@ -300,215 +300,215 @@ msgstr "" msgid "Download %s (PDF)" msgstr "" -#: includes/class-wcpdf-main.php:401 +#: includes/class-wcpdf-main.php:360 msgid "You do not have sufficient permissions to access this page. Reason: empty access key" msgstr "" -#: includes/class-wcpdf-main.php:407 +#: includes/class-wcpdf-main.php:366 msgid "You do not have sufficient permissions to access this page. Reason: empty action" msgstr "" -#: includes/class-wcpdf-main.php:413 +#: includes/class-wcpdf-main.php:372 msgid "You do not have sufficient permissions to access this page. Reason: invalid nonce" msgstr "" -#: includes/class-wcpdf-main.php:423 +#: includes/class-wcpdf-main.php:382 msgid "You haven't selected any orders" msgstr "" -#: includes/class-wcpdf-main.php:428 +#: includes/class-wcpdf-main.php:387 msgid "Some of the export parameters are missing." msgstr "" -#: includes/class-wcpdf-main.php:447 +#: includes/class-wcpdf-main.php:406 msgid "You have to save the order before generating a PDF document for it." msgstr "" #. translators: %s: Order ID -#: includes/class-wcpdf-main.php:452 +#: includes/class-wcpdf-main.php:411 msgid "Could not find the order #%s." msgstr "" -#: includes/class-wcpdf-main.php:519 -#: includes/class-wcpdf-settings.php:239 -#: includes/class-wcpdf-settings.php:387 +#: includes/class-wcpdf-main.php:478 +#: includes/class-wcpdf-settings.php:223 +#: includes/class-wcpdf-settings.php:371 msgid "You do not have sufficient permissions to access this page." msgstr "" #. translators: document type -#: includes/class-wcpdf-main.php:574 +#: includes/class-wcpdf-main.php:533 msgid "Document of type '%s' for the selected order(s) could not be generated" msgstr "" #. translators: 1. plugin name, 2. directory path -#: includes/class-wcpdf-main.php:891 +#: includes/class-wcpdf-main.php:850 msgid "The %1$s directory %2$s couldn't be created or is not writable!" msgstr "" -#: includes/class-wcpdf-main.php:892 +#: includes/class-wcpdf-main.php:851 msgid "Please check your directories write permissions or contact your hosting service provider." msgstr "" #. translators: 1,2. file count -#: includes/class-wcpdf-main.php:1229 +#: includes/class-wcpdf-main.php:1188 msgid "Unable to delete %1$d files! (deleted %2$d)" msgstr "" #. translators: file count -#: includes/class-wcpdf-main.php:1233 +#: includes/class-wcpdf-main.php:1192 msgid "Successfully deleted %d files!" msgstr "" -#: includes/class-wcpdf-main.php:1237 +#: includes/class-wcpdf-main.php:1196 msgid "Nothing to delete!" msgstr "" #. translators: 1. document title, 2. creation trigger -#: includes/class-wcpdf-main.php:1313 +#: includes/class-wcpdf-main.php:1272 msgid "PDF %1$s created via %2$s." msgstr "" #. translators: document title -#: includes/class-wcpdf-main.php:1329 +#: includes/class-wcpdf-main.php:1288 msgid "PDF %s deleted." msgstr "" -#: includes/class-wcpdf-main.php:1344 +#: includes/class-wcpdf-main.php:1303 msgid "manually" msgstr "" #. translators: 1. document title, 2. creation trigger -#: includes/class-wcpdf-main.php:1350 +#: includes/class-wcpdf-main.php:1309 msgid "%1$s document marked as printed via %2$s." msgstr "" #. translators: 1. document title, 2. creation trigger -#: includes/class-wcpdf-main.php:1366 +#: includes/class-wcpdf-main.php:1325 msgid "%1$s document unmark printed." msgstr "" -#: includes/class-wcpdf-main.php:1451 +#: includes/class-wcpdf-main.php:1410 msgid "single order action" msgstr "" -#: includes/class-wcpdf-main.php:1452 +#: includes/class-wcpdf-main.php:1411 msgid "bulk order action" msgstr "" -#: includes/class-wcpdf-main.php:1453 +#: includes/class-wcpdf-main.php:1412 msgid "my account" msgstr "" -#: includes/class-wcpdf-main.php:1454 +#: includes/class-wcpdf-main.php:1413 msgid "email attachment" msgstr "" -#: includes/class-wcpdf-main.php:1455 +#: includes/class-wcpdf-main.php:1414 msgid "order document data (number and/or date set manually)" msgstr "" #. translators: 1. document type, 2. mark/unmark -#: includes/class-wcpdf-main.php:1539 +#: includes/class-wcpdf-main.php:1498 msgid "Document of type %1$s for the selected order could not be %2$s as printed." msgstr "" #. translators: document title -#: includes/class-wcpdf-main.php:1634 +#: includes/class-wcpdf-main.php:1595 msgid "Order %s Saved" msgstr "" -#: includes/class-wcpdf-main.php:1667 -#: includes/documents/abstract-wcpdf-order-document.php:652 +#: includes/class-wcpdf-main.php:1648 +#: includes/documents/abstract-wcpdf-order-document.php:886 msgid "Due Date:" msgstr "" -#: includes/class-wcpdf-settings.php:102 -#: includes/class-wcpdf-settings.php:103 +#: includes/class-wcpdf-settings.php:91 +#: includes/class-wcpdf-settings.php:92 msgid "PDF Invoices" msgstr "" -#: includes/class-wcpdf-settings.php:128 +#: includes/class-wcpdf-settings.php:117 msgid "Documentation" msgstr "" -#: includes/class-wcpdf-settings.php:129 +#: includes/class-wcpdf-settings.php:118 msgid "Support Forum" msgstr "" #. translators: database row value -#: includes/class-wcpdf-settings.php:168 +#: includes/class-wcpdf-settings.php:157 msgid "Warning! Your database has an AUTO_INCREMENT step size of %d, your invoice numbers may not be sequential. Enable the 'Calculate document numbers (slow)' setting in the Advanced tab to use an alternate method." msgstr "" -#: includes/class-wcpdf-settings.php:180 -#: includes/settings/class-wcpdf-settings-debug.php:653 +#: includes/class-wcpdf-settings.php:169 +#: includes/settings/class-wcpdf-settings-debug.php:669 msgid "General" msgstr "" -#: includes/class-wcpdf-settings.php:184 +#: includes/class-wcpdf-settings.php:173 msgid "Documents" msgstr "" -#: includes/class-wcpdf-settings.php:188 +#: includes/class-wcpdf-settings.php:177 msgid "UBL" msgstr "" -#: includes/class-wcpdf-settings.php:196 +#: includes/class-wcpdf-settings.php:185 msgid "Advanced" msgstr "" -#: includes/class-wcpdf-settings.php:201 +#: includes/class-wcpdf-settings.php:190 msgid "Upgrade" msgstr "" -#: includes/class-wcpdf-settings.php:279 +#: includes/class-wcpdf-settings.php:263 msgid "Order not found!" msgstr "" -#: includes/class-wcpdf-settings.php:282 +#: includes/class-wcpdf-settings.php:266 msgid "Object found is not an order!" msgstr "" #. translators: order ID -#: includes/class-wcpdf-settings.php:354 +#: includes/class-wcpdf-settings.php:338 msgid "Document not available for order #%s, try selecting a different order." msgstr "" -#: includes/class-wcpdf-settings.php:361 +#: includes/class-wcpdf-settings.php:345 msgid "No WooCommerce orders found! Please consider adding your first order to see this preview." msgstr "" #. translators: error message -#: includes/class-wcpdf-settings.php:371 +#: includes/class-wcpdf-settings.php:355 msgid "Error trying to generate document: %s" msgstr "" -#: includes/class-wcpdf-settings.php:445 +#: includes/class-wcpdf-settings.php:429 #: includes/tables/class-wcpdf-number-store-list-table.php:122 msgid "Date" msgstr "" -#: includes/class-wcpdf-settings.php:446 +#: includes/class-wcpdf-settings.php:430 #: includes/documents/abstract-wcpdf-order-document-methods.php:1111 #: ubl/Settings/TaxesSettings.php:170 msgid "Total" msgstr "" -#: includes/class-wcpdf-settings.php:453 +#: includes/class-wcpdf-settings.php:437 msgid "No order(s) found!" msgstr "" -#: includes/class-wcpdf-settings.php:456 +#: includes/class-wcpdf-settings.php:440 msgid "An error occurred when trying to process your request!" msgstr "" #. translators: error message -#: includes/class-wcpdf-settings.php:463 +#: includes/class-wcpdf-settings.php:447 msgid "Error trying to get orders: %s" msgstr "" #. translators: total scheduled actions -#: includes/class-wcpdf-settings.php:953 +#: includes/class-wcpdf-settings.php:937 msgid "Only 1 scheduled action should exist for the yearly reset of the numbering system, but %s were found" msgstr "" @@ -569,7 +569,7 @@ msgstr "" msgid "Finish" msgstr "" -#: includes/compatibility/class-wcpdf-compatibility-third-party-plugins.php:374 +#: includes/compatibility/class-wcpdf-compatibility-third-party-plugins.php:391 #: includes/views/setup-wizard/display-options.php:73 msgid "Invoice number" msgstr "" @@ -596,91 +596,152 @@ msgid "Total ex. VAT" msgstr "" #: includes/documents/abstract-wcpdf-order-document-methods.php:1307 -#: includes/documents/class-wcpdf-invoice.php:281 +#: includes/documents/class-wcpdf-invoice.php:311 #: includes/views/setup-wizard/display-options.php:61 msgid "Order Date" msgstr "" +#: includes/documents/abstract-wcpdf-order-document-methods.php:1325 +#: includes/documents/class-wcpdf-invoice.php:66 +msgid "Invoice Number:" +msgstr "" + +#: includes/documents/abstract-wcpdf-order-document-methods.php:1348 +msgid "Reason for refund:" +msgstr "" + #. translators: 1. credit note title, 2. refund id -#: includes/documents/abstract-wcpdf-order-document.php:506 +#: includes/documents/abstract-wcpdf-order-document.php:471 msgid "%1$s (refund #%2$s) was regenerated." msgstr "" #. translators: 1. credit note title, 2. refund id -#: includes/documents/abstract-wcpdf-order-document.php:506 +#: includes/documents/abstract-wcpdf-order-document.php:471 msgid "%s was regenerated" msgstr "" #. translators: %s: document name -#: includes/documents/abstract-wcpdf-order-document.php:633 +#: includes/documents/abstract-wcpdf-order-document.php:872 msgid "%s Number:" msgstr "" #. translators: %s: document name -#: includes/documents/abstract-wcpdf-order-document.php:643 +#: includes/documents/abstract-wcpdf-order-document.php:880 msgid "%s Date:" msgstr "" -#: includes/documents/abstract-wcpdf-order-document.php:1267 +#: includes/documents/abstract-wcpdf-order-document.php:890 +msgid "Billing Address:" +msgstr "" + +#: includes/documents/abstract-wcpdf-order-document.php:893 +msgid "Shipping Address:" +msgstr "" + +#: includes/documents/abstract-wcpdf-order-document.php:896 +msgid "Order Number:" +msgstr "" + +#: includes/documents/abstract-wcpdf-order-document.php:899 +msgid "Order Date:" +msgstr "" + +#: includes/documents/abstract-wcpdf-order-document.php:902 +msgid "Payment Method:" +msgstr "" + +#: includes/documents/abstract-wcpdf-order-document.php:905 +#: languages/strings.php:6 +msgid "Payment Date:" +msgstr "" + +#: includes/documents/abstract-wcpdf-order-document.php:908 +msgid "Shipping Method:" +msgstr "" + +#: includes/documents/abstract-wcpdf-order-document.php:911 +msgid "SKU:" +msgstr "" + +#: includes/documents/abstract-wcpdf-order-document.php:914 +msgid "Weight:" +msgstr "" + +#: includes/documents/abstract-wcpdf-order-document.php:917 +msgid "Notes:" +msgstr "" + +#: includes/documents/abstract-wcpdf-order-document.php:920 +msgid "Customer Notes:" +msgstr "" + +#: includes/documents/abstract-wcpdf-order-document.php:1545 msgid "Admin email" msgstr "" -#: includes/documents/abstract-wcpdf-order-document.php:1270 +#: includes/documents/abstract-wcpdf-order-document.php:1548 msgid "Manual email" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:29 +#: includes/documents/class-wcpdf-invoice.php:24 #: includes/documents/class-wcpdf-invoice.php:56 #: includes/views/settings-page.php:127 msgid "Invoice" msgstr "" +#: includes/documents/class-wcpdf-invoice.php:76 +msgid "Invoice Date:" +msgstr "" + +#: includes/documents/class-wcpdf-invoice.php:86 +msgid "Ship To:" +msgstr "" + #. translators: document type -#: includes/documents/class-wcpdf-invoice.php:95 -#: includes/documents/class-wcpdf-invoice.php:353 -#: includes/documents/class-wcpdf-invoice.php:362 -#: includes/documents/class-wcpdf-invoice.php:370 -#: includes/documents/class-wcpdf-invoice.php:374 +#: includes/documents/class-wcpdf-invoice.php:125 +#: includes/documents/class-wcpdf-invoice.php:381 +#: includes/documents/class-wcpdf-invoice.php:390 +#: includes/documents/class-wcpdf-invoice.php:398 +#: includes/documents/class-wcpdf-invoice.php:402 msgid "invoice" msgid_plural "invoices" msgstr[0] "" msgstr[1] "" -#: includes/documents/class-wcpdf-invoice.php:180 -#: includes/documents/class-wcpdf-invoice.php:549 -#: includes/documents/class-wcpdf-packing-slip.php:85 +#: includes/documents/class-wcpdf-invoice.php:210 +#: includes/documents/class-wcpdf-invoice.php:577 +#: includes/documents/class-wcpdf-packing-slip.php:110 msgid "Enable" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:191 -#: includes/documents/class-wcpdf-invoice.php:560 -#: includes/documents/class-wcpdf-packing-slip.php:160 +#: includes/documents/class-wcpdf-invoice.php:221 +#: includes/documents/class-wcpdf-invoice.php:588 +#: includes/documents/class-wcpdf-packing-slip.php:185 msgid "Attach to:" msgstr "" #. translators: directory path -#: includes/documents/class-wcpdf-invoice.php:199 -#: includes/documents/class-wcpdf-invoice.php:568 +#: includes/documents/class-wcpdf-invoice.php:229 +#: includes/documents/class-wcpdf-invoice.php:596 msgid "It looks like the temp folder (%s) is not writable, check the permissions for this folder! Without having write access to this folder, the plugin will not be able to email invoices." msgstr "" -#: includes/documents/class-wcpdf-invoice.php:205 +#: includes/documents/class-wcpdf-invoice.php:235 msgid "Disable for:" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:214 +#: includes/documents/class-wcpdf-invoice.php:244 msgid "Select one or more statuses" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:220 +#: includes/documents/class-wcpdf-invoice.php:250 msgid "Display shipping address" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:227 -#: includes/documents/class-wcpdf-invoice.php:279 -#: includes/documents/class-wcpdf-invoice.php:295 -#: includes/documents/class-wcpdf-invoice.php:313 -#: includes/documents/class-wcpdf-packing-slip.php:103 +#: includes/documents/class-wcpdf-invoice.php:257 +#: includes/documents/class-wcpdf-invoice.php:309 +#: includes/documents/class-wcpdf-invoice.php:341 +#: includes/documents/class-wcpdf-packing-slip.php:128 #: includes/views/advanced-status.php:169 #: includes/views/advanced-status.php:173 #: includes/views/advanced-status.php:204 @@ -691,294 +752,275 @@ msgstr "" msgid "No" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:228 +#: includes/documents/class-wcpdf-invoice.php:258 #: includes/views/setup-wizard/display-options.php:21 msgid "Only when different from billing address" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:229 -#: includes/documents/class-wcpdf-invoice.php:400 -#: includes/documents/class-wcpdf-packing-slip.php:105 +#: includes/documents/class-wcpdf-invoice.php:259 +#: includes/documents/class-wcpdf-invoice.php:428 +#: includes/documents/class-wcpdf-packing-slip.php:130 #: includes/views/setup-wizard/display-options.php:22 msgid "Always" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:237 -#: includes/documents/class-wcpdf-packing-slip.php:113 +#: includes/documents/class-wcpdf-invoice.php:267 +#: includes/documents/class-wcpdf-packing-slip.php:138 msgid "Display email address" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:248 -#: includes/documents/class-wcpdf-packing-slip.php:124 +#: includes/documents/class-wcpdf-invoice.php:278 +#: includes/documents/class-wcpdf-packing-slip.php:149 msgid "Display phone number" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:259 -#: includes/documents/class-wcpdf-packing-slip.php:135 +#: includes/documents/class-wcpdf-invoice.php:289 +#: includes/documents/class-wcpdf-packing-slip.php:160 msgid "Display customer notes" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:272 +#: includes/documents/class-wcpdf-invoice.php:302 msgid "Display invoice date" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:288 +#: includes/documents/class-wcpdf-invoice.php:318 msgid "Display due date" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:296 -msgid "1 day" -msgstr "" - -#: includes/documents/class-wcpdf-invoice.php:297 -msgid "7 days" -msgstr "" - -#: includes/documents/class-wcpdf-invoice.php:298 -msgid "30 days" -msgstr "" - -#: includes/documents/class-wcpdf-invoice.php:300 -msgid "Displays a due date below the order data." +#. translators: number of days +#: includes/documents/class-wcpdf-invoice.php:325 +msgid "%s days" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:306 +#: includes/documents/class-wcpdf-invoice.php:334 msgid "Display invoice number" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:315 +#: includes/documents/class-wcpdf-invoice.php:343 #: includes/views/setup-wizard/display-options.php:82 msgid "Order Number" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:319 +#: includes/documents/class-wcpdf-invoice.php:347 msgid "Warning!" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:320 +#: includes/documents/class-wcpdf-invoice.php:348 msgid "Using the Order Number as invoice number is not recommended as this may lead to gaps in the invoice number sequence (even when order numbers are sequential)." msgstr "" -#: includes/documents/class-wcpdf-invoice.php:321 +#: includes/documents/class-wcpdf-invoice.php:349 msgid "More information" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:328 +#: includes/documents/class-wcpdf-invoice.php:356 msgid "Next invoice number (without prefix/suffix etc.)" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:334 +#: includes/documents/class-wcpdf-invoice.php:362 msgid "This is the number that will be used for the next document. By default, numbering starts from 1 and increases for every new document. Note that if you override this and set it lower than the current/highest number, this could create duplicate numbers!" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:340 +#: includes/documents/class-wcpdf-invoice.php:368 msgid "Number format" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:348 +#: includes/documents/class-wcpdf-invoice.php:376 msgid "Prefix" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:350 +#: includes/documents/class-wcpdf-invoice.php:378 msgid "If set, this value will be used as number prefix." msgstr "" #. translators: 1. document type, 2-3 placeholders -#: includes/documents/class-wcpdf-invoice.php:352 -#: includes/documents/class-wcpdf-invoice.php:361 +#: includes/documents/class-wcpdf-invoice.php:380 +#: includes/documents/class-wcpdf-invoice.php:389 msgid "You can use the %1$s year and/or month with the %2$s or %3$s placeholders respectively." msgstr "" -#: includes/documents/class-wcpdf-invoice.php:354 -#: includes/documents/class-wcpdf-invoice.php:363 +#: includes/documents/class-wcpdf-invoice.php:382 +#: includes/documents/class-wcpdf-invoice.php:391 msgid "Check the Docs article below to see all the available placeholders for prefix/suffix." msgstr "" -#: includes/documents/class-wcpdf-invoice.php:357 +#: includes/documents/class-wcpdf-invoice.php:385 msgid "Suffix" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:359 +#: includes/documents/class-wcpdf-invoice.php:387 msgid "If set, this value will be used as number suffix." msgstr "" -#: includes/documents/class-wcpdf-invoice.php:366 +#: includes/documents/class-wcpdf-invoice.php:394 msgid "Padding" msgstr "" #. translators: document type -#: includes/documents/class-wcpdf-invoice.php:370 +#: includes/documents/class-wcpdf-invoice.php:398 msgid "Enter the number of digits you want to use as padding. For instance, enter 6 to display the %s number 123 as 000123, filling it with zeros until the number set as padding is reached." msgstr "" #. translators: document type -#: includes/documents/class-wcpdf-invoice.php:374 +#: includes/documents/class-wcpdf-invoice.php:402 msgid "For more information about setting up the number format and see the available placeholders for the prefix and suffix, check this article:" msgstr "" #. translators: document type -#: includes/documents/class-wcpdf-invoice.php:374 +#: includes/documents/class-wcpdf-invoice.php:402 msgid "Number format explained" msgstr "" #. translators: document type -#: includes/documents/class-wcpdf-invoice.php:374 +#: includes/documents/class-wcpdf-invoice.php:402 msgid "Note: Changes made to the number format will only be reflected on new orders. Also, if you have already created a custom %s number format with a filter, the above settings will be ignored." msgstr "" -#: includes/documents/class-wcpdf-invoice.php:380 +#: includes/documents/class-wcpdf-invoice.php:408 msgid "Reset invoice number yearly" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:391 +#: includes/documents/class-wcpdf-invoice.php:419 msgid "Allow My Account invoice download" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:398 +#: includes/documents/class-wcpdf-invoice.php:426 msgid "Only when an invoice is already created/emailed" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:399 +#: includes/documents/class-wcpdf-invoice.php:427 msgid "Only for specific order statuses (define below)" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:401 +#: includes/documents/class-wcpdf-invoice.php:429 msgid "Never" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:416 +#: includes/documents/class-wcpdf-invoice.php:444 msgid "Enable invoice number column in the orders list" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:427 +#: includes/documents/class-wcpdf-invoice.php:455 msgid "Enable invoice date column in the orders list" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:438 +#: includes/documents/class-wcpdf-invoice.php:466 msgid "Enable invoice number search in the orders list" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:444 +#: includes/documents/class-wcpdf-invoice.php:472 msgid "The search process may be slower on non-HPOS stores. For a more efficient search, you can utilize the HPOS feature, allowing you to search orders by invoice numbers using the search type selector." msgstr "" -#: includes/documents/class-wcpdf-invoice.php:450 +#: includes/documents/class-wcpdf-invoice.php:478 msgid "Disable for free orders" msgstr "" #. translators: zero number -#: includes/documents/class-wcpdf-invoice.php:457 +#: includes/documents/class-wcpdf-invoice.php:485 msgid "Disable document when the order total is %s" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:463 +#: includes/documents/class-wcpdf-invoice.php:491 msgid "Mark as printed" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:471 +#: includes/documents/class-wcpdf-invoice.php:499 msgid "Manually" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:474 +#: includes/documents/class-wcpdf-invoice.php:502 msgid "On single order action" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:475 +#: includes/documents/class-wcpdf-invoice.php:503 msgid "On bulk order action" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:476 +#: includes/documents/class-wcpdf-invoice.php:504 msgid "On my account" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:477 +#: includes/documents/class-wcpdf-invoice.php:505 msgid "On email attachment" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:478 +#: includes/documents/class-wcpdf-invoice.php:506 msgid "On order document data (number and/or date set manually)" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:483 +#: includes/documents/class-wcpdf-invoice.php:511 msgid "Allows you to mark the document as printed, manually (in the order page) or automatically (based on the document creation context you have selected)." msgstr "" -#: includes/documents/class-wcpdf-invoice.php:489 +#: includes/documents/class-wcpdf-invoice.php:517 msgid "Unmark as printed" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:495 +#: includes/documents/class-wcpdf-invoice.php:523 msgid "Adds a link in the order page to allow to remove the printed mark." msgstr "" -#: includes/documents/class-wcpdf-invoice.php:501 +#: includes/documents/class-wcpdf-invoice.php:529 msgid "Always use most current settings" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:507 +#: includes/documents/class-wcpdf-invoice.php:535 msgid "When enabled, the document will always reflect the most current settings (such as footer text, document name, etc.) rather than using historical settings." msgstr "" -#: includes/documents/class-wcpdf-invoice.php:509 +#: includes/documents/class-wcpdf-invoice.php:537 msgid "Caution: enabling this will also mean that if you change your company name or address in the future, previously generated documents will also be affected." msgstr "" -#: includes/documents/class-wcpdf-invoice.php:522 +#: includes/documents/class-wcpdf-invoice.php:550 msgid "Invoice numbers are created by a third-party extension." msgstr "" #. translators: link -#: includes/documents/class-wcpdf-invoice.php:525 +#: includes/documents/class-wcpdf-invoice.php:553 msgid "Configure it here." msgstr "" -#: includes/documents/class-wcpdf-invoice.php:574 +#: includes/documents/class-wcpdf-invoice.php:602 msgid "Include encrypted PDF:" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:580 +#: includes/documents/class-wcpdf-invoice.php:608 msgid "Include the PDF Invoice file encrypted in the UBL file." msgstr "" -#: includes/documents/class-wcpdf-invoice.php:592 -msgid "Invoice Number:" +#: includes/documents/class-wcpdf-packing-slip.php:24 +#: includes/documents/class-wcpdf-packing-slip.php:41 +msgid "Packing Slip" msgstr "" -#: includes/documents/class-wcpdf-invoice.php:600 -msgid "Invoice Date:" +#: includes/documents/class-wcpdf-packing-slip.php:51 +msgid "Packing Slip Number:" msgstr "" -#: includes/documents/class-wcpdf-packing-slip.php:24 -#: includes/documents/class-wcpdf-packing-slip.php:36 -msgid "Packing Slip" +#: includes/documents/class-wcpdf-packing-slip.php:61 +msgid "Packing Slip Date:" msgstr "" -#: includes/documents/class-wcpdf-packing-slip.php:42 +#: includes/documents/class-wcpdf-packing-slip.php:67 msgid "packing-slip" msgid_plural "packing-slips" msgstr[0] "" msgstr[1] "" -#: includes/documents/class-wcpdf-packing-slip.php:96 +#: includes/documents/class-wcpdf-packing-slip.php:121 msgid "Display billing address" msgstr "" -#: includes/documents/class-wcpdf-packing-slip.php:104 +#: includes/documents/class-wcpdf-packing-slip.php:129 msgid "Only when different from shipping address" msgstr "" -#: includes/documents/class-wcpdf-packing-slip.php:151 +#: includes/documents/class-wcpdf-packing-slip.php:176 msgid "Upgrade to our Professional extension to attach packing slips to any email!" msgstr "" -#: includes/documents/class-wcpdf-packing-slip.php:184 -msgid "Packing Slip Number:" -msgstr "" - -#: includes/documents/class-wcpdf-packing-slip.php:192 -msgid "Packing Slip Date:" -msgstr "" - #: includes/settings/class-wcpdf-settings-callbacks.php:37 msgid "Warning! The settings below are meant for debugging/development only. Do not use them on a live website!" msgstr "" @@ -1012,270 +1054,278 @@ msgid "Yearly reset numbering system rescheduled!" msgstr "" #: includes/settings/class-wcpdf-settings-debug.php:250 +msgid "Released semaphore locks have been cleaned up!" +msgstr "" + +#: includes/settings/class-wcpdf-settings-debug.php:258 +msgid "Released legacy semaphore locks have been cleaned up!" +msgstr "" + +#: includes/settings/class-wcpdf-settings-debug.php:266 msgid "Extensions' license cache cleared successfully!" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:278 +#: includes/settings/class-wcpdf-settings-debug.php:294 msgid "Export settings type is empty!" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:315 +#: includes/settings/class-wcpdf-settings-debug.php:331 msgid "Exported settings data is empty!" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:334 +#: includes/settings/class-wcpdf-settings-debug.php:350 msgid "Failed to get contents from JSON file!" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:341 +#: includes/settings/class-wcpdf-settings-debug.php:357 msgid "JSON file not found!" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:347 +#: includes/settings/class-wcpdf-settings-debug.php:363 msgid "The JSON file data is corrupted!" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:358 +#: includes/settings/class-wcpdf-settings-debug.php:374 msgid "The JSON file settings type is not supported on this store!" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:383 +#: includes/settings/class-wcpdf-settings-debug.php:399 msgid "Couldn't determine the settings option for the import!" msgstr "" #. translators: settings type -#: includes/settings/class-wcpdf-settings-debug.php:392 +#: includes/settings/class-wcpdf-settings-debug.php:408 msgid "%s settings imported successfully!" msgstr "" #. translators: settings type -#: includes/settings/class-wcpdf-settings-debug.php:400 +#: includes/settings/class-wcpdf-settings-debug.php:416 msgid "The %s settings file you are trying to import is identical to your current settings, therefore, the settings were not imported." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:412 +#: includes/settings/class-wcpdf-settings-debug.php:428 msgid "Reset settings type is empty!" msgstr "" #. translators: settings type -#: includes/settings/class-wcpdf-settings-debug.php:451 +#: includes/settings/class-wcpdf-settings-debug.php:467 msgid "%s settings reset not supported!" msgstr "" #. translators: settings type -#: includes/settings/class-wcpdf-settings-debug.php:464 +#: includes/settings/class-wcpdf-settings-debug.php:480 msgid "%s settings are already reset!" msgstr "" #. translators: settings type -#: includes/settings/class-wcpdf-settings-debug.php:476 +#: includes/settings/class-wcpdf-settings-debug.php:492 msgid "%s settings reset successfully!" msgstr "" #. translators: settings type -#: includes/settings/class-wcpdf-settings-debug.php:484 +#: includes/settings/class-wcpdf-settings-debug.php:500 msgid "An error occurred when trying to reset the %s settings." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:498 +#: includes/settings/class-wcpdf-settings-debug.php:514 msgid "One or more request parameters missing." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:510 +#: includes/settings/class-wcpdf-settings-debug.php:526 msgid "documents deleted." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:510 +#: includes/settings/class-wcpdf-settings-debug.php:526 msgid "documents renumbered." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:541 +#: includes/settings/class-wcpdf-settings-debug.php:557 msgid "Wrong date type selected." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:556 +#: includes/settings/class-wcpdf-settings-debug.php:572 msgid "Unexpected results from the orders query." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:654 +#: includes/settings/class-wcpdf-settings-debug.php:670 msgid "Debug" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:655 +#: includes/settings/class-wcpdf-settings-debug.php:671 msgid "UBL Taxes" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:691 +#: includes/settings/class-wcpdf-settings-debug.php:707 msgid "Document link access type" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:699 +#: includes/settings/class-wcpdf-settings-debug.php:715 msgid "Logged in (recommended)" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:700 -#: includes/settings/class-wcpdf-settings-debug.php:900 +#: includes/settings/class-wcpdf-settings-debug.php:716 +#: includes/settings/class-wcpdf-settings-debug.php:916 msgid "Guest" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:701 -#: includes/settings/class-wcpdf-settings-debug.php:904 +#: includes/settings/class-wcpdf-settings-debug.php:717 +#: includes/settings/class-wcpdf-settings-debug.php:920 msgid "Full" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:718 +#: includes/settings/class-wcpdf-settings-debug.php:734 msgid "Document access denied redirect page" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:726 +#: includes/settings/class-wcpdf-settings-debug.php:742 msgid "Blank page with message (default)" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:727 +#: includes/settings/class-wcpdf-settings-debug.php:743 msgid "Login page" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:728 +#: includes/settings/class-wcpdf-settings-debug.php:744 msgid "My Account page" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:729 +#: includes/settings/class-wcpdf-settings-debug.php:745 msgid "Custom page (enter below)" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:731 +#: includes/settings/class-wcpdf-settings-debug.php:747 msgid "Select a frontend page to be used to redirect users when the document access is denied." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:744 +#: includes/settings/class-wcpdf-settings-debug.php:760 msgid "Custom external URLs not allowed." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:750 +#: includes/settings/class-wcpdf-settings-debug.php:766 msgid "Pretty document links" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:756 +#: includes/settings/class-wcpdf-settings-debug.php:772 msgid "Changes the document links to a prettier URL scheme." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:762 +#: includes/settings/class-wcpdf-settings-debug.php:778 msgid "Calculate document numbers (slow)" msgstr "" #. translators: 1. AUTO_INCREMENT, 2. one -#: includes/settings/class-wcpdf-settings-debug.php:770 +#: includes/settings/class-wcpdf-settings-debug.php:786 msgid "Document numbers (such as invoice numbers) are generated using %1$s by default. Use this setting if your database auto increments with more than %2$s." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:779 +#: includes/settings/class-wcpdf-settings-debug.php:795 msgid "Enable debug output" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:785 +#: includes/settings/class-wcpdf-settings-debug.php:801 msgid "Enable this option to output plugin errors if you're getting a blank page or other PDF generation issues." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:786 +#: includes/settings/class-wcpdf-settings-debug.php:802 msgid "Caution! This setting may reveal errors (from other plugins) in other places on your site too, therefore this is not recommended to leave it enabled on live sites." msgstr "" #. translators: &debug=true -#: includes/settings/class-wcpdf-settings-debug.php:789 +#: includes/settings/class-wcpdf-settings-debug.php:805 msgid "You can also add %s to the URL to apply this on a per-order basis." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:797 +#: includes/settings/class-wcpdf-settings-debug.php:813 msgid "Enable automatic cleanup" msgstr "" #. translators: number of days -#: includes/settings/class-wcpdf-settings-debug.php:804 +#: includes/settings/class-wcpdf-settings-debug.php:820 msgid "every %s days" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:808 +#: includes/settings/class-wcpdf-settings-debug.php:824 msgid "Automatically clean up PDF files stored in the temporary folder (used for email attachments)" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:814 +#: includes/settings/class-wcpdf-settings-debug.php:830 msgid "Output to HTML" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:820 +#: includes/settings/class-wcpdf-settings-debug.php:836 msgid "Send the template output as HTML to the browser instead of creating a PDF." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:821 +#: includes/settings/class-wcpdf-settings-debug.php:837 msgid "You can also add &output=html to the URL to apply this on a per-order basis." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:827 +#: includes/settings/class-wcpdf-settings-debug.php:843 msgid "Embed Images" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:833 +#: includes/settings/class-wcpdf-settings-debug.php:849 msgid "Embed images only if you are experiencing issues with them loading in your PDF. Please note that this option can significantly increase the file size." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:839 +#: includes/settings/class-wcpdf-settings-debug.php:855 msgid "Log to order notes" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:845 +#: includes/settings/class-wcpdf-settings-debug.php:861 msgid "Log PDF document creation, deletion, and mark/unmark as printed to order notes." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:851 +#: includes/settings/class-wcpdf-settings-debug.php:867 msgid "Disable document preview" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:857 +#: includes/settings/class-wcpdf-settings-debug.php:873 msgid "Disables the document preview on the plugin settings pages." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:863 +#: includes/settings/class-wcpdf-settings-debug.php:879 msgid "Enable semaphore logs" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:869 +#: includes/settings/class-wcpdf-settings-debug.php:885 msgid "Our plugin uses a semaphore class that prevents race conditions in multiple places in the code. Enable this setting only if you are having issues with document numbers, yearly reset or documents being assigned to the wrong order." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:875 +#: includes/settings/class-wcpdf-settings-debug.php:891 msgid "Enable danger zone tools" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:881 +#: includes/settings/class-wcpdf-settings-debug.php:897 msgid "Enables the danger zone tools. The actions performed by these tools are irreversible!" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:896 +#: includes/settings/class-wcpdf-settings-debug.php:912 msgid "Logged in" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:897 +#: includes/settings/class-wcpdf-settings-debug.php:913 msgid "Document can be accessed by logged in users only." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:901 +#: includes/settings/class-wcpdf-settings-debug.php:917 msgid "Document can be accessed by logged in and guest users." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:905 +#: includes/settings/class-wcpdf-settings-debug.php:921 msgid "Document can be accessed by everyone with the link." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:914 +#: includes/settings/class-wcpdf-settings-debug.php:930 #: includes/views/advanced-status.php:325 msgid "Status" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:915 +#: includes/settings/class-wcpdf-settings-debug.php:931 msgid "Tools" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:916 +#: includes/settings/class-wcpdf-settings-debug.php:932 msgid "Numbers" msgstr "" @@ -1530,7 +1580,7 @@ msgstr "" #: includes/settings/class-wcpdf-settings-upgrade.php:91 #: includes/settings/class-wcpdf-settings-upgrade.php:101 #: includes/settings/class-wcpdf-settings-upgrade.php:111 -#: includes/views/upgrade-table.php:56 +#: includes/views/upgrade-table.php:54 msgid "Learn more" msgstr "" @@ -1566,6 +1616,54 @@ msgstr "" msgid "Easily change the look and feel of your documents by adding some custom CSS." msgstr "" +#: includes/settings/class-wcpdf-settings-upgrade.php:133 +msgid "WooCommerce Smart Reminder Emails" +msgstr "" + +#: includes/settings/class-wcpdf-settings-upgrade.php:134 +msgid "Automatically schedule and send Reminder Emails for WooCommerce orders." +msgstr "" + +#: includes/settings/class-wcpdf-settings-upgrade.php:140 +msgid "WooCommerce Print Address Labels" +msgstr "" + +#: includes/settings/class-wcpdf-settings-upgrade.php:141 +msgid "Print out address labels for selected orders straight from WooCommerce." +msgstr "" + +#: includes/settings/class-wcpdf-settings-upgrade.php:147 +msgid "WooCommerce Automatic Printing - PrintNode" +msgstr "" + +#: includes/settings/class-wcpdf-settings-upgrade.php:148 +msgid "A plugin to automatically print completed orders via PrintNode." +msgstr "" + +#: includes/settings/class-wcpdf-settings-upgrade.php:154 +msgid "WooCommerce Ultimate Barcodes" +msgstr "" + +#: includes/settings/class-wcpdf-settings-upgrade.php:155 +msgid "Generate barcodes (ZATCA, QR-codes, C128, EAN-13 and more) for your orders, products and even invoices & packing slips." +msgstr "" + +#: includes/settings/class-wcpdf-settings-upgrade.php:161 +msgid "WooCommerce Print Order List" +msgstr "" + +#: includes/settings/class-wcpdf-settings-upgrade.php:162 +msgid "This plugin lets you quickly print a list of your WooCommerce orders. Great for order picking." +msgstr "" + +#: includes/settings/class-wcpdf-settings-upgrade.php:168 +msgid "Menu Cart Pro" +msgstr "" + +#: includes/settings/class-wcpdf-settings-upgrade.php:169 +msgid "Integrates seamlessly with WooCommerce to add a shopping cart to your menu." +msgstr "" + #: includes/tables/class-wcpdf-number-store-list-table.php:80 msgid "Refund:" msgstr "" @@ -1616,7 +1714,7 @@ msgid "Search number" msgstr "" #: includes/views/advanced-numbers.php:39 -#: includes/views/advanced-tools.php:123 +#: includes/views/advanced-tools.php:211 msgid "Reset" msgstr "" @@ -1853,140 +1951,187 @@ msgstr "" msgid "Clean up the PDF files stored in the temporary folder (used for email attachments)." msgstr "" +#: includes/views/advanced-tools.php:62 +msgid "Remove released semaphore locks" +msgstr "" + #: includes/views/advanced-tools.php:63 +msgid "Clean up the released semaphore locks from the database." +msgstr "" + +#: includes/views/advanced-tools.php:66 +msgid "Remove released locks" +msgstr "" + +#. translators: 1: number of released semaphore locks +#: includes/views/advanced-tools.php:78 +msgid "There is %s released semaphore lock in the database." +msgid_plural "There are %s released semaphore locks in the database." +msgstr[0] "" +msgstr[1] "" + +#: includes/views/advanced-tools.php:91 +msgid "There are no released semaphore locks in the database." +msgstr "" + +#. translators: 1: next run date +#: includes/views/advanced-tools.php:105 +msgid "The next cleanup action is scheduled to run on %s." +msgstr "" + +#: includes/views/advanced-tools.php:120 +msgid "Remove released legacy semaphore locks" +msgstr "" + +#: includes/views/advanced-tools.php:121 +msgid "Clean up the released legacy semaphore locks from the database." +msgstr "" + +#: includes/views/advanced-tools.php:124 +msgid "Remove released legacy locks" +msgstr "" + +#. translators: 1: number of released legacy semaphore locks +#: includes/views/advanced-tools.php:134 +msgid "There is %s released legacy semaphore lock in the database." +msgid_plural "There are %s released legacy semaphore locks in the database." +msgstr[0] "" +msgstr[1] "" + +#: includes/views/advanced-tools.php:151 msgid "Set up your basic invoice workflow via our Wizard." msgstr "" -#: includes/views/advanced-tools.php:69 +#: includes/views/advanced-tools.php:157 msgid "Export Settings" msgstr "" -#: includes/views/advanced-tools.php:70 +#: includes/views/advanced-tools.php:158 msgid "Download plugin settings in JSON format to easily export your current setup." msgstr "" -#: includes/views/advanced-tools.php:83 +#: includes/views/advanced-tools.php:171 msgid "Export" msgstr "" -#: includes/views/advanced-tools.php:93 +#: includes/views/advanced-tools.php:181 msgid "Import Settings" msgstr "" -#: includes/views/advanced-tools.php:94 +#: includes/views/advanced-tools.php:182 msgid "Import plugin settings in JSON format." msgstr "" -#: includes/views/advanced-tools.php:99 +#: includes/views/advanced-tools.php:187 msgid "Import" msgstr "" -#: includes/views/advanced-tools.php:109 +#: includes/views/advanced-tools.php:197 msgid "Reset Settings" msgstr "" -#: includes/views/advanced-tools.php:110 +#: includes/views/advanced-tools.php:198 msgid "This will clear all your selected settings data. Please do a backup first using the export tool above." msgstr "" -#: includes/views/advanced-tools.php:134 +#: includes/views/advanced-tools.php:222 msgid "Clear extensions license caching" msgstr "" -#: includes/views/advanced-tools.php:135 +#: includes/views/advanced-tools.php:223 msgid "This will clear all extensions' license caching. This could be required to update the license status in the Upgrade tab or for new Cloud Storage activations (Professional extension)." msgstr "" -#: includes/views/advanced-tools.php:138 +#: includes/views/advanced-tools.php:226 msgid "Clear licenses cache" msgstr "" -#: includes/views/advanced-tools.php:153 +#: includes/views/advanced-tools.php:241 msgid "Order date created" msgstr "" -#: includes/views/advanced-tools.php:154 +#: includes/views/advanced-tools.php:242 msgid "Order date modified" msgstr "" -#: includes/views/advanced-tools.php:155 +#: includes/views/advanced-tools.php:243 msgid "Order date completed" msgstr "" -#: includes/views/advanced-tools.php:156 +#: includes/views/advanced-tools.php:244 msgid "Order date paid" msgstr "" -#: includes/views/advanced-tools.php:157 +#: includes/views/advanced-tools.php:245 msgid "Document date" msgstr "" -#: includes/views/advanced-tools.php:163 +#: includes/views/advanced-tools.php:251 msgid "DANGER ZONE: Create a backup before using these tools, the actions they perform are irreversible!" msgstr "" -#: includes/views/advanced-tools.php:168 +#: includes/views/advanced-tools.php:256 msgid "Renumber existing documents" msgstr "" -#: includes/views/advanced-tools.php:169 +#: includes/views/advanced-tools.php:257 msgid "This tool will renumber existing documents within the selected order date range, while keeping the assigned document date." msgstr "" #. translators: step-by-step instructions -#: includes/views/advanced-tools.php:174 +#: includes/views/advanced-tools.php:262 msgid "Set the next document number setting %s to the number you want to use for the first document. " msgstr "" -#: includes/views/advanced-tools.php:182 -#: includes/views/advanced-tools.php:230 +#: includes/views/advanced-tools.php:270 +#: includes/views/advanced-tools.php:318 msgid "Document type:" msgstr "" -#: includes/views/advanced-tools.php:185 -#: includes/views/advanced-tools.php:233 +#: includes/views/advanced-tools.php:273 +#: includes/views/advanced-tools.php:321 msgid "Select" msgstr "" -#: includes/views/advanced-tools.php:193 -#: includes/views/advanced-tools.php:242 +#: includes/views/advanced-tools.php:281 +#: includes/views/advanced-tools.php:330 msgid "Date type:" msgstr "" -#: includes/views/advanced-tools.php:205 -#: includes/views/advanced-tools.php:254 +#: includes/views/advanced-tools.php:293 +#: includes/views/advanced-tools.php:342 msgid "From:" msgstr "" -#: includes/views/advanced-tools.php:206 -#: includes/views/advanced-tools.php:210 -#: includes/views/advanced-tools.php:255 -#: includes/views/advanced-tools.php:259 +#: includes/views/advanced-tools.php:294 +#: includes/views/advanced-tools.php:298 +#: includes/views/advanced-tools.php:343 +#: includes/views/advanced-tools.php:347 msgid "(as: yyyy-mm-dd)" msgstr "" -#: includes/views/advanced-tools.php:209 -#: includes/views/advanced-tools.php:258 +#: includes/views/advanced-tools.php:297 +#: includes/views/advanced-tools.php:346 msgid "To:" msgstr "" -#: includes/views/advanced-tools.php:215 +#: includes/views/advanced-tools.php:303 msgid "Renumber documents" msgstr "" -#: includes/views/advanced-tools.php:225 +#: includes/views/advanced-tools.php:313 msgid "Delete existing documents" msgstr "" -#: includes/views/advanced-tools.php:226 +#: includes/views/advanced-tools.php:314 msgid "This tool will delete existing documents within the selected order date range." msgstr "" -#: includes/views/advanced-tools.php:237 +#: includes/views/advanced-tools.php:325 msgid "All" msgstr "" -#: includes/views/advanced-tools.php:264 +#: includes/views/advanced-tools.php:352 msgid "Delete documents" msgstr "" @@ -2253,47 +2398,72 @@ msgstr "" msgid "Show action buttons" msgstr "" -#: includes/views/upgrade-table.php:12 +#: includes/views/upgrade-table.php:11 msgid "Wait, there is more..." msgstr "" -#: includes/views/upgrade-table.php:14 +#: includes/views/upgrade-table.php:13 msgid "A quick overview of the features our PDF Invoices & Packing Slips extensions have to offer." msgstr "" -#: includes/views/upgrade-table.php:15 +#: includes/views/upgrade-table.php:14 msgid "If you have any questions feel free to send us an email at" msgstr "" -#: includes/views/upgrade-table.php:22 +#: includes/views/upgrade-table.php:21 msgid "Professional" msgstr "" -#: includes/views/upgrade-table.php:23 -msgid "Premium Templates" -msgstr "" - -#: includes/views/upgrade-table.php:24 +#: includes/views/upgrade-table.php:22 msgid "Bundle" msgstr "" -#: includes/views/upgrade-table.php:51 +#: includes/views/upgrade-table.php:49 +#: includes/views/upgrade-table.php:116 msgid "Currently installed" msgstr "" #. translators: learn more link -#: includes/views/upgrade-table.php:55 +#: includes/views/upgrade-table.php:53 msgid "License not yet activated: %s" msgstr "" -#: includes/views/upgrade-table.php:77 +#: includes/views/upgrade-table.php:75 msgid "Upgrade now" msgstr "" +#: includes/views/upgrade-table.php:98 +msgid "You might also like these plugins..." +msgstr "" + +#: includes/views/upgrade-table.php:101 +msgid "Wow! It looks like you own all of our recommendations. Check out our shop for even more plugins." +msgstr "" + +#: includes/views/upgrade-table.php:102 +msgid "Visit shop" +msgstr "" + +#: includes/views/upgrade-table.php:118 +msgid "Buy now" +msgstr "" + #: includes/wcpdf-functions.php:353 msgid "Error creating PDF, please contact the site owner." msgstr "" +#: includes/wcpdf-functions.php:971 +msgid "Product" +msgstr "" + +#: includes/wcpdf-functions.php:972 +msgid "Quantity" +msgstr "" + +#: includes/wcpdf-functions.php:973 +msgid "Price" +msgstr "" + #: languages/strings.php:3 msgid "VAT" msgstr "" @@ -2306,10 +2476,6 @@ msgstr "" msgid "Payment date" msgstr "" -#: languages/strings.php:6 -msgid "Payment Date:" -msgstr "" - #: languages/strings.php:7 msgid "Payment method" msgstr "" @@ -2330,84 +2496,6 @@ msgstr "" msgid "SKU" msgstr "" -#: languages/strings.php:14 -#: templates/Simple/invoice.php:40 -#: templates/Simple/packing-slip.php:53 -msgid "Billing Address:" -msgstr "" - -#: languages/strings.php:15 -#: templates/Simple/packing-slip.php:40 -msgid "Shipping Address:" -msgstr "" - -#: languages/strings.php:16 -#: templates/Simple/invoice.php:53 -msgid "Ship To:" -msgstr "" - -#: languages/strings.php:17 -#: templates/Simple/invoice.php:78 -#: templates/Simple/packing-slip.php:66 -msgid "Order Number:" -msgstr "" - -#: languages/strings.php:18 -#: templates/Simple/invoice.php:82 -#: templates/Simple/packing-slip.php:70 -msgid "Order Date:" -msgstr "" - -#: languages/strings.php:19 -#: templates/Simple/invoice.php:87 -msgid "Payment Method:" -msgstr "" - -#: languages/strings.php:20 -#: templates/Simple/packing-slip.php:75 -msgid "Shipping Method:" -msgstr "" - -#: languages/strings.php:21 -#: templates/Simple/invoice.php:102 -#: templates/Simple/packing-slip.php:90 -msgid "Product" -msgstr "" - -#: languages/strings.php:22 -#: templates/Simple/invoice.php:103 -#: templates/Simple/packing-slip.php:91 -msgid "Quantity" -msgstr "" - -#: languages/strings.php:23 -#: templates/Simple/invoice.php:104 -msgid "Price" -msgstr "" - -#: languages/strings.php:24 -#: templates/Simple/invoice.php:115 -#: templates/Simple/packing-slip.php:102 -msgid "SKU:" -msgstr "" - -#: languages/strings.php:25 -#: templates/Simple/invoice.php:116 -#: templates/Simple/packing-slip.php:103 -msgid "Weight:" -msgstr "" - -#: languages/strings.php:26 -#: templates/Simple/invoice.php:131 -msgid "Notes" -msgstr "" - -#: languages/strings.php:27 -#: templates/Simple/invoice.php:139 -#: templates/Simple/packing-slip.php:120 -msgid "Customer Notes" -msgstr "" - #: ubl/Settings/TaxesSettings.php:54 msgid "Tax Scheme" msgstr "" @@ -2690,54 +2778,54 @@ msgid "Services outside scope of tax" msgstr "" #. translators: 1. open anchor tag, 2. close anchor tag, 3. Woo version -#: woocommerce-pdf-invoices-packingslips.php:194 +#: woocommerce-pdf-invoices-packingslips.php:195 msgid "PDF Invoices & Packing Slips for WooCommerce requires %1$sWooCommerce%2$s version %3$s or higher to be installed & activated!" msgstr "" #. translators: PHP version -#: woocommerce-pdf-invoices-packingslips.php:239 +#: woocommerce-pdf-invoices-packingslips.php:240 msgid "PDF Invoices & Packing Slips for WooCommerce requires PHP %s or higher." msgstr "" #. translators: tags -#: woocommerce-pdf-invoices-packingslips.php:245 +#: woocommerce-pdf-invoices-packingslips.php:246 msgid "We strongly recommend to %1$supdate your PHP version%2$s." msgstr "" #. translators: directory path -#: woocommerce-pdf-invoices-packingslips.php:337 +#: woocommerce-pdf-invoices-packingslips.php:338 msgid "The PDF files in %s are not currently protected due to your site running on NGINX." msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:338 +#: woocommerce-pdf-invoices-packingslips.php:339 msgid "To protect them, you must click the button below." msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:339 +#: woocommerce-pdf-invoices-packingslips.php:340 msgid "Generate random temporary folder name" msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:396 +#: woocommerce-pdf-invoices-packingslips.php:397 msgid "When sending emails with MailPoet 3 and the active sending method is MailPoet Sending Service or Your web host / web server, MailPoet does not include the PDF Invoices & Packing Slips for WooCommerce attachments in the emails." msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:397 +#: woocommerce-pdf-invoices-packingslips.php:398 msgid "To fix this you should select The default WordPress sending method (default) on the Advanced tab." msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:398 +#: woocommerce-pdf-invoices-packingslips.php:399 msgid "Change MailPoet sending method to WordPress (default)" msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:435 +#: woocommerce-pdf-invoices-packingslips.php:436 msgid "PDF Invoices & Packing Slips for WooCommerce detected that your current site locale is right-to-left (RTL) which the current PDF engine does not support it. Please consider installing our mPDF extension that is compatible." msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:436 +#: woocommerce-pdf-invoices-packingslips.php:437 msgid "Download mPDF extension" msgstr "" #. translators: legacy addon name -#: woocommerce-pdf-invoices-packingslips.php:522 +#: woocommerce-pdf-invoices-packingslips.php:523 msgid "While updating the PDF Invoices & Packing Slips for WooCommerce plugin we've noticed our legacy %s add-on was active on your site. This functionality is now incorporated into the core plugin. We've deactivated the add-on for you, and you are free to uninstall it." msgstr ""
- get_type(), $this->order ); ?>

shipping_address(); ?>

get_type(), $this->order ); ?> @@ -50,7 +49,7 @@
show_billing_address() ) : ?> -

+

billing_address_title(); ?>

get_type(), $this->order ); ?>

billing_address(); ?>

get_type(), $this->order ); ?> @@ -63,16 +62,16 @@ get_type(), $this->order ); ?> - + - + get_shipping_method() ) : ?> - + @@ -85,22 +84,26 @@ get_type(), $this->order ); ?>
order_number_title(); ?> order_number(); ?>
order_date_title(); ?> order_date(); ?>
shipping_method_title(); ?> shipping_method(); ?>
+ - - + $column_title ) { + printf( '', $column_class, $column_title ); + } + ?> get_order_items() as $item_id => $item ) : ?> - + @@ -117,7 +120,7 @@ get_type(), $this->order ); ?>
get_shipping_notes() ) : ?> -

+

customer_notes_title() ?>

shipping_notes(); ?>
From fff1eca7080a5c753a884c7968ff718d66e5b000 Mon Sep 17 00:00:00 2001 From: Mohamad <136313810+MohamadNateqi@users.noreply.github.com> Date: Fri, 4 Oct 2024 10:58:29 +0330 Subject: [PATCH 05/10] Fix: path to generic document icon (#869) --- assets/images/generic_document.svg | 5 +++++ includes/class-wcpdf-admin.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 assets/images/generic_document.svg diff --git a/assets/images/generic_document.svg b/assets/images/generic_document.svg new file mode 100644 index 000000000..bf9272cd9 --- /dev/null +++ b/assets/images/generic_document.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/includes/class-wcpdf-admin.php b/includes/class-wcpdf-admin.php index 1a0cba4d0..8609cb8b6 100644 --- a/includes/class-wcpdf-admin.php +++ b/includes/class-wcpdf-admin.php @@ -218,7 +218,7 @@ public function add_listing_actions( $order ) { foreach ( $documents as $document ) { $document_title = $document->get_title(); $document_type = $document->get_type(); - $icon = ! empty( $document->icon ) ? $document->icon : WPO_WCPDF()->plugin_url() . "/assets/images/generic_document.png"; + $icon = ! empty( $document->icon ) ? $document->icon : WPO_WCPDF()->plugin_url() . '/assets/images/generic_document.svg'; if ( $document = wcpdf_get_document( $document_type, $order ) ) { foreach ( $document->output_formats as $output_format ) { From 8918c71e58533acd91375fa4904c630e4fd6b123 Mon Sep 17 00:00:00 2001 From: Alexandre Faustino Date: Fri, 4 Oct 2024 15:43:37 +0100 Subject: [PATCH 06/10] Tweak: add refund reason and Invoice number titles to the document methods abstract class (#875) --- .../abstract-wcpdf-order-document-methods.php | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/includes/documents/abstract-wcpdf-order-document-methods.php b/includes/documents/abstract-wcpdf-order-document-methods.php index 5910af0ff..27b4b6269 100644 --- a/includes/documents/abstract-wcpdf-order-document-methods.php +++ b/includes/documents/abstract-wcpdf-order-document-methods.php @@ -1313,6 +1313,51 @@ public function get_display_date_label( $date_string ) { } } + + /** + * Get the invoice number title, + * this allows other documents to use + * the invoice number title. Example: Receipt document + * + * @return string + */ + public function get_invoice_number_title() { + $title = __( 'Invoice Number:', 'woocommerce-pdf-invoices-packing-slips' ); + return apply_filters_deprecated( "wpo_wcpdf_invoice_number_title", array( $title, $this ), '3.8.7', 'wpo_wcpdf_document_number_title' ); + } + + /** + * Print the invoice number title, + * this allows other documents to use + * the invoice number title. Example: Receipt document + * + * @return void + */ + public function invoice_number_title() { + echo $this->get_invoice_number_title(); + } + + /** + * Get the title for the refund reason, + * used by the Credit Note document. + * (Later we can move this to the Pro extension.) + * + * @return string + */ + public function get_refund_reason_title(): string { + return apply_filters( 'wpo_wcpdf_refund_reason_title', __( 'Reason for refund:', 'woocommerce-pdf-invoices-packing-slips' ), $this ); + } + + /** + * Display the title for the refund reason, + * used by the Credit Note document. + * (Later we can move this to the Pro extension.) + * + * @return void + */ + public function refund_reason_title(): void { + echo $this->get_refund_reason_title(); + } } From 8bdda5b75cc166bd386e032df12ecf736e6b64d0 Mon Sep 17 00:00:00 2001 From: Mohamad <136313810+MohamadNateqi@users.noreply.github.com> Date: Fri, 4 Oct 2024 18:16:06 +0330 Subject: [PATCH 07/10] Fix: jQuery `change()` deprecated function usage (#877) --- assets/js/admin-script.js | 2 +- assets/js/admin-script.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/admin-script.js b/assets/js/admin-script.js index cfb065f00..6b518a481 100644 --- a/assets/js/admin-script.js +++ b/assets/js/admin-script.js @@ -105,7 +105,7 @@ jQuery( function( $ ) { 'delay': 200 } ); - $( '#wpo-wcpdf-preview-wrapper #due_date' ).change( function() { + $( '#wpo-wcpdf-preview-wrapper #due_date' ).on( 'change', function() { const $due_date_checkbox = $( '#wpo-wcpdf-preview-wrapper #due_date' ); const $due_date_days_input = $( '#wpo-wcpdf-preview-wrapper #due_date_days' ); diff --git a/assets/js/admin-script.min.js b/assets/js/admin-script.min.js index 598b07241..4887d2b0c 100644 --- a/assets/js/admin-script.min.js +++ b/assets/js/admin-script.min.js @@ -1 +1 @@ -jQuery(function(a){function b(){m=w.val(),n=x.val(),o=y.val(),p=z.val(),q=A.serialize()}function c(){w.val("").trigger("change")}function d(){!1==u.attr("data-preview-states-lock")&&(1200>=a(this).width()&&(1200=t||a(this).width()==t)&&("full"==u.attr("data-preview-state")?(u.find(".preview-document").show(),u.find(".sidebar").hide(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),u.addClass("static")):"closed"==u.attr("data-preview-state")&&a(this).width()!==t?(u.find(".preview-document").hide(),u.find(".sidebar").show(),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-states",3),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state",""),u.removeClass("static")):(u.find(".preview-document, .sidebar").show(),u.find(".slide-left, .slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state",""),u.removeClass("static")))),t=a(this).width()}function e(a){window.scrollTo(0,0);let b=a;setTimeout(function(){b.addClass("static")},300)}function f(b,c){g();let d=a(b.target);if(!i(d.attr("name"))){if(d.hasClass("remove-requirement")||"disable_for"==d.attr("id"))return;if(-1!==jQuery.inArray(b.type,["keyup","paste"])){if(d.is("input[type=\"checkbox\"], select"))return;c="keyup"==b.type?1e3:0}h(c)}}function g(b){a(".preview-data-wrapper .save-settings p").css("margin-right","0")}function h(a){a="number"==typeof a?a:0,b(),clearTimeout(r),r=setTimeout(function(){j()},a)}function i(b){let c=!1;if(!b)return c;let d=b.includes("[")?b.match(/\[(.*?)\]/)[1]:b;return-1!==a.inArray(d,wpo_wcpdf_admin.preview_excluded_settings)&&(c=!0),c}function j(){let b=wpo_wcpdf_admin.pdfjs_worker,c="preview-canvas",d={action:"wpo_wcpdf_preview",security:p,order_id:m,document_type:n,output_format:o,data:q};v.children(".notice").remove(),v.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),B=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:d,beforeSend:function(a,b){null!=B&&B.abort()},success:function(d,e,f){if(d.data.error)a("#"+c).remove(),v.append("

"+d.data.error+"

");else if(d.data.preview_data&&d.data.output_format)switch(a("#"+c).remove(),d.data.output_format){default:case"pdf":v.append(""),k(b,c,d.data.preview_data);break;case"ubl":let a=d.data.preview_data,e=a.replace(/&/g,"&").replace(//g,">").replace(/ /g," ").replace(/\n/g,"
");v.html("
"+e+"
")}v.unblock()},error:function(b,d,e){if("abort"!=d){let d=b.status+": "+b.statusText;a("#"+c).remove(),v.append("

"+d+"

"),v.unblock()}}})}function k(a,b,c){c=window.atob(c),pdfjsLib.GlobalWorkerOptions.workerSrc=a;let d=pdfjsLib.getDocument({data:c});d.promise.then(function(a){let c=1;a.getPage(1).then(function(a){let c=2,d=a.getViewport({scale:2}),e=document.getElementById(b),f=e.getContext("2d");e.height=d.height,e.width=d.width;let g={canvasContext:f,viewport:d},h=a.render(g);h.promise.then(function(){})})},function(a){console.error(a)})}function l(b){let c=b.closest(".preview-data").find("#preview-order-search-results"),d=b.val(),e=b.data("nonce"),f="wpo_wcpdf_preview_order_search",g={security:e,action:f,search:d,document_type:n};c.parent().find("img.preview-order-search-clear").hide(),c.children(".error").remove(),c.children("a").remove(),c.hide(),a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:g,success:function(d){d.data&&(d.data.error?(c.append(""+d.data.error+""),c.show()):a.each(d.data,function(a,b){let d="#"+b.order_number+" - "+b.billing_first_name+" "+b.billing_last_name;0"+b.date_created+""+b.total+"";c.append(d+e),c.show()})),b.removeClass("ajax-waiting"),b.closest("div").find("img.preview-order-search-clear").show()}})}a(".wcpdf-extensions .more").hide(),a(".wcpdf-extensions > li").on("click",function(b){a(this).toggleClass("expanded"),a(this).find(".more").slideToggle()}),a(".edit-next-number").on("click",function(b){a(this).hide(),a(this).siblings("input").prop("disabled",!1),a(this).siblings(".save-next-number.button").show()}),a(".save-next-number").on("click",function(b){$input=a(this).siblings("input"),$input.addClass("ajax-waiting");let c=$input.val();if(0 h2").on("click",function(){a(this).parent().find("ul").toggleClass("active")}),a.each(wpo_wcpdf_admin.pointers,function(b,c){a(c.target).pointer({content:c.content,position:{edge:c.position.edge,align:c.position.align},pointerClass:c.pointer_class,pointerWidth:c.pointer_width,close:function(){jQuery.post(wpo_wcpdf_admin.ajaxurl,{pointer:b,action:"dismiss-wp-pointer"})}}),-1===a.inArray(b,wpo_wcpdf_admin.dismissed_pointers.split(","))&&a(c.target).pointer("open")}),a(".woocommerce-help-tip").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200}),a("#wpo-wcpdf-preview-wrapper #due_date").change(function(){const b=a("#wpo-wcpdf-preview-wrapper #due_date"),c=a("#wpo-wcpdf-preview-wrapper #due_date_days");b.is(":checked")?c.prop("disabled",!1):c.prop("disabled",!0)}).trigger("change");let m,n,o,p,q,r,s,t,u=a("#wpo-wcpdf-preview-wrapper"),v=a("#wpo-wcpdf-preview-wrapper .preview"),w=a("#wpo-wcpdf-preview-wrapper input[name=\"order_id\"]"),x=a("#wpo-wcpdf-preview-wrapper input[name=\"document_type\"]"),y=a("#wpo-wcpdf-preview-wrapper input[name=\"output_format\"]"),z=a("#wpo-wcpdf-preview-wrapper input[name=\"nonce\"]"),A=a("#wpo-wcpdf-settings"),B=null;(function a(){x.val(x.data("default")).trigger("change")})(),c(),b(),t=a(window).width(),d(),a(window).on("resize",d),a(".slide-left").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"closed"==b?(u.find(".preview-document").show(),u.find(".slide-right").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","closed")):(u.find(".slide-left").hide(),u.find(".sidebar").delay(300).hide(0),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),e(u)):(u.find(".preview-document").show(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","closed"),e(u))}),a(".slide-right").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"full"==b?(u.find(".slide-left").delay(400).show(0),u.find(".sidebar").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","full")):(u.find(".preview-document").hide(300),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","sidebar")):(u.find(".preview-document").hide(300),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","full")),u.removeClass("static")}),a(".preview-document .preview-data p").on("click",function(){let b=a(this).closest(".preview-data");b.siblings(".preview-data").find("ul").removeClass("active"),b.find("ul").toggleClass("active")}),a(".preview-document .preview-data ul > li").on("click",function(){let b=a(this).closest(".preview-data");b.find("ul").toggleClass("active"),a(this).hasClass("order-search")?(b.find("p.last-order").hide(),b.find("input[name=\"preview-order-search\"]").addClass("active"),b.find("p.order-search").show().find(".order-search-label").text(a(this).text())):(b.find("p.last-order").show(),b.find("p.order-search").hide(),b.find("input[name=\"preview-order-search\"]").removeClass("active").val(""),b.find("#preview-order-search-results").hide(),b.find("img.preview-order-search-clear").hide(),c(),h())}),h(),a(document).on("wpo-wcpdf-settings-changed",function(a,b){g(),h(b)}),a(document).on("wpo-wcpdf-refresh-preview wpo_wcpdf_refresh_preview",function(a,b){h(b)}),a(document).on("click","#preview-order-search-results a",function(b){b.preventDefault(),a(".preview-document .order-search-label").text("#"+a(this).data("order_id")),w.val(a(this).data("order_id")).trigger("change"),a(this).closest("div").hide(),a(this).closest("div").children("a").remove(),h()}),a(document).on("keyup paste","#wpo-wcpdf-settings input, #wpo-wcpdf-settings textarea",f),a(document).on("change","#wpo-wcpdf-settings input[type=\"checkbox\"], #wpo-wcpdf-settings input[type=\"radio\"], #wpo-wcpdf-settings select",function(a){a.isTrigger||f(a)}),a(document).on("select2:select select2:unselect","#wpo-wcpdf-settings select.wc-enhanced-select",f),a(document.body).on("wpo-wcpdf-media-upload-setting-updated",f),a(document).on("click",".wpo_remove_image_button, #wpo-wcpdf-settings .remove-requirement",f),a(document.body).on("click",".preview-data-wrapper .save-settings p input",function(b){a("#wpo-wcpdf-settings input#submit").trigger("click")}),a(document).on("click","img.preview-order-search-clear",function(b){b.preventDefault(),a(this).closest("div").find("input#preview-order-search").val(""),a(this).closest(".preview-data").find("#preview-order-search-results").children("a").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").children(".error").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").hide(),a(this).hide()}),a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list li").on("click",function(){let b=a(this).closest("ul").data("input-name"),c=a("#wpo-wcpdf-preview-wrapper :input[name="+b+"]");c.val(a(this).data("value")).trigger("change")}),x.on("change",function(){let b=a(this).val();if(b.length){let c=a(this).attr("name"),d=a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list[data-input-name="+c+"]"),e=d.find("li[data-value="+b+"]");d.parent().find(".current-label").text(e.text()),h()}}).trigger("change"),w.on("change",function(){h()}).trigger("change"),a("#preview-order-search").on("keyup paste",function(c){let d=a(this);d.addClass("ajax-waiting");let e="keyup"==c.type?1e3:0;b(),clearTimeout(s),s=setTimeout(function(){l(d)},e)})}); \ No newline at end of file +jQuery(function(a){function b(){m=w.val(),n=x.val(),o=y.val(),p=z.val(),q=A.serialize()}function c(){w.val("").trigger("change")}function d(){!1==u.attr("data-preview-states-lock")&&(1200>=a(this).width()&&(1200=t||a(this).width()==t)&&("full"==u.attr("data-preview-state")?(u.find(".preview-document").show(),u.find(".sidebar").hide(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),u.addClass("static")):"closed"==u.attr("data-preview-state")&&a(this).width()!==t?(u.find(".preview-document").hide(),u.find(".sidebar").show(),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-states",3),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state",""),u.removeClass("static")):(u.find(".preview-document, .sidebar").show(),u.find(".slide-left, .slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state",""),u.removeClass("static")))),t=a(this).width()}function e(a){window.scrollTo(0,0);let b=a;setTimeout(function(){b.addClass("static")},300)}function f(b,c){g();let d=a(b.target);if(!i(d.attr("name"))){if(d.hasClass("remove-requirement")||"disable_for"==d.attr("id"))return;if(-1!==jQuery.inArray(b.type,["keyup","paste"])){if(d.is("input[type=\"checkbox\"], select"))return;c="keyup"==b.type?1e3:0}h(c)}}function g(b){a(".preview-data-wrapper .save-settings p").css("margin-right","0")}function h(a){a="number"==typeof a?a:0,b(),clearTimeout(r),r=setTimeout(function(){j()},a)}function i(b){let c=!1;if(!b)return c;let d=b.includes("[")?b.match(/\[(.*?)\]/)[1]:b;return-1!==a.inArray(d,wpo_wcpdf_admin.preview_excluded_settings)&&(c=!0),c}function j(){let b=wpo_wcpdf_admin.pdfjs_worker,c="preview-canvas",d={action:"wpo_wcpdf_preview",security:p,order_id:m,document_type:n,output_format:o,data:q};v.children(".notice").remove(),v.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),B=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:d,beforeSend:function(a,b){null!=B&&B.abort()},success:function(d,e,f){if(d.data.error)a("#"+c).remove(),v.append("

"+d.data.error+"

");else if(d.data.preview_data&&d.data.output_format)switch(a("#"+c).remove(),d.data.output_format){default:case"pdf":v.append(""),k(b,c,d.data.preview_data);break;case"ubl":let a=d.data.preview_data,e=a.replace(/&/g,"&").replace(//g,">").replace(/ /g," ").replace(/\n/g,"
");v.html("
"+e+"
")}v.unblock()},error:function(b,d,e){if("abort"!=d){let d=b.status+": "+b.statusText;a("#"+c).remove(),v.append("

"+d+"

"),v.unblock()}}})}function k(a,b,c){c=window.atob(c),pdfjsLib.GlobalWorkerOptions.workerSrc=a;let d=pdfjsLib.getDocument({data:c});d.promise.then(function(a){let c=1;a.getPage(1).then(function(a){let c=2,d=a.getViewport({scale:2}),e=document.getElementById(b),f=e.getContext("2d");e.height=d.height,e.width=d.width;let g={canvasContext:f,viewport:d},h=a.render(g);h.promise.then(function(){})})},function(a){console.error(a)})}function l(b){let c=b.closest(".preview-data").find("#preview-order-search-results"),d=b.val(),e=b.data("nonce"),f="wpo_wcpdf_preview_order_search",g={security:e,action:f,search:d,document_type:n};c.parent().find("img.preview-order-search-clear").hide(),c.children(".error").remove(),c.children("a").remove(),c.hide(),a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:g,success:function(d){d.data&&(d.data.error?(c.append(""+d.data.error+""),c.show()):a.each(d.data,function(a,b){let d="#"+b.order_number+" - "+b.billing_first_name+" "+b.billing_last_name;0"+b.date_created+""+b.total+"";c.append(d+e),c.show()})),b.removeClass("ajax-waiting"),b.closest("div").find("img.preview-order-search-clear").show()}})}a(".wcpdf-extensions .more").hide(),a(".wcpdf-extensions > li").on("click",function(b){a(this).toggleClass("expanded"),a(this).find(".more").slideToggle()}),a(".edit-next-number").on("click",function(b){a(this).hide(),a(this).siblings("input").prop("disabled",!1),a(this).siblings(".save-next-number.button").show()}),a(".save-next-number").on("click",function(b){$input=a(this).siblings("input"),$input.addClass("ajax-waiting");let c=$input.val();if(0 h2").on("click",function(){a(this).parent().find("ul").toggleClass("active")}),a.each(wpo_wcpdf_admin.pointers,function(b,c){a(c.target).pointer({content:c.content,position:{edge:c.position.edge,align:c.position.align},pointerClass:c.pointer_class,pointerWidth:c.pointer_width,close:function(){jQuery.post(wpo_wcpdf_admin.ajaxurl,{pointer:b,action:"dismiss-wp-pointer"})}}),-1===a.inArray(b,wpo_wcpdf_admin.dismissed_pointers.split(","))&&a(c.target).pointer("open")}),a(".woocommerce-help-tip").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200}),a("#wpo-wcpdf-preview-wrapper #due_date").on("change",function(){const b=a("#wpo-wcpdf-preview-wrapper #due_date"),c=a("#wpo-wcpdf-preview-wrapper #due_date_days");b.is(":checked")?c.prop("disabled",!1):c.prop("disabled",!0)}).trigger("change");let m,n,o,p,q,r,s,t,u=a("#wpo-wcpdf-preview-wrapper"),v=a("#wpo-wcpdf-preview-wrapper .preview"),w=a("#wpo-wcpdf-preview-wrapper input[name=\"order_id\"]"),x=a("#wpo-wcpdf-preview-wrapper input[name=\"document_type\"]"),y=a("#wpo-wcpdf-preview-wrapper input[name=\"output_format\"]"),z=a("#wpo-wcpdf-preview-wrapper input[name=\"nonce\"]"),A=a("#wpo-wcpdf-settings"),B=null;(function a(){x.val(x.data("default")).trigger("change")})(),c(),b(),t=a(window).width(),d(),a(window).on("resize",d),a(".slide-left").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"closed"==b?(u.find(".preview-document").show(),u.find(".slide-right").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","closed")):(u.find(".slide-left").hide(),u.find(".sidebar").delay(300).hide(0),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),e(u)):(u.find(".preview-document").show(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","closed"),e(u))}),a(".slide-right").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"full"==b?(u.find(".slide-left").delay(400).show(0),u.find(".sidebar").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","full")):(u.find(".preview-document").hide(300),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","sidebar")):(u.find(".preview-document").hide(300),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","full")),u.removeClass("static")}),a(".preview-document .preview-data p").on("click",function(){let b=a(this).closest(".preview-data");b.siblings(".preview-data").find("ul").removeClass("active"),b.find("ul").toggleClass("active")}),a(".preview-document .preview-data ul > li").on("click",function(){let b=a(this).closest(".preview-data");b.find("ul").toggleClass("active"),a(this).hasClass("order-search")?(b.find("p.last-order").hide(),b.find("input[name=\"preview-order-search\"]").addClass("active"),b.find("p.order-search").show().find(".order-search-label").text(a(this).text())):(b.find("p.last-order").show(),b.find("p.order-search").hide(),b.find("input[name=\"preview-order-search\"]").removeClass("active").val(""),b.find("#preview-order-search-results").hide(),b.find("img.preview-order-search-clear").hide(),c(),h())}),h(),a(document).on("wpo-wcpdf-settings-changed",function(a,b){g(),h(b)}),a(document).on("wpo-wcpdf-refresh-preview wpo_wcpdf_refresh_preview",function(a,b){h(b)}),a(document).on("click","#preview-order-search-results a",function(b){b.preventDefault(),a(".preview-document .order-search-label").text("#"+a(this).data("order_id")),w.val(a(this).data("order_id")).trigger("change"),a(this).closest("div").hide(),a(this).closest("div").children("a").remove(),h()}),a(document).on("keyup paste","#wpo-wcpdf-settings input, #wpo-wcpdf-settings textarea",f),a(document).on("change","#wpo-wcpdf-settings input[type=\"checkbox\"], #wpo-wcpdf-settings input[type=\"radio\"], #wpo-wcpdf-settings select",function(a){a.isTrigger||f(a)}),a(document).on("select2:select select2:unselect","#wpo-wcpdf-settings select.wc-enhanced-select",f),a(document.body).on("wpo-wcpdf-media-upload-setting-updated",f),a(document).on("click",".wpo_remove_image_button, #wpo-wcpdf-settings .remove-requirement",f),a(document.body).on("click",".preview-data-wrapper .save-settings p input",function(b){a("#wpo-wcpdf-settings input#submit").trigger("click")}),a(document).on("click","img.preview-order-search-clear",function(b){b.preventDefault(),a(this).closest("div").find("input#preview-order-search").val(""),a(this).closest(".preview-data").find("#preview-order-search-results").children("a").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").children(".error").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").hide(),a(this).hide()}),a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list li").on("click",function(){let b=a(this).closest("ul").data("input-name"),c=a("#wpo-wcpdf-preview-wrapper :input[name="+b+"]");c.val(a(this).data("value")).trigger("change")}),x.on("change",function(){let b=a(this).val();if(b.length){let c=a(this).attr("name"),d=a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list[data-input-name="+c+"]"),e=d.find("li[data-value="+b+"]");d.parent().find(".current-label").text(e.text()),h()}}).trigger("change"),w.on("change",function(){h()}).trigger("change"),a("#preview-order-search").on("keyup paste",function(c){let d=a(this);d.addClass("ajax-waiting");let e="keyup"==c.type?1e3:0;b(),clearTimeout(s),s=setTimeout(function(){l(d)},e)})}); \ No newline at end of file From fc29a119bb6ff4f5bb89a21787e2a9598e46e902 Mon Sep 17 00:00:00 2001 From: Alexandre Faustino Date: Mon, 7 Oct 2024 09:35:19 +0100 Subject: [PATCH 08/10] New: adds full compatibility with mPDF to the Simple Template (#810) --- templates/Simple/invoice.php | 53 ++++++++++------- templates/Simple/packing-slip.php | 30 ++++++---- templates/Simple/style.css | 94 ++++++++++++++++++++----------- 3 files changed, 112 insertions(+), 65 deletions(-) diff --git a/templates/Simple/invoice.php b/templates/Simple/invoice.php index dbcaa6de4..297342298 100644 --- a/templates/Simple/invoice.php +++ b/templates/Simple/invoice.php @@ -105,7 +105,7 @@
- $column_title ) { printf( '', $column_class, $column_title ); } @@ -116,13 +116,21 @@ get_order_items() as $item_id => $item ) : ?> @@ -130,27 +138,30 @@ - +
%s
get_type(), $item, $this->order ); ?>
-
-
+
sku_title(); ?>
+
weight_title(); ?>
get_type(), $item, $this->order ); ?>
%s
- +

get_type(), $item, $this->order ); ?> - -
-
sku_title(); ?>
-
weight_title(); ?>
-
+
+ +

sku_title(); ?>

+ + +

weight_title(); ?>

+ + + + + + +
get_type(), $item, $this->order ); ?>
+ + + - - - +
+ get_type(), $this->order ); ?> -
- get_document_notes() ) : ?> + get_document_notes() ) : ?> +

notes_title(); ?>

document_notes(); ?> - -
+
+ get_type(), $this->order ); ?> get_type(), $this->order ); ?> -
- get_shipping_notes() ) : ?> + get_shipping_notes() ) : ?> +

customer_notes_title(); ?>

shipping_notes(); ?> - -
+
+ get_type(), $this->order ); ?>
+ get_woocommerce_totals() as $key => $total ) : ?> @@ -163,13 +174,13 @@
-
- get_type(), $this->order ); ?> +
+ get_footer() ) : ?>
%s
- +

get_type(), $item, $this->order ); ?> - -
-
sku_title(); ?>
-
weight_title(); ?>
-
+
+ +

sku_title(); ?>

+ + +

weight_title(); ?>

+ + + + + + +
get_type(), $item, $this->order ); ?>