Commit Graph

119 Commits

Author SHA1 Message Date
Justin Shreve bcae6fb1d6 REST API CRUD Updates 2016-11-09 15:47:23 +00:00
Mike Jolley 611ac8b651 [Product CRUD] Product crud terms (#12149)
* Category and tag id handling

* Replace template functions

* Remove todo

* Handle default name in save function
2016-11-09 15:41:48 +00:00
Mike Jolley f57601d755 Price handling 2016-11-09 15:41:08 +00:00
Mike Jolley 67c01ff101 wc_get_price_to_display 2016-11-09 15:41:08 +00:00
Mike Jolley 38ab3d63f6 get_price_including_tax/excluding_tax functions 2016-11-09 15:40:52 +00:00
Mike Jolley ac9574e25e wc_get_product_term_ids instead of related wording and use in other places.
get_the_terms is used here and also handles caching, something
wp_get_post_terms does not.
2016-11-09 15:38:44 +00:00
Mike Jolley 68282e9661 Remove unneeded comments 2016-11-09 15:38:44 +00:00
Mike Jolley 34f579cfc4 Sanitize ids later 2016-11-09 15:38:27 +00:00
Claudio Sanches a5cf2922ee Use count() instead of sizeof() 2016-11-09 15:38:27 +00:00
Claudio Sanches 1c73ffb3f6 Fixed wrong variable in wc_get_related_terms 2016-11-09 15:38:27 +00:00
Claudio Sanches ee82a198da Get cached terms from wc_get_related_terms() 2016-11-09 15:38:27 +00:00
Claudio Sanches f5c42c60c8 Fixed coding standards and improved the docblocks 2016-11-09 15:38:27 +00:00
Mike Jolley 3b3a83df8e Add related product functions and deprecate those in class. 2016-11-09 15:38:27 +00:00
Claudio Sanches 8339e9ca25 Introduces wc_get_min_max_price_meta_query() function 2016-10-14 11:19:20 +01:00
Claudio Sanches d627d7f764 Created function to get the catalog visibility options 2016-10-11 14:11:37 +01:00
Claudio Sanches 226482baf5 Fixed coding standards 2016-10-04 14:36:18 -03:00
Toros Tarpinyan 4c61ed03e5 fix comment spacing 2016-10-04 11:20:49 -04:00
Toros Tarpinyan 2fc3c62943 fix issue 12004 (sales price does not automatically revert to regular price on the store front at the end of the sales event) 2016-10-04 08:25:12 -04:00
Claudio Sanches e0572c782d Included @since in wc_get_product() 2016-09-21 20:19:04 -03:00
Aristeides Stathopoulos 734f284fa4 WordPress.PHP.YodaConditions.NotYoda 2016-09-08 01:32:24 +03:00
Mike Jolley 311c540662 Merge pull request #11833 from aristath/master
Coding Standards (2nd pass)
2016-09-07 10:14:17 +01:00
Mike Jolley 0c78ed7f9b [2.6] Start sale on variation save if applicable
Fixes #11804
2016-09-06 11:37:20 +01:00
Aristeides Stathopoulos d4e3faf014 PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket 2016-09-02 04:51:31 +03:00
Aristeides Stathopoulos 82f3cc221e WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis 2016-08-27 07:23:02 +03:00
Aristeides Stathopoulos 58b9df6564 WordPress.Arrays.ArrayDeclaration.NoSpaceAfterOpenParenthesis 2016-08-27 05:23:54 +03:00
Aristeides Stathopoulos ec8a0b288b PHPCS: WordPress.Arrays.ArrayDeclaration.NoCommaAfterLast 2016-08-27 05:08:49 +03:00
Aristeides Stathopoulos b063bcfe4c last item in a multiline-array should end in a comma 2016-08-27 04:46:45 +03:00
Scrutinizer Auto-Fixer 7cef8ae4c9 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2016-06-06 16:50:18 +00:00
Mike Jolley c0dc352df1 Clear parent transients when clearing own transients
Fixes #10996
2016-05-27 11:12:23 +01:00
Mike Jolley fce8dc0868 Ensure alt text is set for product attachments
@claudiosmweb Fixes #10822
2016-05-03 16:41:51 +01:00
Mike Jolley e2139a5c5e Clear prices transient for variable products after scheduled sale. 2016-03-31 12:03:03 +01:00
Mike Jolley 83d2f64e9e Tweak wc_get_product_variation_attributes to ignore non variation attributes 2016-02-25 14:13:56 +00:00
Mike Jolley 5ddc0b1a9a [2.5] Fix CLI when setting a single category
Fixes #10409
2016-02-23 11:32:18 +00:00
Shiva Poudel db50998f80 Period in comments 2016-02-12 23:58:23 +05:45
Shiva Poudel 70c755c09e Can remove parent assignment as its not used 2016-02-12 23:50:06 +05:45
Fredrik Forsmo 676525c2b7 Improve docblock comments in various functions
* Added missing param tags to functions
* Added comments to `wc_get_attachment_image_attributes` and
`wc_prepare_attachment_for_js`
* Fixed return type value for functions where it says bool but the code
returns array
* Renamed boolean to bool
2016-01-06 17:11:09 +01:00
Mike Jolley 9890c18b5d Notice if called early.
Closes #9923
2016-01-04 10:43:51 +00:00
Mike Jolley 4b87b0fbdc [2.4] Fix SKU slash madness
Fixes #9721
2015-12-02 11:22:11 +00:00
Mike Jolley 3b409f1bbf For coupons with category restrictions, respect the category hierarchy.
Closes #9704
2015-11-30 12:29:16 +00:00
Mike Jolley 3082c5bba6 wc_related_ and get_related method tweaks
Remove use of multiple expiring transients. See function docblock for
explanation.
2015-11-13 21:14:42 +00:00
Mike Jolley 70d9f58811 Version not needed for wc_var_prices
This transient doesn’t need to expire often because the hashes will be
unique if taxes change.

This change means a variable product will only use 1 transient rather
than many.
2015-11-13 20:01:42 +00:00
Nicola Mustone c9da4f928a check if ABSPATH is defined 2015-11-06 10:22:19 +01:00
Claudio Sanches 5893875b0c Removed period for file headers 2015-11-03 11:53:50 -02:00
Claudio Sanches ee30b5b308 Fixed php docs standards 2015-11-03 11:31:20 -02:00
Claudio Sanches 52787c282c [2.3] Prevent "Trying to get property of non-object" in Sensei 2015-09-18 02:18:15 -03:00
Mike Jolley 9330176865 Flush product cache so prices are regenerated
Fixes #8851
2015-08-17 14:19:58 +01:00
Mike Jolley d9f9da955d empty checking 2015-08-13 16:58:23 +01:00
Mike Jolley cbb89fa4b9 wc_get_product_variation_attributes should only get parent attributes which are for variations.
Closes #8796
2015-08-12 18:02:13 +01:00
George Stephanis c938fa24da More missing esc_attr calls, :( 2015-08-05 15:17:52 -04:00
Mike Jolley 060fb16e2e Move Pre 2.4 handling for attributes - DRY
@claudiosmweb @franticpsyx
2015-07-28 16:20:51 +01:00