Version Description
(2022-12-15) = * Fix: adds nonce check in hide link for attachments hint in admin * Tested up to WooCommerce 7.2
Download this release
Release Info
Developer | wpovernight |
Plugin | WooCommerce PDF Invoices & Packing Slips |
Version | 3.2.6 |
Comparing to | |
See all releases |
Code changes from version 3.2.5 to 3.2.6
includes/class-wcpdf-endpoint.php
CHANGED
@@ -70,7 +70,6 @@ class Endpoint {
|
|
70 |
}
|
71 |
|
72 |
// handle access key
|
73 |
-
$debug_settings = get_option( 'wpo_wcpdf_settings_debug', array() );
|
74 |
if ( is_user_logged_in() ) {
|
75 |
$access_key = wp_create_nonce( $this->action );
|
76 |
} elseif ( ! is_user_logged_in() && WPO_WCPDF()->settings->is_guest_access_enabled() ) {
|
70 |
}
|
71 |
|
72 |
// handle access key
|
|
|
73 |
if ( is_user_logged_in() ) {
|
74 |
$access_key = wp_create_nonce( $this->action );
|
75 |
} elseif ( ! is_user_logged_in() && WPO_WCPDF()->settings->is_guest_access_enabled() ) {
|
includes/class-wcpdf-settings-general.php
CHANGED
@@ -252,9 +252,15 @@ class Settings_General {
|
|
252 |
|
253 |
public function attachment_settings_hint( $active_tab, $active_section ) {
|
254 |
// save or check option to hide attachments settings hint
|
255 |
-
if ( isset( $
|
256 |
-
|
257 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
} else {
|
259 |
$hide_hint = get_option( 'wpo_wcpdf_hide_attachments_hint' );
|
260 |
}
|
252 |
|
253 |
public function attachment_settings_hint( $active_tab, $active_section ) {
|
254 |
// save or check option to hide attachments settings hint
|
255 |
+
if ( isset( $_REQUEST['wpo_wcpdf_hide_attachments_hint'] ) && isset( $_REQUEST['_wpnonce'] ) ) {
|
256 |
+
// validate nonce
|
257 |
+
if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'hide_attachments_hint_nonce' ) ) {
|
258 |
+
wcpdf_log_error( 'You do not have sufficient permissions to perform this action: wpo_wcpdf_hide_attachments_hint' );
|
259 |
+
$hide_hint = false;
|
260 |
+
} else {
|
261 |
+
update_option( 'wpo_wcpdf_hide_attachments_hint', true );
|
262 |
+
$hide_hint = true;
|
263 |
+
}
|
264 |
} else {
|
265 |
$hide_hint = get_option( 'wpo_wcpdf_hide_attachments_hint' );
|
266 |
}
|
includes/views/attachment-settings-hint.php
CHANGED
@@ -9,6 +9,6 @@ $invoice_settings_url = esc_url( add_query_arg( array(
|
|
9 |
<p>
|
10 |
<?php /* translators: <a> tags */ ?>
|
11 |
<?php printf( wp_kses_post( __( 'It looks like you haven\'t setup any email attachments yet, check the settings under <b>%1$sDocuments > Invoice%2$s</b>', 'woocommerce-pdf-invoices-packing-slips' ) ), '<a href="'.$invoice_settings_url.'">', '</a>' ); ?>
|
12 |
-
<?php printf( '<a href="%s" style="display:block; margin-top:10px;">%s</a>', esc_url( add_query_arg( 'wpo_wcpdf_hide_attachments_hint', 'true' ) ), esc_html__( 'Hide this message', 'woocommerce-pdf-invoices-packing-slips' ) ); ?>
|
13 |
</p>
|
14 |
</div>
|
9 |
<p>
|
10 |
<?php /* translators: <a> tags */ ?>
|
11 |
<?php printf( wp_kses_post( __( 'It looks like you haven\'t setup any email attachments yet, check the settings under <b>%1$sDocuments > Invoice%2$s</b>', 'woocommerce-pdf-invoices-packing-slips' ) ), '<a href="'.$invoice_settings_url.'">', '</a>' ); ?>
|
12 |
+
<?php printf( '<a href="%s" style="display:block; margin-top:10px;">%s</a>', esc_url( wp_nonce_url( add_query_arg( 'wpo_wcpdf_hide_attachments_hint', 'true' ), 'hide_attachments_hint_nonce' ) ), esc_html__( 'Hide this message', 'woocommerce-pdf-invoices-packing-slips' ) ); ?>
|
13 |
</p>
|
14 |
</div>
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice,
|
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 6.1
|
7 |
Requires PHP: 7.1
|
8 |
-
Stable tag: 3.2.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -102,6 +102,10 @@ There's a setting on the Status tab of the settings page that allows you to togg
|
|
102 |
|
103 |
== Changelog ==
|
104 |
|
|
|
|
|
|
|
|
|
105 |
= 3.2.5 (2022-11-22) =
|
106 |
* Fix: allow for WooCommerce Booking without order
|
107 |
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 6.1
|
7 |
Requires PHP: 7.1
|
8 |
+
Stable tag: 3.2.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
102 |
|
103 |
== Changelog ==
|
104 |
|
105 |
+
= 3.2.6 (2022-12-15) =
|
106 |
+
* Fix: adds nonce check in hide link for attachments hint in admin
|
107 |
+
* Tested up to WooCommerce 7.2
|
108 |
+
|
109 |
= 3.2.5 (2022-11-22) =
|
110 |
* Fix: allow for WooCommerce Booking without order
|
111 |
|
woocommerce-pdf-invoices-packingslips.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
* Plugin Name: PDF Invoices & Packing Slips for WooCommerce
|
4 |
* Plugin URI: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/
|
5 |
* Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
|
6 |
-
* Version: 3.2.
|
7 |
* Author: WP Overnight
|
8 |
* Author URI: https://www.wpovernight.com
|
9 |
* License: GPLv2 or later
|
10 |
* License URI: https://opensource.org/licenses/gpl-license.php
|
11 |
* Text Domain: woocommerce-pdf-invoices-packing-slips
|
12 |
* WC requires at least: 3.0
|
13 |
-
* WC tested up to: 7.
|
14 |
*/
|
15 |
|
16 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -21,7 +21,7 @@ if ( ! class_exists( 'WPO_WCPDF' ) ) :
|
|
21 |
|
22 |
class WPO_WCPDF {
|
23 |
|
24 |
-
public $version = '3.2.
|
25 |
public $plugin_basename;
|
26 |
public $legacy_mode;
|
27 |
public $legacy_textdomain;
|
3 |
* Plugin Name: PDF Invoices & Packing Slips for WooCommerce
|
4 |
* Plugin URI: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/
|
5 |
* Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
|
6 |
+
* Version: 3.2.6
|
7 |
* Author: WP Overnight
|
8 |
* Author URI: https://www.wpovernight.com
|
9 |
* License: GPLv2 or later
|
10 |
* License URI: https://opensource.org/licenses/gpl-license.php
|
11 |
* Text Domain: woocommerce-pdf-invoices-packing-slips
|
12 |
* WC requires at least: 3.0
|
13 |
+
* WC tested up to: 7.2
|
14 |
*/
|
15 |
|
16 |
if ( ! defined( 'ABSPATH' ) ) {
|
21 |
|
22 |
class WPO_WCPDF {
|
23 |
|
24 |
+
public $version = '3.2.6';
|
25 |
public $plugin_basename;
|
26 |
public $legacy_mode;
|
27 |
public $legacy_textdomain;
|