Skip to content

Commit

Permalink
2.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
fahadmahmood8 committed Oct 22, 2024
1 parent 4e45143 commit 9b16164
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/readme.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
=== Stock Locations for WooCommerce ===
Contributors: fahadmahmood,alexmigf
Contributors: fahadmahmood,alexmigf,invoicepress
Tags: woocommerce, stock, stock locations, simple product, variable products
Requires at least: 4.9
Tested up to: 6.5
Tested up to: 6.6
Requires PHP: 7.2
Stable tag: __STABLE_TAG__
License: GPLv2 or later
Expand Down Expand Up @@ -160,6 +160,9 @@ On settings page you can define a number. If location stock value will be less t


== Changelog ==
= 2.7.5 =
Fix: when metadata is missing for a stock location quantity is an empty string instead of 0 and $remainingQty - '' is causing this error. https://github.com/fahadmahmood8/stock-locations-for-woocommerce/issues/161 [Thanks to @pintend][22/10/2024]

= 2.7.4 =
- Fix: Number of products to update on admin_init reduced to 25 from 50 and made it conditional with if cron is OFF. [Thanks to Simon][14/06/2024]

Expand Down
4 changes: 2 additions & 2 deletions src/src/helpers/helper-slw-stock-allocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ public static function getProductStockLocations( $product, $needMetaData = true,
}else{

if ($product->get_manage_stock() === true) {
$locations[$idx]->quantity = $product->get_meta('_stock_at_' . $location->term_id, true);
$locations[$idx]->quantity = (int)$product->get_meta('_stock_at_' . $location->term_id, true);
} elseif($product->get_manage_stock() === 'parent') {
$locations[$idx]->quantity = $parentProduct->get_meta('_stock_at_' . $location->term_id, true);
$locations[$idx]->quantity = (int)$parentProduct->get_meta('_stock_at_' . $location->term_id, true);
} else {
$locations[$idx]->quantity = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/stock-locations-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@

class SlwMain{
// versions
public $version = '2.7.4';
public $version = '2.7.5';
public $import_export_addon_version = '1.1.1';

// others
Expand Down

0 comments on commit 9b16164

Please sign in to comment.