Skip to content

Handle null values when creating shipment #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Plugin Name: Sendy
Plugin URI: https://app.sendy.nl/
Description: A WooCommerce plugin that connects your site to the Sendy platform
Version: 3.1.1
Stable tag: 3.1.1
Version: 3.1.2
Stable tag: 3.1.2
License: MIT
Author: Sendy
Author URI: https://sendy.nl/
Expand Down Expand Up @@ -61,6 +61,9 @@ Hierop zijn onze [algemene voorwaarden](https://sendy.nl/algemene-voorwaarden/)

== Changelog ==

= 3.1.2 =
* Fix an error when creating a shipment

= 3.1.1 =
* Fix an error message when synchronizing shipping methods

Expand Down
2 changes: 1 addition & 1 deletion sendy.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: Sendy
* Plugin URI: https://app.sendy.nl/
* Description: A WooCommerce plugin that connects your site to the Sendy platform
* Version: 3.1.1
* Version: 3.1.2
* Author: Sendy
* Author URI: https://sendy.nl/
* License: MIT
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/Orders/OrdersModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected function create_shipment_with_smart_rules(\WC_Order $order, bool $exec
'reference' => $order->get_id(),
'order_date' => $order->get_date_created()->format(\DateTimeInterface::RFC3339),
'options' => [],
'shippingMethodId' => $shippingMethod->get_instance_id(),
'shippingMethodId' => $shippingMethod ? $shippingMethod->get_instance_id() : null,
];

$this->addAddressToRequest($order, $request);
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class Plugin
{
public const VERSION = '3.1.1';
public const VERSION = '3.1.2';

public const SETTINGS_ID = 'sendy';

Expand Down
Loading