From e57561b82cfdfb02cfced70a39783614995da11c Mon Sep 17 00:00:00 2001 From: Mohamad <136313810+MohamadNateqi@users.noreply.github.com> Date: Tue, 9 Jul 2024 12:03:19 +0330 Subject: [PATCH 01/39] Fix: make Simple template total labels translatable (#831) --- .../abstract-wcpdf-order-document-methods.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/includes/documents/abstract-wcpdf-order-document-methods.php b/includes/documents/abstract-wcpdf-order-document-methods.php index acd5e8bf8..5910af0ff 100644 --- a/includes/documents/abstract-wcpdf-order-document-methods.php +++ b/includes/documents/abstract-wcpdf-order-document-methods.php @@ -916,10 +916,20 @@ public function get_woocommerce_totals() { foreach ( $totals as $key => $total ) { $label = $total['label']; $colon = strrpos( $label, ':' ); - if( $colon !== false ) { + + if ( false !== $colon ) { $label = substr_replace( $label, '', $colon, 1 ); } - $totals[$key]['label'] = $label; + + $textdomain = 'woocommerce-pdf-invoices-packing-slips'; + + if ( ! empty( $label ) ) { + if ( function_exists( 'WPO_WCPDF_Pro' ) && isset( \WPO_WCPDF_Pro()->multilingual_full ) && is_callable( array( \WPO_WCPDF_Pro()->multilingual_full, 'maybe_get_string_translation' ) ) ) { + $totals[ $key ]['label'] = \WPO_WCPDF_Pro()->multilingual_full->maybe_get_string_translation( $label, $textdomain ); + } else { + $totals[ $key ]['label'] = __( $label, $textdomain ); + } + } } // Fix order_total for refunded orders From 93ec584d4bab99d60878300f8dba1bba15a5b4d7 Mon Sep 17 00:00:00 2001 From: Alexandre Faustino Date: Thu, 11 Jul 2024 12:13:29 +0100 Subject: [PATCH 02/39] New: includes ImageMagick in the Advanced Status (#825) --- includes/views/advanced-status.php | 35 +++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/includes/views/advanced-status.php b/includes/views/advanced-status.php index bf59139b1..3302446ab 100644 --- a/includes/views/advanced-status.php +++ b/includes/views/advanced-status.php @@ -5,8 +5,10 @@ $memory_limit = function_exists( 'wc_let_to_num' ) ? wc_let_to_num( WP_MEMORY_LIMIT ) : woocommerce_let_to_num( WP_MEMORY_LIMIT ); $php_mem_limit = function_exists( 'memory_get_usage' ) ? @ini_get( 'memory_limit' ) : '-'; +$gmagick = extension_loaded( 'gmagick' ); +$imagick = extension_loaded( 'imagick' ); -$server_configs = apply_filters( 'wpo_wcpdf_server_configs' , array( +$server_configs = array( 'PHP version' => array( 'required' => __( '7.2+ (7.4 or higher recommended)', 'woocommerce-pdf-invoices-packing-slips' ), 'value' => PHP_VERSION, @@ -55,8 +57,8 @@ ), 'GMagick or IMagick' => array( 'required' => __( 'Better with transparent PNG images', 'woocommerce-pdf-invoices-packing-slips' ), - 'value' => null, - 'result' => extension_loaded( 'gmagick' ) || extension_loaded( 'imagick' ), + 'value' => $imagick ? 'IMagick ' . phpversion( 'imagick' ) : ( $gmagick ? 'GMagick ' . phpversion( 'gmagick' ) : null ), + 'result' => $gmagick || $imagick, 'fallback' => __( 'Recommended for better performances', 'woocommerce-pdf-invoices-packing-slips' ), ), 'glob()' => array( @@ -83,7 +85,23 @@ 'result' => function_exists( 'base64_decode' ), 'fallback' => __( 'base64_decode disabled', 'woocommerce-pdf-invoices-packing-slips' ), ), -) ); +); + +if ( $imagick ) { + $gmagick_imagick_position = array_search( 'GMagick or IMagick', array_keys( $server_configs ) ) + 1; + $image_magick_config = array( + 'ImageMagick' => array( + 'required' => __( 'Required for IMagick', 'woocommerce-pdf-invoices-packing-slips' ), + 'value' => ( $imagick && class_exists( '\\Imagick' ) ) ? esc_attr( \Imagick::getVersion()['versionString'] ) : null, + 'result' => $imagick, + 'fallback' => __( 'ImageMagick library, integrated via the IMagick PHP extension for advanced image processing capabilities', 'woocommerce-pdf-invoices-packing-slips' ), + ), + ); + + $server_configs = array_slice( $server_configs, 0, $gmagick_imagick_position, true ) + $image_magick_config + array_slice( $server_configs, $gmagick_imagick_position, null, true ); +} + +$server_configs = apply_filters( 'wpo_wcpdf_server_configs', $server_configs ); if ( ( $xc = extension_loaded( 'xcache' ) ) || ( $apc = extension_loaded( 'apc' ) ) || ( $zop = extension_loaded( 'Zend OPcache' ) ) || ( $op = extension_loaded( 'opcache' ) ) ) { $server_configs['opcache']['result'] = true; @@ -95,15 +113,11 @@ ) ); } -if ( ( $gm = extension_loaded( 'gmagick' ) ) || ( $im = extension_loaded( 'imagick' ) ) ) { - $server_configs['GMagick or IMagick']['value'] = ( $im ? 'IMagick '.phpversion( 'imagick' ) : 'GMagick '.phpversion( 'gmagick' ) ); -} if ( ! $server_configs['PHP version']['result'] ) { /* translators: tags */ $server_configs['PHP version']['required'] .= '
' . sprintf( __( 'Download %1$sthis addon%2$s to enable backwards compatibility.', 'woocommerce-pdf-invoices-packing-slips' ), '
', '' ); } - ?> @@ -147,9 +161,10 @@ if ( ! $server_config['result'] ) { if ( isset( $server_config['fallback'] ) ) { printf( '
%s. %s
', esc_html__( 'No', 'woocommerce-pdf-invoices-packing-slips' ), esc_html( $server_config['fallback'] ) ); - } - if ( isset( $server_config['failure'] ) ) { + } elseif ( isset( $server_config['failure'] ) ) { printf( '
%s
', wp_kses_post( $server_config['failure'] ) ); + } else { + printf( '
%s
', esc_html__( 'No', 'woocommerce-pdf-invoices-packing-slips' ) ); } } ?> From 1f43d90a6ef06230d29cd71afb745018d88d9804 Mon Sep 17 00:00:00 2001 From: Alexandre Faustino Date: Mon, 15 Jul 2024 09:50:14 +0100 Subject: [PATCH 03/39] Tweak: improves header logo load. New: advanced embed images setting (#826) --- includes/class-wcpdf-settings.php | 2 + .../abstract-wcpdf-order-document.php | 66 +++--- includes/makers/class-pdf-maker.php | 1 + .../settings/class-wcpdf-settings-debug.php | 12 + includes/views/advanced-status.php | 8 +- includes/wcpdf-functions.php | 212 ++++++++++++++++++ woocommerce-pdf-invoices-packingslips.php | 6 +- 7 files changed, 267 insertions(+), 40 deletions(-) diff --git a/includes/class-wcpdf-settings.php b/includes/class-wcpdf-settings.php index 07a6a1e5f..4a41de40d 100644 --- a/includes/class-wcpdf-settings.php +++ b/includes/class-wcpdf-settings.php @@ -362,6 +362,8 @@ public function ajax_preview() { } } catch ( \Throwable $th ) { + wcpdf_log_error( 'Error trying to generate document: ' . $th->getTraceAsString(), 'critical' ); + wp_send_json_error( array( 'error' => sprintf( diff --git a/includes/documents/abstract-wcpdf-order-document.php b/includes/documents/abstract-wcpdf-order-document.php index cc62e7110..f949a1c77 100644 --- a/includes/documents/abstract-wcpdf-order-document.php +++ b/includes/documents/abstract-wcpdf-order-document.php @@ -811,26 +811,23 @@ public function template_styles() { } public function has_header_logo() { - return !empty( $this->settings['header_logo'] ); + return ! empty( $this->settings['header_logo'] ); } /** * Return logo id * - * @return int|bool + * @return int */ - public function get_header_logo_id() { - $header_logo_id = false; + public function get_header_logo_id(): int { + $header_logo_id = 0; if ( ! empty( $this->settings['header_logo'] ) ) { - $header_logo_id = absint( $this->get_settings_text( 'header_logo', '', false ) ); - - if ( 0 === $header_logo_id ) { - $header_logo_id = false; - } + $attachment_id = $this->get_settings_text( 'header_logo', $header_logo_id, false ); + $header_logo_id = is_numeric( $attachment_id ) ? absint( $attachment_id ) : 0; } - return apply_filters( 'wpo_wcpdf_header_logo_id', absint( $header_logo_id ), $this ); + return apply_filters( 'wpo_wcpdf_header_logo_id', $header_logo_id, $this ); } /** @@ -843,44 +840,41 @@ public function get_header_logo_height() { } /** - * Show logo html + * Show logo HTML + * + * @return void */ - public function header_logo() { + public function header_logo(): void { $attachment_id = $this->get_header_logo_id(); - if ( $attachment_id ) { + if ( $attachment_id > 0 ) { $company = $this->get_shop_name(); - $attachment = wp_get_attachment_image_src( $attachment_id, 'full', false ); - $attachment_path = get_attached_file( $attachment_id ); + $attachment_src = wp_get_attachment_image_url( $attachment_id, 'full' ); + $attachment_path = wp_normalize_path( realpath( get_attached_file( $attachment_id ) ) ); - if ( empty( $attachment ) || empty( $attachment_path ) ) { + if ( empty( $attachment_src ) || empty( $attachment_path ) ) { + wcpdf_log_error( 'Header logo file not found.', 'critical' ); return; } - $attachment_src = $attachment[0]; - $attachment_width = $attachment[1]; - $attachment_height = $attachment[2]; + $src = apply_filters( 'wpo_wcpdf_use_path', true ) ? $attachment_path : $attachment_src; + + // fix URLs using path + if ( ! apply_filters( 'wpo_wcpdf_use_path', true ) && false !== strpos( $src, 'http' ) && false !== strpos( $src, WP_CONTENT_DIR ) ) { + $path = preg_replace( '/^https?:\/\//', '', $src ); // removes http(s):// + $src = str_replace( trailingslashit( WP_CONTENT_DIR ), trailingslashit( WP_CONTENT_URL ), $path ); // replaces path with URL + } - if ( apply_filters( 'wpo_wcpdf_use_path', true ) && file_exists( $attachment_path ) ) { - $src = $attachment_path; - } else { - $head = wp_remote_head( $attachment_src, [ 'sslverify' => false ] ); - if ( is_wp_error( $head ) ) { - $errors = $head->get_error_messages(); - foreach ( $errors as $error ) { - wcpdf_log_error( $error, 'critical' ); - } - return; - } elseif ( isset( $head['response']['code'] ) && $head['response']['code'] === 200 ) { - $src = $attachment_src; - } else { - return; - } + if ( ! wpo_wcpdf_is_file_readable( $src ) ) { + wcpdf_log_error( 'Header logo file not readable: ' . $src, 'critical' ); + return; } - $img_element = sprintf( '%2$s', esc_attr( $src ), esc_attr( $company ) ); + $image_src = isset( WPO_WCPDF()->settings->debug_settings['embed_images'] ) ? wpo_wcpdf_get_image_src_in_base64( $src ) : $src; + $img_element = sprintf( '%2$s', esc_attr( $image_src ), esc_attr( $company ) ); + + echo apply_filters( 'wpo_wcpdf_header_logo_img_element', $img_element, $attachment_id, $this ); - echo apply_filters( 'wpo_wcpdf_header_logo_img_element', $img_element, $attachment, $this ); } } diff --git a/includes/makers/class-pdf-maker.php b/includes/makers/class-pdf-maker.php index 99b4e5d4c..e6515bb38 100644 --- a/includes/makers/class-pdf-maker.php +++ b/includes/makers/class-pdf-maker.php @@ -42,6 +42,7 @@ public function output() { 'logOutputFile' => WPO_WCPDF()->main->get_tmp_path( 'dompdf' ) . "/log.htm", 'defaultFont' => 'dejavu sans', 'isRemoteEnabled' => true, + 'isHtml5ParserEnabled' => true, 'isFontSubsettingEnabled' => $this->settings['font_subsetting'], ) ) ); diff --git a/includes/settings/class-wcpdf-settings-debug.php b/includes/settings/class-wcpdf-settings-debug.php index a7d5de467..fe7d760af 100644 --- a/includes/settings/class-wcpdf-settings-debug.php +++ b/includes/settings/class-wcpdf-settings-debug.php @@ -821,6 +821,18 @@ public function init_settings() { __( 'You can also add &output=html to the URL to apply this on a per-order basis.', 'woocommerce-pdf-invoices-packing-slips' ), ) ), + array( + 'type' => 'setting', + 'id' => 'embed_images', + 'title' => __( 'Embed Images', 'woocommerce-pdf-invoices-packing-slips' ), + 'callback' => 'checkbox', + 'section' => 'debug_settings', + 'args' => array( + 'option_name' => $option_name, + 'id' => 'embed_images', + 'description' => __( '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.', 'woocommerce-pdf-invoices-packing-slips' ), + ) + ), array( 'type' => 'setting', 'id' => 'log_to_order_notes', diff --git a/includes/views/advanced-status.php b/includes/views/advanced-status.php index 3302446ab..9a449fcf6 100644 --- a/includes/views/advanced-status.php +++ b/includes/views/advanced-status.php @@ -79,8 +79,14 @@ 'result' => ini_get( 'allow_url_fopen' ), 'fallback' => __( 'allow_url_fopen disabled', 'woocommerce-pdf-invoices-packing-slips' ), ), + 'fileinfo' => array ( + 'required' => __( 'Necessary to verify the MIME type of local images.', 'woocommerce-pdf-invoices-packing-slips' ), + 'value' => null, + 'result' => extension_loaded( 'fileinfo' ), + 'fallback' => __( 'fileinfo disabled', 'woocommerce-pdf-invoices-packing-slips' ), + ), 'base64_decode' => array ( - 'required' => __( 'To compress and decompress font data', 'woocommerce-pdf-invoices-packing-slips' ), + 'required' => __( 'To compress and decompress font and image data', 'woocommerce-pdf-invoices-packing-slips' ), 'value' => null, 'result' => function_exists( 'base64_decode' ), 'fallback' => __( 'base64_decode disabled', 'woocommerce-pdf-invoices-packing-slips' ), diff --git a/includes/wcpdf-functions.php b/includes/wcpdf-functions.php index b0903dcfb..6ae301d86 100644 --- a/includes/wcpdf-functions.php +++ b/includes/wcpdf-functions.php @@ -721,3 +721,215 @@ function wpo_wcpdf_get_multilingual_languages(): array { return apply_filters( 'wpo_wcpdf_multilingual_languages', $languages ); } +/** + * Get image mime type + * + * @param string $src + * @return string + */ +function wpo_wcpdf_get_image_mime_type( string $src ): string { + $mime_type = ''; + + if ( empty( $src ) ) { + return $mime_type; + } + + // Check if 'getimagesize' function exists and try to get mime type for local files + if ( function_exists( 'getimagesize' ) && ! filter_var( $src, FILTER_VALIDATE_URL ) ) { + $image_info = @getimagesize( $src ); + + if ( $image_info && isset( $image_info['mime'] ) ) { + $mime_type = $image_info['mime']; + } + } + + // Fallback to 'finfo_file' if mime type is empty for local files only (no remote files allowed) + if ( empty( $mime_type ) && function_exists( 'finfo_open' ) && ! filter_var( $src, FILTER_VALIDATE_URL ) ) { + $finfo = finfo_open( FILEINFO_MIME_TYPE ); + + if ( $finfo ) { + $mime_type = finfo_file( $finfo, $src ); + finfo_close( $finfo ); + } + } + + // Handle remote files + if ( empty( $mime_type ) && filter_var( $src, FILTER_VALIDATE_URL ) ) { + $context = stream_context_create( array( + 'http' => array( + 'method' => 'HEAD', + 'ignore_errors' => true, + ), + 'https' => array( + 'method' => 'HEAD', + 'ignore_errors' => true, + 'verify_peer' => false, + 'verify_peer_name' => false, + ), + ) ); + + $headers = @get_headers( $src, 1, $context ); + + if ( $headers ) { + if ( isset( $headers['Content-Type'] ) ) { + $mime_type = is_array( $headers['Content-Type'] ) ? $headers['Content-Type'][0] : $headers['Content-Type']; + } + } + } + + // Fetch the actual image data if MIME type is still unknown (remote files) + if ( empty( $mime_type ) && filter_var( $src, FILTER_VALIDATE_URL ) ) { + $image_data = @file_get_contents( $src ); + + if ( $image_data ) { + if ( function_exists( 'finfo_open' ) ) { + $finfo = finfo_open( FILEINFO_MIME_TYPE ); + + if ( $finfo ) { + $mime_type = finfo_buffer( $finfo, $image_data ); + finfo_close( $finfo ); + } + } + } + } + + // Determine using WP functions + if ( empty( $mime_type ) ) { + $path = wp_parse_url( $src, PHP_URL_PATH ); + $file_info = wp_check_filetype( $path ); + $mime_type = $file_info['type'] ?? ''; + } + + // Last chance, determine from file extension + if ( empty( $mime_type ) ) { + $path = parse_url( $src, PHP_URL_PATH ); + $extension = strtolower( pathinfo( $path, PATHINFO_EXTENSION ) ); + + switch ( $extension ) { + case 'jpg': + case 'jpeg': + $mime_type = 'image/jpeg'; + break; + case 'png': + $mime_type = 'image/png'; + break; + case 'gif': + $mime_type = 'image/gif'; + break; + case 'bmp': + $mime_type = 'image/bmp'; + break; + case 'webp': + $mime_type = 'image/webp'; + break; + case 'svg': + $mime_type = 'image/svg+xml'; + break; + } + } + + return $mime_type; +} + +/** + * Base64 encode file from URL or local path + * + * @param string $src + * + * @return string|bool + */ +function wpo_wcpdf_base64_encode_file( string $src ) { + if ( empty( $src ) ) { + return false; + } + + $file_data = @file_get_contents( $src ); + return base64_encode( $file_data ) ?? false; +} + +/** + * Check if a file is readable + * + * @param string $path + * @return bool + */ +function wpo_wcpdf_is_file_readable( string $path ): bool { + if ( empty( $path ) ) { + return false; + } + + // Check if the path is a URL + if ( filter_var( $path, FILTER_VALIDATE_URL ) ) { + $parsed_url = parse_url( $path ); + $args = array(); + + // Check if the URL is localhost + if ( + 'localhost' === $parsed_url['host'] || + '127.0.0.1' === $parsed_url['host'] || + ( preg_match( '/^192\.168\./', $parsed_url['host'] ) === 1 ) || // 192.168.* + ( preg_match( '/^10\./', $parsed_url['host'] ) === 1 ) || // 10.* + ( preg_match( '/^172\.(1[6-9]|2[0-9]|3[0-1])\./', $parsed_url['host'] ) === 1 ) || // 172.16.* to 172.31.* + getenv( 'DISABLE_SSL_VERIFY' ) === 'true' + ) { + $args['sslverify'] = false; + } + + $args = apply_filters( 'wpo_wcpdf_url_remote_head_args', $args, $parsed_url, $path ); + $response = wp_safe_remote_head( $path, $args ); + + if ( is_wp_error( $response ) ) { + wcpdf_log_error( 'Failed to access file URL: ' . $path . ' Error: ' . $response->get_error_message(), 'critical' ); + return false; + } + + $status_code = wp_remote_retrieve_response_code( $response ); + return ( $status_code === 200 ); + + // Local path file check + } else { + if ( @is_readable( $path ) ) { + return true; + } else { + // Fallback to fopen if first check fails + $handle = @fopen( $path, 'r' ); + + if ( $handle ) { + fclose( $handle ); + return true; + } else { + wcpdf_log_error( 'Failed to open local file with both methods: ' . $path, 'critical' ); + return false; + } + } + } +} + +/** + * Get image source in base64 format + * + * @param string $src + * + * @return string + */ +function wpo_wcpdf_get_image_src_in_base64( string $src ): string { + if ( empty( $src ) ) { + return $src; + } + + $mime_type = wpo_wcpdf_get_image_mime_type( $src ); + + if ( empty( $mime_type ) ) { + wcpdf_log_error( 'Unable to determine image mime type for file: ' . $src, 'critical' ); + return $src; + } + + $image_base64 = wpo_wcpdf_base64_encode_file( $src ); + + if ( ! $image_base64 ) { + wcpdf_log_error( 'Unable to encode header logo to base64.', 'critical' ); + return $src; + } + + return 'data:' . $mime_type . ';base64,' . $image_base64; +} diff --git a/woocommerce-pdf-invoices-packingslips.php b/woocommerce-pdf-invoices-packingslips.php index 19eab6edf..9f10eae62 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.4 + * Version: 3.8.5-beta-6 * 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.0 + * WC tested up to: 9.1 */ if ( ! defined( 'ABSPATH' ) ) { @@ -22,7 +22,7 @@ class WPO_WCPDF { - public $version = '3.8.4'; + public $version = '3.8.5-beta-6'; public $version_php = '7.2'; public $version_woo = '3.3'; public $version_wp = '4.4'; From 3d6a1830e5e487f7d73c3cb4c233afc37af8d316 Mon Sep 17 00:00:00 2001 From: Alexandre Faustino Date: Mon, 15 Jul 2024 11:35:55 +0100 Subject: [PATCH 04/39] Update woocommerce-pdf-invoices-packing-slips.pot --- ...woocommerce-pdf-invoices-packing-slips.pot | 271 ++++++++++-------- 1 file changed, 151 insertions(+), 120 deletions(-) diff --git a/languages/woocommerce-pdf-invoices-packing-slips.pot b/languages/woocommerce-pdf-invoices-packing-slips.pot index a00f4931b..be7b8f8a3 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.4-beta-1\n" +"Project-Id-Version: PDF Invoices & Packing Slips for WooCommerce 3.8.5-beta-6\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-06-19T15:05:03+02:00\n" +"POT-Creation-Date: 2024-07-15T12:35:46+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,7 +49,7 @@ msgid "Yes you deserve it!" msgstr "" #: includes/class-wcpdf-admin.php:124 -#: includes/class-wcpdf-main.php:891 +#: includes/class-wcpdf-main.php:893 #: includes/views/attachment-settings-hint.php:12 #: includes/views/extensions.php:121 #: includes/views/promo.php:34 @@ -89,15 +89,15 @@ msgstr "" #: includes/class-wcpdf-admin.php:322 #: includes/class-wcpdf-admin.php:1334 #: includes/class-wcpdf-assets.php:228 -#: includes/class-wcpdf-main.php:1274 +#: includes/class-wcpdf-main.php:1276 #: includes/documents/class-wcpdf-invoice.php:314 #: includes/views/setup-wizard/display-options.php:81 msgid "Invoice Number" msgstr "" #: includes/class-wcpdf-admin.php:323 -#: includes/class-wcpdf-main.php:1275 -#: includes/documents/abstract-wcpdf-order-document-methods.php:1296 +#: includes/class-wcpdf-main.php:1277 +#: includes/documents/abstract-wcpdf-order-document-methods.php:1306 #: includes/documents/class-wcpdf-invoice.php:280 #: includes/views/setup-wizard/display-options.php:60 msgid "Invoice Date" @@ -262,7 +262,7 @@ msgid "Preview" msgstr "" #: includes/class-wcpdf-assets.php:120 -#: includes/settings/class-wcpdf-settings-debug.php:901 +#: includes/settings/class-wcpdf-settings-debug.php:913 msgid "Settings" msgstr "" @@ -300,119 +300,124 @@ msgstr "" msgid "Download %s (PDF)" msgstr "" -#: includes/class-wcpdf-main.php:399 +#: includes/class-wcpdf-main.php:401 msgid "You do not have sufficient permissions to access this page. Reason: empty access key" msgstr "" -#: includes/class-wcpdf-main.php:405 +#: includes/class-wcpdf-main.php:407 msgid "You do not have sufficient permissions to access this page. Reason: empty action" msgstr "" -#: includes/class-wcpdf-main.php:411 +#: includes/class-wcpdf-main.php:413 msgid "You do not have sufficient permissions to access this page. Reason: invalid nonce" msgstr "" -#: includes/class-wcpdf-main.php:421 +#: includes/class-wcpdf-main.php:423 msgid "You haven't selected any orders" msgstr "" -#: includes/class-wcpdf-main.php:426 +#: includes/class-wcpdf-main.php:428 msgid "Some of the export parameters are missing." msgstr "" -#: includes/class-wcpdf-main.php:445 +#: includes/class-wcpdf-main.php:447 msgid "You have to save the order before generating a PDF document for it." msgstr "" #. translators: %s: Order ID -#: includes/class-wcpdf-main.php:450 +#: includes/class-wcpdf-main.php:452 msgid "Could not find the order #%s." msgstr "" -#: includes/class-wcpdf-main.php:517 +#: includes/class-wcpdf-main.php:519 #: includes/class-wcpdf-settings.php:239 -#: includes/class-wcpdf-settings.php:385 +#: includes/class-wcpdf-settings.php:387 msgid "You do not have sufficient permissions to access this page." msgstr "" #. translators: document type -#: includes/class-wcpdf-main.php:572 +#: includes/class-wcpdf-main.php:574 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:889 +#: includes/class-wcpdf-main.php:891 msgid "The %1$s directory %2$s couldn't be created or is not writable!" msgstr "" -#: includes/class-wcpdf-main.php:890 +#: includes/class-wcpdf-main.php:892 msgid "Please check your directories write permissions or contact your hosting service provider." msgstr "" #. translators: 1,2. file count -#: includes/class-wcpdf-main.php:1227 +#: includes/class-wcpdf-main.php:1229 msgid "Unable to delete %1$d files! (deleted %2$d)" msgstr "" #. translators: file count -#: includes/class-wcpdf-main.php:1231 +#: includes/class-wcpdf-main.php:1233 msgid "Successfully deleted %d files!" msgstr "" -#: includes/class-wcpdf-main.php:1235 +#: includes/class-wcpdf-main.php:1237 msgid "Nothing to delete!" msgstr "" #. translators: 1. document title, 2. creation trigger -#: includes/class-wcpdf-main.php:1311 +#: includes/class-wcpdf-main.php:1313 msgid "PDF %1$s created via %2$s." msgstr "" -#: includes/class-wcpdf-main.php:1326 +#. translators: document title +#: includes/class-wcpdf-main.php:1329 +msgid "PDF %s deleted." +msgstr "" + +#: includes/class-wcpdf-main.php:1344 msgid "manually" msgstr "" #. translators: 1. document title, 2. creation trigger -#: includes/class-wcpdf-main.php:1332 +#: includes/class-wcpdf-main.php:1350 msgid "%1$s document marked as printed via %2$s." msgstr "" #. translators: 1. document title, 2. creation trigger -#: includes/class-wcpdf-main.php:1348 +#: includes/class-wcpdf-main.php:1366 msgid "%1$s document unmark printed." msgstr "" -#: includes/class-wcpdf-main.php:1433 +#: includes/class-wcpdf-main.php:1451 msgid "single order action" msgstr "" -#: includes/class-wcpdf-main.php:1434 +#: includes/class-wcpdf-main.php:1452 msgid "bulk order action" msgstr "" -#: includes/class-wcpdf-main.php:1435 +#: includes/class-wcpdf-main.php:1453 msgid "my account" msgstr "" -#: includes/class-wcpdf-main.php:1436 +#: includes/class-wcpdf-main.php:1454 msgid "email attachment" msgstr "" -#: includes/class-wcpdf-main.php:1437 +#: includes/class-wcpdf-main.php:1455 msgid "order document data (number and/or date set manually)" msgstr "" #. translators: 1. document type, 2. mark/unmark -#: includes/class-wcpdf-main.php:1521 +#: includes/class-wcpdf-main.php:1539 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:1616 +#: includes/class-wcpdf-main.php:1634 msgid "Order %s Saved" msgstr "" -#: includes/class-wcpdf-main.php:1649 +#: includes/class-wcpdf-main.php:1667 #: includes/documents/abstract-wcpdf-order-document.php:652 msgid "Due Date:" msgstr "" @@ -474,36 +479,36 @@ msgid "No WooCommerce orders found! Please consider adding your first order to s msgstr "" #. translators: error message -#: includes/class-wcpdf-settings.php:369 +#: includes/class-wcpdf-settings.php:371 msgid "Error trying to generate document: %s" msgstr "" -#: includes/class-wcpdf-settings.php:443 +#: includes/class-wcpdf-settings.php:445 #: includes/tables/class-wcpdf-number-store-list-table.php:122 msgid "Date" msgstr "" -#: includes/class-wcpdf-settings.php:444 -#: includes/documents/abstract-wcpdf-order-document-methods.php:1101 +#: includes/class-wcpdf-settings.php:446 +#: includes/documents/abstract-wcpdf-order-document-methods.php:1111 #: ubl/Settings/TaxesSettings.php:170 msgid "Total" msgstr "" -#: includes/class-wcpdf-settings.php:451 +#: includes/class-wcpdf-settings.php:453 msgid "No order(s) found!" msgstr "" -#: includes/class-wcpdf-settings.php:454 +#: includes/class-wcpdf-settings.php:456 msgid "An error occurred when trying to process your request!" msgstr "" #. translators: error message -#: includes/class-wcpdf-settings.php:461 +#: includes/class-wcpdf-settings.php:463 msgid "Error trying to get orders: %s" msgstr "" #. translators: total scheduled actions -#: includes/class-wcpdf-settings.php:951 +#: includes/class-wcpdf-settings.php:953 msgid "Only 1 scheduled action should exist for the yearly reset of the numbering system, but %s were found" msgstr "" @@ -564,28 +569,33 @@ msgstr "" msgid "Finish" msgstr "" +#: includes/compatibility/class-wcpdf-compatibility-third-party-plugins.php:374 +#: includes/views/setup-wizard/display-options.php:73 +msgid "Invoice number" +msgstr "" + #: includes/documents/abstract-wcpdf-order-document-methods.php:96 #: includes/documents/abstract-wcpdf-order-document-methods.php:206 msgid "N/A" msgstr "" -#: includes/documents/abstract-wcpdf-order-document-methods.php:975 +#: includes/documents/abstract-wcpdf-order-document-methods.php:985 msgid "Subtotal" msgstr "" -#: includes/documents/abstract-wcpdf-order-document-methods.php:1000 +#: includes/documents/abstract-wcpdf-order-document-methods.php:1010 msgid "Shipping" msgstr "" -#: includes/documents/abstract-wcpdf-order-document-methods.php:1031 +#: includes/documents/abstract-wcpdf-order-document-methods.php:1041 msgid "Discount" msgstr "" -#: includes/documents/abstract-wcpdf-order-document-methods.php:1098 +#: includes/documents/abstract-wcpdf-order-document-methods.php:1108 msgid "Total ex. VAT" msgstr "" -#: includes/documents/abstract-wcpdf-order-document-methods.php:1297 +#: includes/documents/abstract-wcpdf-order-document-methods.php:1307 #: includes/documents/class-wcpdf-invoice.php:281 #: includes/views/setup-wizard/display-options.php:61 msgid "Order Date" @@ -611,11 +621,11 @@ msgstr "" msgid "%s Date:" msgstr "" -#: includes/documents/abstract-wcpdf-order-document.php:1273 +#: includes/documents/abstract-wcpdf-order-document.php:1267 msgid "Admin email" msgstr "" -#: includes/documents/abstract-wcpdf-order-document.php:1276 +#: includes/documents/abstract-wcpdf-order-document.php:1270 msgid "Manual email" msgstr "" @@ -671,9 +681,10 @@ msgstr "" #: includes/documents/class-wcpdf-invoice.php:295 #: includes/documents/class-wcpdf-invoice.php:313 #: includes/documents/class-wcpdf-packing-slip.php:103 -#: includes/views/advanced-status.php:149 -#: includes/views/advanced-status.php:183 -#: includes/views/advanced-status.php:184 +#: includes/views/advanced-status.php:169 +#: includes/views/advanced-status.php:173 +#: includes/views/advanced-status.php:204 +#: includes/views/advanced-status.php:205 #: includes/views/setup-wizard/display-options.php:20 #: includes/views/setup-wizard/display-options.php:59 #: includes/views/setup-wizard/display-options.php:80 @@ -848,7 +859,7 @@ msgid "Enable invoice number search in the orders list" msgstr "" #: includes/documents/class-wcpdf-invoice.php:444 -msgid "Can potentially slow down the search process." +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 @@ -1103,12 +1114,12 @@ msgid "Logged in (recommended)" msgstr "" #: includes/settings/class-wcpdf-settings-debug.php:700 -#: includes/settings/class-wcpdf-settings-debug.php:888 +#: includes/settings/class-wcpdf-settings-debug.php:900 msgid "Guest" msgstr "" #: includes/settings/class-wcpdf-settings-debug.php:701 -#: includes/settings/class-wcpdf-settings-debug.php:892 +#: includes/settings/class-wcpdf-settings-debug.php:904 msgid "Full" msgstr "" @@ -1200,63 +1211,71 @@ msgid "You can also add &output=html to the URL to apply this on a msgstr "" #: includes/settings/class-wcpdf-settings-debug.php:827 -msgid "Log to order notes" +msgid "Embed Images" msgstr "" #: includes/settings/class-wcpdf-settings-debug.php:833 -msgid "Log PDF document creation and mark/unmark as printed to order notes." +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 -msgid "Disable document preview" +msgid "Log to order notes" msgstr "" #: includes/settings/class-wcpdf-settings-debug.php:845 -msgid "Disables the document preview on the plugin settings pages." +msgid "Log PDF document creation, deletion, and mark/unmark as printed to order notes." msgstr "" #: includes/settings/class-wcpdf-settings-debug.php:851 -msgid "Enable semaphore logs" +msgid "Disable document preview" msgstr "" #: includes/settings/class-wcpdf-settings-debug.php:857 -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." +msgid "Disables the document preview on the plugin settings pages." msgstr "" #: includes/settings/class-wcpdf-settings-debug.php:863 -msgid "Enable danger zone tools" +msgid "Enable semaphore logs" msgstr "" #: includes/settings/class-wcpdf-settings-debug.php:869 +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 +msgid "Enable danger zone tools" +msgstr "" + +#: includes/settings/class-wcpdf-settings-debug.php:881 msgid "Enables the danger zone tools. The actions performed by these tools are irreversible!" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:884 +#: includes/settings/class-wcpdf-settings-debug.php:896 msgid "Logged in" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:885 +#: includes/settings/class-wcpdf-settings-debug.php:897 msgid "Document can be accessed by logged in users only." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:889 +#: includes/settings/class-wcpdf-settings-debug.php:901 msgid "Document can be accessed by logged in and guest users." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:893 +#: includes/settings/class-wcpdf-settings-debug.php:905 msgid "Document can be accessed by everyone with the link." msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:902 -#: includes/views/advanced-status.php:304 +#: includes/settings/class-wcpdf-settings-debug.php:914 +#: includes/views/advanced-status.php:325 msgid "Status" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:903 +#: includes/settings/class-wcpdf-settings-debug.php:915 msgid "Tools" msgstr "" -#: includes/settings/class-wcpdf-settings-debug.php:904 +#: includes/settings/class-wcpdf-settings-debug.php:916 msgid "Numbers" msgstr "" @@ -1605,171 +1624,187 @@ msgstr "" msgid "Please select a number store!" msgstr "" -#: includes/views/advanced-status.php:11 +#: includes/views/advanced-status.php:13 msgid "7.2+ (7.4 or higher recommended)" msgstr "" -#: includes/views/advanced-status.php:24 +#: includes/views/advanced-status.php:26 msgid "Recommended, will use fallback functions" msgstr "" -#: includes/views/advanced-status.php:30 +#: includes/views/advanced-status.php:32 msgid "Required if you have images in your documents" msgstr "" -#: includes/views/advanced-status.php:33 +#: includes/views/advanced-status.php:35 msgid "Required when using .webp images" msgstr "" -#: includes/views/advanced-status.php:36 +#: includes/views/advanced-status.php:38 msgid "Required if you have .webp images in your documents" msgstr "" -#: includes/views/advanced-status.php:45 +#: includes/views/advanced-status.php:47 msgid "To compress PDF documents" msgstr "" -#: includes/views/advanced-status.php:48 +#: includes/views/advanced-status.php:50 msgid "Recommended to compress PDF documents" msgstr "" -#: includes/views/advanced-status.php:51 +#: includes/views/advanced-status.php:53 msgid "For better performances" msgstr "" -#: includes/views/advanced-status.php:54 -#: includes/views/advanced-status.php:60 +#: includes/views/advanced-status.php:56 +#: includes/views/advanced-status.php:62 msgid "Recommended for better performances" msgstr "" -#: includes/views/advanced-status.php:57 +#: includes/views/advanced-status.php:59 msgid "Better with transparent PNG images" msgstr "" -#: includes/views/advanced-status.php:63 +#: includes/views/advanced-status.php:65 msgid "Required to detect custom templates and to clear the temp folder periodically" msgstr "" -#: includes/views/advanced-status.php:66 +#: includes/views/advanced-status.php:68 msgid "Check PHP disable_functions" msgstr "" #. translators: tags -#: includes/views/advanced-status.php:70 +#: includes/views/advanced-status.php:72 msgid "Recommended: 128MB (more for plugin-heavy setups
See: %1$sIncreasing the WordPress Memory Limit%2$s" msgstr "" -#: includes/views/advanced-status.php:75 +#: includes/views/advanced-status.php:77 msgid "Allow remote stylesheets and images" msgstr "" -#: includes/views/advanced-status.php:78 +#: includes/views/advanced-status.php:80 msgid "allow_url_fopen disabled" msgstr "" -#: includes/views/advanced-status.php:81 -msgid "To compress and decompress font data" +#: includes/views/advanced-status.php:83 +msgid "Necessary to verify the MIME type of local images." +msgstr "" + +#: includes/views/advanced-status.php:86 +msgid "fileinfo disabled" +msgstr "" + +#: includes/views/advanced-status.php:89 +msgid "To compress and decompress font and image data" msgstr "" -#: includes/views/advanced-status.php:84 +#: includes/views/advanced-status.php:92 msgid "base64_decode disabled" msgstr "" +#: includes/views/advanced-status.php:100 +msgid "Required for IMagick" +msgstr "" + +#: includes/views/advanced-status.php:103 +msgid "ImageMagick library, integrated via the IMagick PHP extension for advanced image processing capabilities" +msgstr "" + #. translators:
tags -#: includes/views/advanced-status.php:104 +#: includes/views/advanced-status.php:125 msgid "Download %1$sthis addon%2$s to enable backwards compatibility." msgstr "" -#: includes/views/advanced-status.php:112 +#: includes/views/advanced-status.php:132 msgid "System Configuration" msgstr "" -#: includes/views/advanced-status.php:118 +#: includes/views/advanced-status.php:138 msgid "Required" msgstr "" -#: includes/views/advanced-status.php:119 +#: includes/views/advanced-status.php:139 msgid "Present" msgstr "" -#: includes/views/advanced-status.php:138 -#: includes/views/advanced-status.php:145 -#: includes/views/advanced-status.php:183 -#: includes/views/advanced-status.php:184 -#: includes/views/advanced-status.php:249 +#: includes/views/advanced-status.php:158 +#: includes/views/advanced-status.php:165 +#: includes/views/advanced-status.php:204 +#: includes/views/advanced-status.php:205 +#: includes/views/advanced-status.php:270 msgid "Yes" msgstr "" -#: includes/views/advanced-status.php:167 +#: includes/views/advanced-status.php:188 msgid "Documents status" msgstr "" -#: includes/views/advanced-status.php:173 +#: includes/views/advanced-status.php:194 msgid "Enabled" msgstr "" -#: includes/views/advanced-status.php:174 -#: includes/views/advanced-status.php:232 +#: includes/views/advanced-status.php:195 +#: includes/views/advanced-status.php:253 msgid "Yearly reset" msgstr "" -#: includes/views/advanced-status.php:197 +#: includes/views/advanced-status.php:218 msgid "Required to reset documents numeration" msgstr "" -#: includes/views/advanced-status.php:198 +#: includes/views/advanced-status.php:219 msgid "Yearly reset action not found" msgstr "" #. translators: total scheduled actions -#: includes/views/advanced-status.php:216 +#: includes/views/advanced-status.php:237 msgid "Only 1 scheduled action should exist, but %s were found" msgstr "" #. translators: 1. open anchor tag, 2. close anchor tag -#: includes/views/advanced-status.php:224 +#: includes/views/advanced-status.php:245 msgid "Scheduled action not found. Please reschedule it %1$shere%2$s." msgstr "" -#: includes/views/advanced-status.php:260 +#: includes/views/advanced-status.php:281 msgid "Writable" msgstr "" -#: includes/views/advanced-status.php:261 +#: includes/views/advanced-status.php:282 msgid "Not writable" msgstr "" -#: includes/views/advanced-status.php:266 +#: includes/views/advanced-status.php:287 msgid "Central temporary plugin folder" msgstr "" -#: includes/views/advanced-status.php:272 +#: includes/views/advanced-status.php:293 msgid "Temporary attachments folder" msgstr "" -#: includes/views/advanced-status.php:278 +#: includes/views/advanced-status.php:299 msgid "Temporary DOMPDF folder" msgstr "" -#: includes/views/advanced-status.php:284 +#: includes/views/advanced-status.php:305 msgid "DOMPDF fonts folder (needs to be writable for custom/remote fonts)" msgstr "" -#: includes/views/advanced-status.php:297 +#: includes/views/advanced-status.php:318 msgid "Write Permissions" msgstr "" -#: includes/views/advanced-status.php:303 +#: includes/views/advanced-status.php:324 msgid "Path" msgstr "" #. translators: 1,2. directory paths, 3. UPLOADS, 4. wpo_wcpdf_tmp_path, 5. attachments, 6. dompdf, 7. fonts -#: includes/views/advanced-status.php:328 +#: includes/views/advanced-status.php:349 msgid "The central temp folder is %1$s. By default, this folder is created in the WordPress uploads folder (%2$s), which can be defined by setting %3$s in wp-config.php. Alternatively, you can control the specific folder for PDF invoices by using the %4$s filter. Make sure this folder is writable and that the subfolders %5$s, %6$s and %7$s are present (these will be created by the plugin if the central temp folder is writable)." msgstr "" #. translators: directory path -#: includes/views/advanced-status.php:344 +#: includes/views/advanced-status.php:365 msgid "If the temporary folders were not automatically created by the plugin, verify that all the font files (from %s) are copied to the fonts folder. Normally, this is fully automated, but if your server has strict security settings, this automated copying may have been prohibited. In that case, you also need to make sure these folders get synchronized on plugin updates!" msgstr "" @@ -2166,10 +2201,6 @@ msgstr "" msgid "Invoice date" msgstr "" -#: includes/views/setup-wizard/display-options.php:73 -msgid "Invoice number" -msgstr "" - #: includes/views/setup-wizard/good-to-go.php:3 msgid "You are good to go!" msgstr "" From 5d58b58f3d32538a0abb2ddc76e836d9377027fe Mon Sep 17 00:00:00 2001 From: Alexandre Faustino Date: Mon, 15 Jul 2024 11:40:53 +0100 Subject: [PATCH 05/39] v3.8.5 --- readme.txt | 14 +++++++++++++- woocommerce-pdf-invoices-packingslips.php | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/readme.txt b/readme.txt index 1e8ed975a..c5e93a464 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.4 +Stable tag: 3.8.5 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -102,6 +102,18 @@ There's a setting on the Advanced tab of the settings page that allows you to to == Changelog == += 3.8.5 (2024-07-15) = +* New: advanced embed images setting +* New: includes ImageMagick library in the Advanced Status +* New: adds Invoice number to search type selector in HPOS setups +* New: adds row classes for "YITH WooCommerce Product Bundles" +* New: register a log for document deletion in the Order Notes +* Tweak: improves header logo loading +* Fix: make Simple template total labels translatable +* Fix: wraps document addresses around `

` tags +* Translations: Updated translation template (POT) +* Tested up to WooCommerce 9.1 & WordPress 6.6 + = 3.8.4 (2024-06-19) = * New: filter hook `wpo_wcpdf_multilingual_languages` * New: `wpo_wcpdf_get_multilingual_languages()` function has been introduced, derived from the deprecated `get_languages()` function diff --git a/woocommerce-pdf-invoices-packingslips.php b/woocommerce-pdf-invoices-packingslips.php index 9f10eae62..aa1c076bf 100644 --- a/woocommerce-pdf-invoices-packingslips.php +++ b/woocommerce-pdf-invoices-packingslips.php @@ -4,7 +4,7 @@ * 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.5-beta-6 + * Version: 3.8.5 * Author: WP Overnight * Author URI: https://www.wpovernight.com * License: GPLv2 or later @@ -22,7 +22,7 @@ class WPO_WCPDF { - public $version = '3.8.5-beta-6'; + public $version = '3.8.5'; public $version_php = '7.2'; public $version_woo = '3.3'; public $version_wp = '4.4'; From abbce2def800cdd8b84a1a4d5d14226078007513 Mon Sep 17 00:00:00 2001 From: Mohamad <136313810+MohamadNateqi@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:07:48 +0330 Subject: [PATCH 06/39] New: PDFJS v4.3.136 upgrade (#818) --- assets/js/admin-script.js | 3 --- assets/js/admin-script.min.js | 2 +- assets/js/pdf_js/pdf.min.js | 24 ++---------------------- assets/js/pdf_js/pdf.worker.min.js | 24 ++---------------------- includes/class-wcpdf-assets.php | 7 ++++--- 5 files changed, 9 insertions(+), 51 deletions(-) diff --git a/assets/js/admin-script.js b/assets/js/admin-script.js index 2c27176b2..54208b27b 100644 --- a/assets/js/admin-script.js +++ b/assets/js/admin-script.js @@ -491,9 +491,6 @@ jQuery( function( $ ) { // (See also https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding.) pdfData = window.atob( pdfData ); - // Loaded via