Changeset 1932557
- Timestamp:
- 08/29/2018 05:02:28 PM (8 years ago)
- Location:
- easify-server-woocommerce/trunk
- Files:
-
- 3 edited
-
easify.php (modified) (1 diff)
-
includes/class-easify-wc-shop.php (modified) (6 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easify-server-woocommerce/trunk/easify.php
r1900399 r1932557 5 5 * Plugin URI: http://www.easify.co.uk/wordpress/ 6 6 * Description: Connects Easify Business Management, EPOS (Electronic Point of Sale) and invoicing software to your WooCommerce enabled WordPress website. Allowing you to keep your online and offline shop's orders and stock control synchronised. 7 * Version: 4.1 17 * Version: 4.12 8 8 * License: GPL2 9 9 * License URI: https://www.gnu.org/licenses/gpl-2.0.html -
easify-server-woocommerce/trunk/includes/class-easify-wc-shop.php
r1879096 r1932557 28 28 * 29 29 * @class Easify_Generic_Shop 30 * @version 4. 930 * @version 4.12 31 31 * @package easify-woocommerce-connector 32 32 * @author Easify … … 146 146 if ($stockLevel > 0) 147 147 { 148 $this->DeleteOutofStockTermRelationship($ProductId); 148 149 update_post_meta($ProductId, '_stock_status', 'instock'); 149 150 } 150 151 else 151 152 { 152 update_post_meta($ProductId, '_stock_status', 'outofstock');153 update_post_meta($ProductId, '_stock_status', 'outofstock'); 153 154 } 154 155 … … 292 293 if ($stockLevel > 0) 293 294 { 295 $this->DeleteOutofStockTermRelationship($ProductId); 294 296 update_post_meta($ProductId, '_stock_status', 'instock'); 295 297 } 296 298 else 297 299 { 298 update_post_meta($ProductId, '_stock_status', 'outofstock');300 update_post_meta($ProductId, '_stock_status', 'outofstock'); 299 301 } 300 302 … … 363 365 if ($stockLevel > 0) 364 366 { 367 $this->DeleteOutofStockTermRelationship($ProductId); 365 368 update_post_meta($ProductId, '_stock_status', 'instock'); 366 369 } 367 370 else 368 371 { 369 update_post_meta($ProductId, '_stock_status', 'outofstock');372 update_post_meta($ProductId, '_stock_status', 'outofstock'); 370 373 } 371 374 … … 381 384 } 382 385 386 private function DeleteOutofStockTermRelationship($product_id) 387 { 388 // 4.12 - WooCommerce inserts an 'outofstock' term when the final product is sold. 389 // Delete term_relationships outofstock when stock becomes available... 390 global $wpdb; 391 $result = $wpdb->get_row("SELECT term_id FROM {$wpdb->terms} WHERE name = 'outofstock'"); 392 $term_id = $result->term_id; 393 $wpdb->query("DELETE FROM {$wpdb->term_relationships} WHERE object_id = " . $product_id . " and term_taxonomy_id = " . $term_id); 394 } 395 383 396 public function DeleteProduct($ProductSKU) { 384 397 Easify_Logging::Log("Easify_WC_Shop.DeleteProduct()"); … … 942 955 Easify_Logging::Log('Easify_WC_Shop->SaveProductImagesToWooCommerce() - getting ready to process' . count($Images) . ' images.'); 943 956 944 // Easify_Logging::Log($Images); // Dumps contents of image array to log957 //Easify_Logging::Log($Images); // Dumps contents of image array to log 945 958 946 959 $imageIds = array(); -
easify-server-woocommerce/trunk/readme.txt
r1900399 r1932557 5 5 Requires at least: 4.0 6 6 Tested up to: 4.9 7 Stable tag: 4.1 17 Stable tag: 4.12 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 100 100 101 101 == Changelog == 102 = 4.12 = 103 * Fixed issue where products that go out of stock, and then come back into stock can be hidden from WooCommerce product search. 102 104 = 4.11 = 103 105 * Fixed basic authorisation could error out when activating plugin on certain … … 136 138 137 139 == Upgrade Notice == 138 = 4.1 1=139 * Fixed basic authorisation could error out when activating plugin on certain140 systems. 140 = 4.12 = 141 * Fixed issue where products that go out of stock, and then come back into stock 142 can be hidden from WooCommerce product search.
Note: See TracChangeset
for help on using the changeset viewer.