Skip to content

Commit

Permalink
Merge pull request #54 from dingo-d/develop
Browse files Browse the repository at this point in the history
2.0.5 fix
  • Loading branch information
dingo-d committed Nov 29, 2020
2 parents 466154e + 9036797 commit e7eeba0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
5 changes: 2 additions & 3 deletions src/Request/SoloApiRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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),
];
Expand Down
2 changes: 1 addition & 1 deletion woo-solo-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e7eeba0

Please sign in to comment.