From 4f2e4a228e539f82d42f3c9c82ad53aca01d6bf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20=C5=BDoljom?= Date: Sun, 29 Nov 2020 16:41:39 +0100 Subject: [PATCH 1/2] Fix the company name showing on the order and sending taxes option towards api --- src/Request/SoloApiRequest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Request/SoloApiRequest.php b/src/Request/SoloApiRequest.php index ab7d777..c2c7ae0 100644 --- a/src/Request/SoloApiRequest.php +++ b/src/Request/SoloApiRequest.php @@ -127,8 +127,7 @@ public function executeApiCall($order): void $orderBuyer = "$firstName $lastName"; - // If the invoice is R1 the company name is required and used instead of first name and last name. - if (get_option('solo_api_invoice_type') === '2') { + if (!empty($companyName)) { $orderBuyer = $companyName; } @@ -158,7 +157,7 @@ public function executeApiCall($order): void $requestBody = [ 'token' => $token, 'tip_usluge' => $serviceType, - 'prikazi_porez' => $showTaxes, + 'prikazi_porez' => $showTaxes ? 1 : 0, 'kupac_naziv' => esc_attr($orderBuyer), 'kupac_adresa' => esc_attr($orderAddress), ]; From 903679729c8bd004144f708764730b5863982939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20=C5=BDoljom?= Date: Sun, 29 Nov 2020 16:45:46 +0100 Subject: [PATCH 2/2] 2.0.5 version fix --- CHANGELOG.md | 6 ++++++ README.md | 2 +- README.txt | 9 ++++++++- woo-solo-api.php | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be99060..c1cb41d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,12 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a _No documentation available about unreleased changes as of yet._ +## [2.0.5] - 2020-11-29 + +### Fixed + +* Fix the company name showing on the order and sending taxes option towards API. + ## [2.0.4] - 2020-11-28 ### Added diff --git a/README.md b/README.md index 874372f..4fe462f 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ **Requires at least**: 5.1 **Requires PHP**: 7.3 **Tested up to**: 5.5 -**Stable tag**: 2.0.4 +**Stable tag**: 2.0.5 **WC requires at least**: 4.0.0 **WC tested up to**: 4.7.0 **License**: MIT diff --git a/README.txt b/README.txt index f2f2758..a56acdb 100755 --- a/README.txt +++ b/README.txt @@ -4,7 +4,7 @@ Tags: woocommerce, api, solo api, solo, api integration, shop, payment, woo Requires at least: 5.2 Requires PHP: 7.3 Tested up to: 5.5 -Stable tag: 2.0.4 +Stable tag: 2.0.5 WC requires at least: 4.0.0 WC tested up to: 4.7.0 License: MIT @@ -66,6 +66,13 @@ Be sure you have WooCommerce plugin installed first, otherwise you'll get an err == Changelog == += 2.0.5 = +Release Date: November 29th, 2020 + +Fixed: + +* Fix the company name showing on the order and sending taxes option towards API. + = 2.0.4 = Release Date: November 28th, 2020 diff --git a/woo-solo-api.php b/woo-solo-api.php index c614916..25cb618 100755 --- a/woo-solo-api.php +++ b/woo-solo-api.php @@ -10,7 +10,7 @@ * Plugin Name: Woo Solo Api * Plugin URI: https://madebydenis.com/woo-solo-api * Description: This plugin provides integration of the SOLO API service with WooCommerce. - * Version: 2.0.4 + * Version: 2.0.5 * Author: Denis Žoljom * Author URI: https://madebydenis.com * License: MIT