Commit Graph

38 Commits

Author SHA1 Message Date
Peter Fabian 35c63ee475 Added some comments to hopefully make the function a bit clearer. 2019-05-02 20:19:28 +02:00
Mike Jolley 1a1b3e7654 Improved wc_update_product_stock
Allow product object to be passed through, remove cache clearing which is done during save(), and allow the caller to define whether or not an update routine is already in progress.
2019-04-26 17:20:50 +01:00
Mike Jolley 0cd429dad9 Avoid post update in wc_update_product_stock 2019-04-09 12:47:51 +01:00
Mike Jolley 600510ea6f Using wrong post type name in comparison 2019-02-04 13:56:35 +00:00
Gerhard a3f3b282ac Initialise $changes before usage. 2018-11-15 14:36:56 +02:00
Joey Gilham 58cdd7dad2
Merge branch 'master' into master 2018-07-03 15:41:15 +01:00
Joey 4e0412e0d8 removed redundant trigger for low stock notifications 2018-07-03 14:48:53 +01:00
Joey 375ef48186 updated wc_get_low_stock_amount function 2018-07-03 14:42:58 +01:00
Joey cd8416122f removed low stock options for variations, and addressed changes 2018-06-19 12:40:27 +01:00
Mike Jolley e92463632b Held stock qty check for pay page 2018-06-08 16:58:33 +01:00
Mike Jolley d76474789d variable name 2018-06-08 16:30:58 +01:00
Mike Jolley 52854b7690 Add qty to order via modal, include stock qty in formatted name display for reference 2018-06-08 16:18:32 +01:00
Mike Jolley 8084100cbb Tweak meta naming and order notes 2018-06-08 12:18:33 +01:00
Mike Jolley 2657db4a97 Pending should restore stock too 2018-06-07 17:42:58 +01:00
Mike Jolley 70c9cff608 Increase/decrease stock handling 2018-06-07 17:41:36 +01:00
Joey e5800b66b0 updated low_stock_amount fields to use global value if no value is entered 2018-05-27 06:43:23 +01:00
Joey 5f36ba44cd variable product confirmed before processing low stock notifications in function 'wc_update_product_stock' 2018-05-27 05:49:01 +01:00
Joey b08b55a651 added changes for low stock notifications per product 2018-05-27 05:40:58 +01:00
Mike Jolley 06ef8c8589 Hook doc update 2018-05-02 14:28:53 +01:00
Claudio Sanches d20f348d3c Check if $product exists 2018-03-08 18:33:16 -03:00
Claudio Sanches cf9ce1add8 Fixed includes/wc-stock-functions.php PHPCS violations 2018-03-08 16:44:52 -03:00
Mike Jolley 54d4012c33 Use timestamp function 2017-12-07 15:24:57 +00:00
Caleb Burks 6374a13d30 Update a product’s modified_date for stock changes 2017-12-05 00:53:52 -06:00
Rasmus Bengtsson 4f00d7e5e3 PHPDoc: Add missing return statement 2017-05-15 13:37:59 +02:00
Mike Jolley d9a8de7c16 Ensure order object exists and pass through to avoid requery 2017-05-09 18:20:42 +01:00
Beka Rice 1c240bb014 Use order data store for stock checks in case of custom order types 2017-05-08 17:58:01 -04:00
Beka Rice adf0851117 Fix: mark stock as reduced in wc_reduce_stock_levels() 2017-05-04 03:52:38 -04:00
claudiulodro 01a6b3bae0 Get updated product before doing low stock actions 2017-04-19 15:32:51 -07:00
Claudio Sanches 59c2849736 Changed version 2.7 to 3.0 2017-03-15 13:36:53 -03:00
Claudiu Lodromanean 07a021760a 13320 Delete cached object when updating stock 2017-02-23 12:56:34 -08:00
Mike Jolley 88280d7756 Fix: Wrong product object 2017-02-17 16:28:11 +00:00
Mike Jolley a0483a30dc Clear children on stock update
Closes #13218
2017-02-17 16:25:45 +00:00
Mike Jolley 365b456fa5 Make sure product is set. 2017-01-27 16:39:53 +00:00
Manos Psychogyiopoulos af378a619d fix undefined qty_ordered variable 2017-01-03 21:40:06 +02:00
Mike Jolley b1565cf0d6 Download update routine and interface 2016-11-18 19:29:37 +00:00
Justin Shreve 90e43d97de [Product CRUD] Product Datastore (#12317)
* Fix up tests in the product/* folder.

* Handle data store updates for grouped, variable, external, simple, and general data store updates for products.

* Variations & variable changes.

* Update -functions.php calls to use data store.

* Add an interface for the public product data store methods.

* Finished product factory tests

* Correctly delete in the api, fix up some comments, and implement an interface for the public variable methods.

* Fix up delete in all versions of the api

* Handle feedback

* Match protected decloration to parent
2016-11-11 14:31:15 +00:00
Mike Jolley 09ea4ba91f [Product CRUD] Variable, variation, notices, and stock handling (#12277)
* No longer needed

* Remove old todos

* Use getters in admin list

* Related and upsells update for CRUD

* Fix notice in gallery

* Variable fixes and todos

* Context

* Price sync

* Revert variation attributes change

* Return parent data in view context

* Defer term counting

* wc_find_matching_product_variation

* Stock manage tweaks

* Stock fixes

* Correct id

* correct id

* Better sync

* Data logic setter fix

* feedback
2016-11-09 16:10:37 +00:00
Mike Jolley 5f4dbdb733 [Product CRUD] Variations - setters, getters and admin. (#12228)
* Started on variation changes

* Stock functions

* Variation class

* Bulk change ->id to get_id() to fix variation form display

* Missing status

* Fix add to cart

* Start on stored data save

* save variation

* Save_variations

* Variation edit panel

* Save variations code works.

* Remove stored data code and fix save

* Improve legacy class

* wc_bool_to_string

* prepare_set_attributes

* Use wc_get_products

* More feedback fixes

* Feedback fixes
2016-11-09 16:05:49 +00:00