Skip to content

Commit f6b5240

Browse files
FJiskraFilip Jiskra
andauthored
PES-847: other shipping methods support (#245)
Co-authored-by: Filip Jiskra <[email protected]>
1 parent 6c123c0 commit f6b5240

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

packeta.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Plugin Name: Packeta
1010
* Description: This is the official plugin, that allows you to choose pickup points of Packeta and its external carriers in all of Europe, or utilize address delivery to 25 countries in the European Union, straight from the cart in your e-shop. Furthermore, you can also submit all your orders to Packeta with just one click.
11-
* Version: 1.3.1
11+
* Version: 1.3.2
1212
* Author: Zásilkovna s.r.o.
1313
* Author URI: https://www.zasilkovna.cz/
1414
* Text Domain: packeta

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: packeta
33
Tags: WooCommerce, shipping
44
Requires at least: 5.3
55
Tested up to: 6.0
6-
Stable tag: 1.3.1
6+
Stable tag: 1.3.2
77
Requires PHP: 7.2
88
WC requires at least: 4.5
99
WC tested up to: 6.5.1
@@ -61,6 +61,9 @@ We are constantly working on adding new features. You can find a list of feature
6161
Please contact us at [email protected] .
6262

6363
== Changelog ==
64+
= 1.3.2 =
65+
* Fixed: Other shipping methods support
66+
6467
= 1.3.1 =
6568
* Fixed: Order product loading for age verification service
6669
* Updated: For each order is a separate Packeta log

src/Packetery/Module/Checkout.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,11 @@ public function renderHiddenInputFields(): void {
349349
* Checks if all pickup point attributes are set, sets an error otherwise.
350350
*/
351351
public function validateCheckoutData(): void {
352+
$chosenMethod = $this->getChosenMethod();
353+
if ( false === $this->isPacketeryOrder( $chosenMethod ) ) {
354+
return;
355+
}
356+
352357
$post = $this->httpRequest->getPost();
353358
if ( ! wp_verify_nonce( $post['_wpnonce'], self::NONCE_ACTION ) ) {
354359
wp_nonce_ays( '' );
@@ -391,7 +396,6 @@ public function validateCheckoutData(): void {
391396
}
392397

393398
if ( $this->isHomeDeliveryOrder() ) {
394-
$chosenMethod = $this->getChosenMethod();
395399
$carrierId = $this->getCarrierId( $chosenMethod );
396400
$optionId = self::CARRIER_PREFIX . $carrierId;
397401
$carrierOption = get_option( $optionId );

src/Packetery/Module/Plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030
class Plugin {
3131

32-
public const VERSION = '1.3.1';
32+
public const VERSION = '1.3.2';
3333
public const DOMAIN = 'packeta';
3434
public const MIN_LISTENER_PRIORITY = -9998;
3535

0 commit comments

Comments
 (0)