Commit Graph

54 Commits

Author SHA1 Message Date
Rodrigo Primo 6ec2b26972 Update WordPress.DB.PreparedSQL.NotPrepared sniff name
The latest version of WPCS that was added to WC last week, changed the name of some sniffs. This commit updates the name of one of those sniffs from WordPress.WP.PreparedSQL.NotPrepared to WordPress.DB.PreparedSQL.NotPrepared.
2018-11-23 15:10:52 -02:00
Rodrigo Primo 57f44798cb Fix phpcs violations automatically using phpcbf 2018-11-23 12:57:51 -02:00
Mike Jolley 5e14953796 Avoid price setting when synced with children 2018-06-11 11:44:58 +01:00
Mike Jolley 8e0f0cbc29 Lazy load children and attributes for variable products 2018-05-01 11:57:00 +01:00
Mike Jolley a5a6d02f86 Fix null check introduced by phpcs changes 2018-03-13 11:57:51 +00:00
Rodrigo Primo 71043bdc0e PHPCS fixes in includes/data-stores/class-wc-product-variable-data-store-cpt.php 2018-03-08 15:33:02 -03:00
Rodrigo Primo 2b5103c849 Fix phpcs violations using phpcbf 2018-03-08 14:30:43 -03:00
Mike Jolley c3623a9967 Update docblock for $include_taxes
Closes #18053
2017-12-07 11:46:35 +00:00
claudiulodro a878b0cde5 Some phpcs 2017-11-22 14:03:26 -08:00
claudiulodro 9ec24731bb Generalize child_is_in_stock 2017-11-21 15:06:35 -08:00
claudiulodro a73436bdcd Merge remote-tracking branch 'origin/master' into HEAD 2017-11-20 14:43:12 -08:00
claudiulodro cebe335dda Update routine 2017-11-20 14:21:08 -08:00
claudiulodro 03d51e5471 Tweak variable on backorder logic 2017-11-20 11:32:30 -08:00
claudiulodro b64b26d030 Variable products are on backorder if all children are backordered 2017-11-20 11:19:06 -08:00
Mike Jolley a23541ad5d Fix 4.9 conflict with variation names
`santiize-title` works differently with `/` chars in 4.9. This update
routine keeps variations functioning by doing a DB update on read.

Fixes #17775
2017-11-18 14:53:18 +00:00
claudiulodro dddf0ee473 Variable product sync 2017-11-17 08:46:49 -08:00
Mike Jolley 11d0293ddd non-enabled children should not be ignored
This fixes #17713 by also returning private children (non-enabled).
2017-11-16 11:56:51 +00:00
Rodrigo Primo a3f14c7256 Caches call to load product variation attributes
This commit adds product variation attributes to WP cache when they are first loaded to avoid running the same database queries when the same product is loaded multiple times. This cache will be invalidated whenever product attributes are changed.

Fixes #17120
2017-10-27 10:01:23 -02:00
Rodrigo Primo fb70ae3fea Coding standards fixes 2017-10-25 17:53:17 -02:00
Mike Jolley 3faa1c1ee9 Unset variable prices on read.
Closes #16145
2017-07-20 12:48:14 +01:00
Jaydeep Rami 3522857d23 Fix typo in WooCommerce plugin (#16135)
* Fixed typo

* Fixed more typo

* Fixed more typo

* Fix tyop

* Fix more typo

* Fix more typo

* Fix typo

* Fix typo

* Fix typo

* Fix typo datatime object

* Fix short name of compat

* Fix typo: update short name

* Fix typo "deactive" to "deactivate" and short BW - Compat

* Fix typo "Backwards compat"

* Fix typo 'parameters'

* Fix more typo 'pararmeters'

* Fix typo 'compund'

* FIx typo order

* Fix typo

* Fix typo 'incorrecly'

* Fix typo 'genarate'

* Fix typo 'reletive'

* Fix typo 'Handly'

* Fix typo 'rotatated'

* Fix typo

* Fix typo 'additonal'

* Fix typos
2017-07-17 11:10:52 +01:00
Rasmus Bengtsson 185934fad9 Fix phpdoc to include params and correct types 2017-05-15 13:50:52 +02:00
Mike Jolley 8f2287be12 Use get_children for comparison 2017-04-06 19:47:22 +01:00
Mike Jolley a7a896008c Fix up the child_is_in_stock function 2017-04-06 12:26:19 +01:00
Mike Jolley 359213d720 Fix direction 2017-04-05 20:25:21 +01:00
Mike Jolley 0035afc5a0 Make sure we have number > 0 so all variations are not deleted 2017-04-05 20:22:05 +01:00
Mike Jolley 12e28a83f3 WC_Product_Variable_Data_Store_CPT::read_variation_attributes() cast to int 2017-03-31 11:37:12 +01:00
Mike Jolley 3c008b8a56 Check for null 2017-03-28 17:26:58 +01:00
Claudiu Lodromanean 89128da8ba Fix child_has_dimensions 2017-03-27 11:52:03 -07:00
Claudio Sanches c856abba3e Change default WordPress auto-draft title for product
This helps handle variations title while syncing variations.

Using a translatable string can led to errors, like a auto-draft started
by an user with WP admin set up as pt_BR and published by an user in
en_GB.
2017-03-15 15:12:49 -03:00
Claudio Sanches dfd2d7387c Revert 71ecb57 2017-03-15 14:08:41 -03:00
Claudio Sanches 71ecb57d2d Fixed missing text domain 2017-03-15 13:59:18 -03:00
Claudio Sanches 59c2849736 Changed version 2.7 to 3.0 2017-03-15 13:36:53 -03:00
Mike Jolley a5c10d07c1 Fix is_purchasable (requires save) when price is null
Fixes #13043
2017-03-09 13:26:12 +00:00
Mike Jolley 41a4bdb181 Fix trashed variation cleanup
Fixes #13388
2017-02-28 15:38:11 +00:00
Mike Jolley 84a4c3415c Handle auto drafts
Fixes #13361
2017-02-27 14:40:48 +00:00
Mike Jolley 718149f1d4 Merge pull request #12999 from thenbrent/add_sort_variation_prices
Move price sorting into WC_Product_Variable::sort_variation_prices()
2017-02-08 10:29:30 +00:00
Brent Shepherd 8431b2ac86 Remove 'edit' param on get_visible_children()
The WC_Product_Variable::get_visible_children() method accepts no parameters.
2017-02-03 14:53:03 -08:00
Brent Shepherd e7e434da4b WC_Product_Variable::sort_variation_prices()
To keep variation sorting logic inside the variable product, and separate
from the database storage logic in WC_Product_Variable_Data_Store_CPT
2017-01-26 12:47:46 -08:00
Brent Shepherd 1ac2c1a94f Move price hash to separate function
So that it can be used by child classes without copy/pasting code.
2017-01-23 11:57:49 -08:00
Brent Shepherd ff627b31f6 Make variable data store private methods protected
So they can be inherited by other variable product types, like
variable subscriptions.
2017-01-20 11:09:49 -08:00
Mike Jolley 80f79ae98d Trash and untrash variations handling
Fixes #12774
2017-01-11 15:41:19 +00:00
Mike Jolley de11be2b6c space 2017-01-11 12:37:03 +00:00
Mike Jolley 9706104128 Fix test case 2017-01-11 12:33:38 +00:00
Mike Jolley 8e7687b9fc Add method to delete variations 2017-01-11 11:48:39 +00:00
Mike Jolley 5dba3d5bfe Sync variation names 2017-01-04 15:18:02 +00:00
Mike Jolley ceee6c37ca Change how non-crud props get stored 2016-12-23 14:06:51 +00:00
Mike Jolley 2c6bef3ce1 Reverse query so missing stock status meta does not break sync
Fixes #12567
2016-12-12 13:37:51 +00:00
Mike Jolley 12608af03a Sorting handling 2016-12-08 14:28:51 +00:00
Mike Jolley 47fbae4d26 Product Visibility Taxonomies (#12527)
* Convert visibility and featured to taxonomy

* Comment

* Add missing tax_queries

* Only check SKU after read.

* Added visibility term for outofstock products to speed those queries up al

* wc_bool_to_string
2016-12-08 10:56:45 +00:00