Commit Graph

690 Commits

Author SHA1 Message Date
Fulvio Notarstefano e68aa7c027 [#20404] Address code review feedback 2018-06-07 23:33:13 +09:00
Mike Jolley 86993a4f70 Merge branch 'master' into update/13624 2018-06-07 10:30:52 +01:00
Fulvio Notarstefano 264c83a166 [#20404] Fix custom webhook topic selection in dropdown 2018-06-06 11:26:33 +09:00
Claudiu Lodromanean a4b9346f66
Merge pull request #19969 from robertdevore/master
Add three new action hooks for admin shipping zone methods
2018-05-31 20:25:34 +01:00
Robert DeVore ecdf6c3be0
Removed two action hooks 2018-05-30 15:53:04 -04:00
Mike Jolley 814c62aaf2 merge master 2018-05-30 14:35:32 +01:00
Mike Jolley 03dfd9b262 Remove . from strings 2018-05-21 17:02:33 +01:00
Mike Jolley 1ff5520512 Pass through JSON context when getting zones for JSON responses and scripts 2018-05-09 17:41:33 +01:00
Robert DeVore a3c4f42729
Updated tab spacing for action hook 2018-05-07 14:42:05 -04:00
Claudiu Lodromanean bda8732c6f
Merge pull request #19974 from woocommerce/update/payment-method-columns
Updates table styling and columns
2018-05-07 11:23:49 -07:00
Mike Jolley cf9fa5b3ff Updates table styling and columns 2018-05-04 18:48:41 +01:00
pierrebuet 3850f4f13a Diverse typos 2018-05-04 16:57:01 +02:00
Robert DeVore 79b710cca1 📦 NEW: Three action hooks for admin shipping zone methods 2018-05-04 09:16:36 -04:00
Mike Jolley 2f8f30cd29 Make some strings easier to translate for translators 2018-05-03 14:50:39 +01:00
Mike Jolley e807c6151f Merge branch 'master' into update/erasure-requests 2018-05-02 14:06:47 +01:00
Mike Jolley 43f6a5114c Typos and unused variables 2018-05-01 13:54:18 +01:00
Mike Jolley f59acf1350 Merge branch 'master' into update/erasure-requests 2018-05-01 13:46:53 +01:00
Mike Jolley 3c34394296 Set more defaults to reduce query count 2018-05-01 12:15:57 +01:00
Mike Jolley 9d23ebf4e3 This setting should be autoloaded as it's used in the catalog. 2018-05-01 11:56:22 +01:00
Mike Jolley 6f6f15d22a Link to erasure page 2018-04-30 15:41:38 +01:00
Mike Jolley c765ce644d Inactive account handling 2018-04-30 15:38:45 +01:00
Mike Jolley e15a4f63a0 Update defaults so account creation is disabled until setup by admin 2018-04-26 11:50:15 +01:00
Mike Jolley 30a8785ff4 Add up/down buttons 2018-04-24 19:26:17 +01:00
Mike Jolley c8005a8c00 Wording updates 2018-04-24 16:47:55 +01:00
Mike Jolley f71ffb5f5e Added erasure code and moved into separate classes. 2018-04-20 16:47:58 +01:00
claudiulodro c15cb09700 Resolve merge conflicts 2018-04-18 09:46:15 -07:00
claudiulodro 63972447cb Fix nonexistent function calls 2018-04-18 09:40:23 -07:00
Mike Jolley d381330a91
Merge pull request #19705 from woocommerce/fix/19619
Handling of PHP's automatic array key conversion to int
2018-04-18 15:40:31 +01:00
Mike Jolley 30ba25d535 Remove defaults 2018-04-18 11:24:07 +01:00
Mike Jolley 6c5d4c7cda Add privacy settings 2018-04-17 18:32:31 +01:00
Mike Jolley 314d949d2c Background process to cleanup 2018-04-17 15:21:03 +01:00
Peter Fabian 7861d7b95f Changed usage of selected with in_array to wc_selected. 2018-04-17 13:24:39 +02:00
Mike Jolley d8814f9381 tip alignment 2018-04-17 12:19:01 +01:00
Mike Jolley 27cf41bbf0 Added personal data cleanup settings 2018-04-17 11:45:24 +01:00
Mike Jolley 78f96fcd40 Hook mapping/bw compat 2018-04-16 14:27:03 +01:00
Mike Jolley 1b34cd4745 Moved settings tabs around to allow for privacy page. 2018-04-12 16:59:42 +01:00
Mike Jolley 7080989081 Move coupon settings to general settings 2018-04-12 11:13:15 +01:00
Mike Jolley eb886c924e Rename option tabs 2018-04-12 11:13:01 +01:00
Mike Jolley 01be034279 Disable geolocation if using legacy php #19548 2018-03-29 17:04:31 +01:00
Mike Jolley 4bbdf30794 Reload gateways after updating the order. Fixes #19401 2018-03-15 12:39:30 +00:00
Mike Jolley e86ae89123 phpcs 2018-03-15 12:36:10 +00:00
Rodrigo Primo 23b69eba53 Use phpcbf to fix coding standard violations in includes/admin
After using phpcbf to fix the coding standard violations, I did some manual adjustments to the changes, especially in poorly indented files.
2018-03-05 16:21:35 -03:00
Claudio Sanches fe83dfdba7 Merge branch 'master' into fix/18545 2018-02-21 19:15:45 -03:00
Mike Jolley 0996264e7a
Merge pull request #18609 from woocommerce/fix/18608-add-missing-action-settings-save
Add missing action for settings pages that override save method
2018-02-19 14:43:58 +00:00
Mike Jolley b6ae08a72a Duplicate action 2018-02-19 14:43:28 +00:00
Mike Jolley d5d4f4199e
Merge pull request #18917 from shivapoudel/fix-status
Fix - Help tip for webhook status
2018-02-12 12:09:03 +00:00
Tareq Hasan b5ea65b604 Shipping zone documentation help link was printing wrong 2018-02-12 17:17:23 +06:00
Shiva Poudel 71495cef69 Fix - Help tip for webhook status 2018-02-10 02:33:00 +05:45
Mike Jolley 815e0d14fd
Merge pull request #18816 from woocommerce/fix/18815
Use add query arg in customizer links
2018-02-06 11:10:53 +00:00
Mike Jolley 9ff0a9717f Adjust query arg 2018-02-06 11:10:28 +00:00
claudiulodro 0c98f5d874 Remove extra ?> 2018-02-05 13:10:50 -08:00
Mike Jolley 0ad37a6426 Use add query arg in customizer links 2018-02-05 17:10:39 +00:00
Caleb Burks 9d062f8d82 Add notice for moved store notice setting 2018-02-02 14:32:37 -05:00
Claudio Sanches 9c6141b6f6
Merge pull request #18066 from woocommerce/fix/legacy-api-notice
Updated API settings making clear that is from our legacy REST API
2018-02-02 14:42:32 -02:00
Gerhard Potgieter 3e14fd41c4 Update help text for shipping wildcards. Update to #18611 2018-01-29 17:32:55 +02:00
Gerhard Potgieter 057c87c457 Add missing woocommerce_update_options_ action for settings classes save methods overridden from parent. 2018-01-26 11:22:09 +02:00
Mike Jolley db73de335a Add notice for moved settings 2018-01-24 17:18:28 +00:00
Mike Jolley 3ce51d9791 JSON context 2018-01-22 14:11:43 +00:00
Mike Jolley a110180643 Saving taxes should invalidate caches. 2018-01-18 17:47:26 +00:00
Mike Jolley 7a7995f697 Revert price formatting changes which break in RTL 2018-01-12 14:16:18 +00:00
Frédéric Demarle 52d7d136d6 Remove useless translators comment 2017-12-12 20:49:10 +01:00
Caleb Burks 53873857ef Move three display settings to customizer 2017-12-11 22:30:14 -06:00
Claudio Sanches 0c36ab23cf Updated API settings making clear that is from our legacy REST API 2017-12-07 19:53:40 -02:00
Claudio Sanches 2f6f6112c2 Merge branch 'master' into feature/webhook-crud 2017-12-07 18:21:52 -02:00
Claudio Sanches a56018b967 Removed webhook custom topic input and included better error messages 2017-12-05 16:07:36 -02:00
Gerhard Potgieter 98a382174c Merge branch 'feature/webhook-crud' into feature/webhook-delivery-logging 2017-11-17 08:48:57 +02:00
Claudio Sanches 9fe0c7261e Merge branch 'master' into feature/webhook-crud 2017-11-16 12:20:22 -02:00
Gerhard Potgieter 3524ed2cf0 Merge branch 'master' of github.com:woocommerce/woocommerce into feature/webhook-delivery-logging 2017-11-15 14:28:14 +02:00
Mike Jolley 992d6e3aed Dump old settings 2017-11-14 16:36:18 +00:00
Mike Jolley 79d918d33e Merge branch 'feature/unsupported-theme' into update/move-settings-to-customizer-17148
# Conflicts:
#	assets/css/admin-rtl.css
#	assets/css/admin.css
#	assets/css/woocommerce-rtl.css
#	assets/css/woocommerce.css
2017-11-14 16:02:02 +00:00
Mike Jolley bc16a85d22 Cropping settings 2017-11-14 16:01:36 +00:00
Mike Jolley 5adb1edef5 Since options are hidden, remove notices for now - allow use. 2017-11-10 16:26:33 +00:00
Claudio Sanches 74d86cf105 Fixed how update at date displays 2017-11-10 12:37:49 -02:00
Claudio Sanches 30fe4f5ab3 Fixed how check for webhooks dates 2017-11-10 12:34:25 -02:00
Claudio Sanches f60b814dd4 Stop creating webhooks when hit the "Add webhook" button
Creates only after save edited webhook.
2017-11-10 11:33:53 -02:00
Gerhard Potgieter ea73b0851d Remove old webhook log views & deprecate accompanying functions 2017-11-10 08:54:29 +02:00
Mike Jolley d765e2319c Added theme support vars for grid settings
- product_grid
   - min_rows
   - max_rows
   - min_columns
   - max_columns

If settings violate these, they will be updated.

If loop_shop_columns is defined, settings are hidden with a notice.
2017-11-09 18:11:35 +00:00
Mike Jolley 2a3ace9853 Merge branch 'master' into feature/17550-archives-template-support 2017-11-09 17:34:57 +00:00
Mike Jolley 6e08ff0284
Merge pull request #17610 from woocommerce/update/17557
Theme support to declare image sizes
2017-11-09 16:04:22 +00:00
Claudio Sanches f57ee1e792 Removed "trash" actions and included new "delete" actions 2017-11-09 12:07:44 -02:00
Claudio Sanches 77cb885403 Properly allow to POST data in table list without trigger save settings 2017-11-09 11:03:52 -02:00
Claudio Sanches 4c4f0c34d5 New settings REST API file 2017-11-09 11:00:11 -02:00
Mike Jolley 23aa0277d2 Rows and cols 2017-11-09 12:37:14 +00:00
Mike Jolley cf448398cd Update API 2017-11-07 19:08:06 +00:00
Mike Jolley e025caf177 Widths and aspect ratios 2017-11-07 18:32:43 +00:00
Claudio Sanches eada69b241 Merge branch 'feature/webhook-crud' into feature/12439-2 2017-11-07 12:42:50 -02:00
Mike Jolley 2fd540fdf6 Fix theme support checks 2017-11-07 12:33:58 +00:00
Mike Jolley 2f640a1e19 Hide image settings if the theme defines them 2017-11-07 11:04:15 +00:00
Gerhard Potgieter 3109b11dbe input to button for submit in html-webhook-edit.php 2017-11-07 10:23:23 +02:00
Gerhard Potgieter 8b7320dcd6 PHPCS fixes for html-webhook-edit.php 2017-11-07 10:20:51 +02:00
Gerhard Potgieter 416fb697f9 input to button for submit in html-admin-page-shipping-zone-methods.php 2017-11-07 10:14:44 +02:00
Gerhard Potgieter fcd9b206ff PHPCS fixes for html-admin-page-shipping-zone-methods.php 2017-11-07 10:11:19 +02:00
Gerhard Potgieter a8dab20cf8 input to button for submit in html-admin-page-shipping-classes.php 2017-11-07 10:05:32 +02:00
Gerhard Potgieter 7c8cb1150f PHPCS fixes for html-admin-page-shipping-classes.php 2017-11-07 10:03:43 +02:00
Mike Jolley 9c096b419f Merge branch 'pr/17435' 2017-11-01 13:10:37 +00:00
Mike Jolley 43ba326ed9 Fix currency position with rtl symbols 2017-10-31 12:22:18 +00:00
Ryan Halliday 671b602db6 Added `{site_title}` replacement to Email footer 2017-10-28 15:18:53 +13:00
Mike Jolley 9d2a493cea Prevent notice on settings page when accessing invalid tab
Closes #17367
2017-10-25 12:51:19 +01:00
Claudio Sanches f9fdbd19e0 Apply Webhooks CRUD and fixed coding standards in html-webhooks-edit.php 2017-10-13 18:01:18 -03:00
Mike Jolley 0908bc0b13 phpcs 2017-10-12 11:26:55 +01:00
Claudio Sanches 19fed02c50 Always 'post' on API since there is no more Trash for webhooks 2017-10-11 18:15:07 -03:00
Claudio Sanches 4c26dfa4be Fixed coding standards in includes/admin/settings/class-wc-settings-api.php 2017-10-11 18:14:50 -03:00
James Koster e26302b1ff Nothing to be translated any more! 2017-10-04 13:11:44 +01:00
James Koster 7c05dde430 Remove "Powered by WooCommerce" credit in default email footer text setting. closes #17053 2017-10-04 12:40:18 +01:00
Rami Yushuvaev ff289f3bf4 i18n: Avoid using HTML tags in translation strings
This PR moves the `<code>` HTML tags from the translation strings.

It also moves the server variables outside of the translation string, because translators can accidentally translate it wrong.
2017-08-23 16:22:52 +03:00
Mike Jolley 95cc51ae5c Swap to text input for tax rate %, and format as decimal.
Closes #16524
2017-08-21 12:49:23 +01:00
Jeroen Sormani 607cd878e0 Settings parent construct (#16412)
* Miscellaneous cleanup of typos + change some return types for IDE helpers

* Call/use parent::__construct() to add filters for settings output, saving
2017-08-11 21:36:35 -03:00
claudiulodro 863193bd34 Fix linting problems 2017-07-06 11:12:02 -07:00
Caleb Burks 02ffdaf8f5 Remove unnecessary variable
Don’t this change any longer. Got rid of a foreach loop that was using it.
2017-07-04 01:44:10 -05:00
Caleb Burks c7693b201d Require T&Cs be a different page than checkout 2017-07-04 01:36:34 -05:00
Mike Jolley 77c938202f Merge branch 'add/15602-store-street-level-address'
# Conflicts:
#	assets/css/admin-rtl.css
#	assets/css/admin.css
2017-06-30 15:00:51 +01:00
Mike Jolley d6131f3a74 Field styling 2017-06-30 14:59:45 +01:00
Mike Jolley 277ccf0ad7 Merge pull request #15677 from ughimire/no-std
Tweak - Added remove icon on my account page dropdown of account page
2017-06-29 22:55:10 +01:00
Mike Jolley 33a4e74697 Prevent duplicate sections in tax and api endpoints 2017-06-27 14:58:33 +01:00
Mike Jolley 43dc9ec823 Fix method title escaping in zones
Closes #15754
2017-06-23 12:50:32 +01:00
Allen Snook 61a8d858b5 Update address labels in settings to better match customer address labelling 2017-06-19 11:28:42 -07:00
Umesh Ghimire 3f2742fd6f Tweak - Add remove icon on Account page my account page dropdown 2017-06-19 12:59:12 +05:45
Allen Snook 21d2bee658 Add store street, city and postcode fields to settings > general 2017-06-15 09:56:52 -07:00
Mike Jolley 5ee38c54c2 Option to disable reviews globally 2017-06-08 15:26:30 +01:00
Mike Jolley 32aca8cc39 String clarification 2017-06-08 14:08:48 +01:00
Mike Jolley 0d4dc49bd3 Break up verified owner and rating options 2017-06-08 14:06:15 +01:00
Mike Jolley eddcb16e00 Update copy + css for zones
Closes #15031
2017-06-06 13:46:09 +01:00
roykho c837827992
Fix undefined global variable notice 2017-05-24 07:21:20 -07:00
Mike Jolley d3666738d8 Merge branch 'pr/15069' 2017-05-23 18:56:58 +01:00
Rasmus Bengtsson 185934fad9 Fix phpdoc to include params and correct types 2017-05-15 13:50:52 +02:00
Rasmus Bengtsson 6a7fc8650f Remove unused local variables 2017-05-15 12:06:52 +02:00
Mike Jolley d744dce594 get_settings for shipping and checkout need to support sections for the API
Fixes #14769
2017-04-28 14:37:44 +01:00
claudiulodro 027e7b1f94 Add restored webhook 2017-04-27 11:44:57 -07:00
Mike Jolley 891e55e1cf Merge pull request #14721 from woocommerce/fix/14670
Avoid escaped quote chars in strings
2017-04-27 15:34:27 +01:00
Mike Jolley aacb01d1e7 Merge branch 'pr/13503'
# Conflicts:
#	assets/css/twenty-seventeen.css
#	assets/css/woocommerce-layout.css
#	assets/css/woocommerce-layout.scss
#	assets/css/woocommerce.css
2017-04-27 12:46:05 +01:00
Mike Jolley 801f5e1eb1 Avoid escaped quote chars in strings
Closes #14670
2017-04-26 13:51:53 +01:00
Claudio Sanches 4922e17876 Include missing REST API v2 from webhooks options. 2017-04-02 03:07:09 -03:00
Mike Jolley e2c73c2277 Tweak labels for customer reg
Closes #13676
2017-03-21 13:23:38 +00:00
Mike Jolley 47036f2f48 Update setting wording 2017-03-20 16:08:53 +00:00
Claudio Sanches 59c2849736 Changed version 2.7 to 3.0 2017-03-15 13:36:53 -03:00
Rami Yushuvaev d2457fe922 i18n: escape translation strings and fix wrong usage of i18n functions 2017-03-13 07:39:46 +02:00
Aristeides Stathopoulos 10ffc92a73 Inline control structures are not allowed 2017-03-07 22:24:24 +02:00
Claudiu Lodromanean 4a4de2a951 Americanize some words 2017-02-27 14:59:37 -08:00
Mike Jolley bbf8e750ce Tidy up includes 2017-02-16 11:46:01 +00:00
Claudiu Lodromanean e45adc14ed Bring up-to-date with master 2017-02-06 10:10:41 -08:00
Claudiu Lodromanean 9fadeacfdc Tweak shipping zones button styling to handle RTL better 2017-02-01 10:25:42 +01:00
Mike Jolley efcbdc3031 Tweaks for #12805
Closes #12805
2017-01-31 17:25:57 +01:00
Justin Shreve 474a307420 Introduce get_tax_class_slugs. 2017-01-25 13:38:13 -08:00
Mike Jolley 17481af671 Allow html in description 2017-01-17 15:50:19 +00:00
Mike Jolley cb04d5985a Fix add zone button and default title
Fixes #12829
2017-01-17 15:25:12 +00:00
Mike Jolley 92968492a0 Customer search 2016-12-21 14:18:33 +00:00
Mike Jolley 2e77e38d33 colour -> color
#12627
2016-12-19 11:41:48 +00:00
Justin Shreve a315e174b7 Fix tax name typo and wrap with _escape. 2016-12-07 11:03:28 -08:00
Claudio Sanches 92ad1b43b2 Updated webhook admin options 2016-11-22 23:08:22 -02:00
Claudio Sanches 5d1c074998 Fixed headers response data 2016-11-22 22:48:31 -02:00
Claudio Sanches 4d85905c0b Allow set webhook api version on admin 2016-11-22 21:58:36 -02:00
Justin Shreve 90e93e1eba Set a blank default name when displaying the shipping zone form, so the placeholder will be used instead. 2016-11-22 10:52:58 -08:00
Justin Shreve a6155c2d7c Add zone_id to get_zones output for ajax. 2016-11-16 04:54:42 -08:00
Justin Shreve 735c1b7a14 Finish moving queries to the shipping zone data store, update usage of deprecated get_zone_id, legacy updates. 2016-11-16 04:53:23 -08:00
Mike Jolley 76b32c9aa5 WIP - Product CRUD (#12065)
* Created function to get the catalog visibility options

* First methods for WP_Product crud

* Product set methods

* Fixed several erros while setting data

* First methods for WP_Product crud

* Product set methods

* Fixed several erros while setting data

* Hardcode the get_type per product class

* Initial look through getters and setters and abstract data

* Missing var

* Add related product functions and deprecate those in class.

* No need to exclude ID

* Fixed coding standards and improved the docblocks

* Get cached terms from wc_get_related_terms()

* Fixed wrong variable in wc_get_related_terms

* Use count() instead of sizeof()

* Sanitize ids later

* Remove unneeded comments

* 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.

* Clean up the abstract product class a bit, deprecate two functions we have renamed, make update & create work properly, and add some tests for it.

* Bump template version

* Handle PR feedback: Remove duplicate regular_price update, allow changing of post status for products, remove deprecation for get_title since we might still offer it as a function

* Made abstract function useful

* External Product CRUD

* _virtual meta should be 'no', not taxable, in product unit test helper

* Grouped product class

* Tests

* Move children to meta and update test

* Use get_upsell_ids

* Spacing in query

* Moving and refactoring methods

* Availability html

* Tidy/add todos

* Rename method

* Put back review functions (still todo)

* missing $this

* get_price_including_tax/excluding_tax functions

* wc_get_price_to_display

* Price handling

* [Product CRUD] Variable (#12146)

* [Product CRUD] Variable Products

* Handle PR feedback.

* [Product CRUD] Grouped Handling (#12151)

* Handle grouped product saving

* Update routine

* [Product CRUD] Product crud terms (#12149)

* Category and tag id handling

* Replace template functions

* Remove todo

* Handle default name in save function

* Product crud admin save routine (#12174)

* Initial props

* Work on admin saving

* Set/get attributes

* Atom was moaning about this before but no longer.

* Update get_shipping_class

* WC_Product_Attribute

* Use getter in admin panel

* Fix attribute saving

* Spacing

* Fix comment

* wc_implode_text_attributes helper function

* [Product CRUD] Product crud admin use getters (#12196)

* Initial props

* Work on admin saving

* Set/get attributes

* Atom was moaning about this before but no longer.

* Update get_shipping_class

* WC_Product_Attribute

* Use getter in admin panel

* Fix attribute saving

* Move settings into new files

* Refactor panels and use getters

* Use getters for variation panel

* Revert save variation changes for now

* Add todos

* Fix downloads

* REST API CRUD Updates

* Additional API updates/fixes. Added some todos

* Fix final failing tests and implementing setters/getters and attributes functionality.

* Fix comparison for is_on_sale and remove download_type from WC_Product.

* Add a wc_get_products wrapper.

* Remove the download type input from the product data metabox for downloadable products. (#12221)

* [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

* Implement CRUD in the legacy REST API

* Handle PR feedback

* [Product CRUD] Getter setter proxy methods (#12236)

* 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

* get_prop implementation in abstract and data classes

* Implement set_prop

* Change handling

* Array key exists

* set_object_read

* Use get_the_terms() instead of wp_get_post_terms()

wp_get_post_terms() is a wrapper around wp_get_object_terms() which does not
use the object cache, and generates a database query every time it is used.

get_the_terms() however can use data from the object cache if present.

* Allow WP_Query to preload post data, and meta in wc_get_products()

Allow WP_Query to bulk query for post data and meta if more than
just IDs are requested from wc_get_products(). Reduces query count
significantly.

* [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

* First methods for WP_Product crud

* Product set methods

* Fixed several erros while setting data

* Hardcode the get_type per product class

* Initial look through getters and setters and abstract data

* Missing var

* Fixed coding standards and improved the docblocks

* Get cached terms from wc_get_related_terms()

* Fixed wrong variable in wc_get_related_terms

* Use count() instead of sizeof()

* Add related product functions and deprecate those in class.

* No need to exclude ID

* Sanitize ids later

* Clean up the abstract product class a bit, deprecate two functions we have renamed, make update & create work properly, and add some tests for it.

* Remove unneeded comments

* 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.

* Handle PR feedback: Remove duplicate regular_price update, allow changing of post status for products, remove deprecation for get_title since we might still offer it as a function

* External Product CRUD

* _virtual meta should be 'no', not taxable, in product unit test helper

* Bump template version

* Made abstract function useful

* Grouped product class

* Tests

* Move children to meta and update test

* Use get_upsell_ids

* Spacing in query

* Moving and refactoring methods

* Availability html

* Tidy/add todos

* Rename method

* Put back review functions (still todo)

* missing $this

* get_price_including_tax/excluding_tax functions

* wc_get_price_to_display

* Price handling

* [Product CRUD] Variable (#12146)

* [Product CRUD] Variable Products

* Handle PR feedback.

* [Product CRUD] Grouped Handling (#12151)

* Handle grouped product saving

* Update routine

* [Product CRUD] Product crud terms (#12149)

* Category and tag id handling

* Replace template functions

* Remove todo

* Handle default name in save function

* Product crud admin save routine (#12174)

* Initial props

* Work on admin saving

* Set/get attributes

* Atom was moaning about this before but no longer.

* Update get_shipping_class

* WC_Product_Attribute

* Use getter in admin panel

* Fix attribute saving

* Spacing

* Fix comment

* wc_implode_text_attributes helper function

* [Product CRUD] Product crud admin use getters (#12196)

* Initial props

* Work on admin saving

* Set/get attributes

* Atom was moaning about this before but no longer.

* Update get_shipping_class

* WC_Product_Attribute

* Use getter in admin panel

* Fix attribute saving

* Move settings into new files

* Refactor panels and use getters

* Use getters for variation panel

* Revert save variation changes for now

* Add todos

* Fix downloads

* REST API CRUD Updates

* Additional API updates/fixes. Added some todos

* Fix final failing tests and implementing setters/getters and attributes functionality.

* Fix comparison for is_on_sale and remove download_type from WC_Product.

* Add a wc_get_products wrapper.

* Remove the download type input from the product data metabox for downloadable products. (#12221)

* [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

* Implement CRUD in the legacy REST API

* Handle PR feedback

* [Product CRUD] Getter setter proxy methods (#12236)

* 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

* get_prop implementation in abstract and data classes

* Implement set_prop

* Change handling

* Array key exists

* set_object_read

* Use get_the_terms() instead of wp_get_post_terms()

wp_get_post_terms() is a wrapper around wp_get_object_terms() which does not
use the object cache, and generates a database query every time it is used.

get_the_terms() however can use data from the object cache if present.

* [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

* Prevent notices

* Handle image_id from parent

* Fix error

* Remove _wc_save_product_price

* Remove todo

* Fixed wrong variation URLs

* Fixed undefined $image_id in WC_Product_Variation::get_image_id()

* Allow wc_rest_prepare_date_response() handle timestamps

* Updated get methods on REST API for variations

* Use variations CRUD to save variations metadata

* [Product CRUD] Abstract todos (#12305)

* Get dimensions and weights, with soft deprecation

* Product attributes

* Ratings

* Fix read method

* Downloads

* Feedback

* Revert "[Product CRUD] Abstract todos (#12305)"

This reverts commit 9a6136fcf8.

* Remove deprecated get_variation_id()

* New default attributes method

* [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

* Product crud abstract todos (#12316)

* Get dimensions and weights, with soft deprecation

* Product attributes

* Ratings

* Fix read method

* Downloads

* Feedback

* Fix up store

* Fixed method returning in write context

* Fix error in variation admin

* Check for parent value - fixes tax class

* Remove old/complete todos

* Allow set tax class as "parent"

* Removed duplicated sync

* Fixed wrong variation URLs

* Fixed undefined $image_id in WC_Product_Variation::get_image_id()

* Allow wc_rest_prepare_date_response() handle timestamps

* Updated get methods on REST API for variations

* Use variations CRUD to save variations metadata

* Remove deprecated get_variation_id()

* New default attributes method

* Fixed method returning in write context

* Allow set tax class as "parent"

* Removed duplicated sync

* Fixed coding standards

* TODO is not accurate.

* Should pass WC_Product instancies to WC_Comments methods (#12327)

* Use new method in abstract order class to prevent headers sent issue in tests

* Fixed variable description in REST API

* Updated how create initial product variation

* Fixed a few fatal errors and warnings in Products CRUD (#12329)

* Fixed a few fatal errors and warnings in Products CRUD

* Fixed sync functions

* Add variations CRUD to legacy API (#12331)

* Apply crud to variable products in legacy API v1

* New REST API do not need fallback for default attributes

* Apply variations CRUD to legacy API v2

* Legacy v2 - save default attributes

* Variations in legacy API v2 do not have descriptions

* Fixed legacy API v2 variations params

* Applied variations CRUD to legacy API v3

* Sync before save in legacy apis

* Punc

* Removed API todos

* Removed test

* Products endpoint tweaks (#12354)

* Var type already normalized on CRUD

* Let Product CRUD handle with validation, sanitization and conditional checks

* Set downloads using WC_Product_Download

* Stop try catch exceptions more than one time

* Handle WC_Data_Exception in legacy API

* Complete remove products when fails on creating

* On creating I mean!

* Already have a method to complete delete products

* Fixed standards using WP CodeSniffer

* get_the_terms() returns false when empty

* get_manage_stock returns boolean

@claudiosanches

* Merge conflict

* Variations API endpoint fixes

* Product CRUD improvements (#12359)

* args is not used any more - remove todo

* Added test for attributes

* wc_get_price_excluding_tax usage

* parent usage

* Fix rating counts

* Test fixes

* Cleanup after tests

* Make sure status transition code runs even during API calls, not just in admin.

* Default visibility

* Fix attribute setting in API

* Use get name instead of get title

* variation id usage

* Improved cross sell templates

* variation_data

* Grouped product sync

* Notices

* Sync is not needed in API

* Delete

* Rename interfaces

* Update counts in data store
2016-11-16 12:38:24 +00:00
Rami Yushuvaev 93d55dade9 add translators comments 2016-10-29 20:32:38 +03:00
Rami Yushuvaev 8ab8bef52e add translators comments 2016-10-29 13:51:56 +03:00
Rami Yushuvaev 6cc301e58c add translators comments 2016-10-29 13:16:03 +03:00
Claudio Sanches fa0c710802 i18n <a> links, closes #12195 2016-10-27 15:36:24 -02:00
Rami Yushuvaev 0be4db2261 more i18n updates (#12189)
* i18n: simpler translation strings

* i18n: simpler translation strings

* i18n: readble printf(), and moving the %s placeholder to `%s product`

* i18n: make string translatable and remove the HTML tags

* i18n: avoide using HTML tags in translatino strings

* i18n: move the colon into the translation string and use %s placeholder for the IP

* i18n: use sprintf() on field-validation translation strings, and unify those strings

* i18n: move colons into the translation strings

* i18n: use `%s` placeholder as the site name in "Powered by WooCommerce" string

* i18n: use `%s` placeholder for min and max price

* i18n: rewrite the translation strings printf()
2016-10-26 14:35:52 -02:00
Rami Yushuvaev 0c1e531091 few more i18n updates (#12185)
* i18n: simpler translation strings

* i18n: simpler translation strings

* i18n: readble printf(), and moving the %s placeholder to `%s product`

* i18n: make string translatable and remove the HTML tags

* i18n: avoide using HTML tags in translatino strings
2016-10-26 11:31:32 -02:00
Rami Yushuvaev 140d0efb99 i18n: Avoid using HTML tags in translation strings (#12166)
* i18n: Remove some HTML tags from translation strings

* i18n: simpler translation string

* i18n: translations strings with surrounding `<strong>` HTML tags should be moved outside the translation string

* i18n: Avoide using `<code>' HTML tags in translation strings

* i18n: Split the notice to avoide using HTML tags in translation strings
2016-10-24 21:56:37 -02:00
Rami Yushuvaev 4375618438 i18n context functions (#12156)
* Replace some context function with translation comments

* Remove two more context function

* Replace another context function with translation comments
2016-10-24 08:31:07 +01:00
Rami Yushuvaev fec057c993 Use get_admin_page_title() function to display admin titles (#12077)
*  Use get_admin_page_title() function to display admin titles

* revert

* i18n: use sprintf() in translation strings
2016-10-13 13:34:48 -03:00
James Koster 3823b78318 Add/product galleries (#11665)
* register prettyPhoto but don't enqueue. #10721

* Remove lightbox option. #10721

Also registers the prettyPhoto styles instead of enqueueing

* Stip all prettyPhoto related stuff from the templates and tidy up some logic. #10721

* Add flexslider assets #10721

* styling and re-adds `woocommerce_single_product_image_thumbnail_html`. #10721.

* Add zoom functionality. #10721

* Move js to single-product.js. #10721

* styling of the gallery thumbnails when using the `product_page` shortcode. #10721

* Only enable the zoom if the image is large enough. #10721

* Use a 4 column layout by default. #10721

* Make the carousel options filterable. #10721

* rtl styles for gallery. #10721

* Don't zoom on handheld devices. #10721

* markup tweaks in prep for photoswipe

* disable zoom for now

* Add and enqueue photoswipe assets

* add the photoswipe template

* initialise photoswipe - it's alive!

* tidy up js. add title. add separate trigger. #10721

* Move photoswipe functions to single-product.js. #10721

* reactivate the zoom! #10721

* style the photoswipe trigger. #10721

* disable flexslider animation loop. #10721

* js tidy up. #10721

* Fix jshint

* Abstract the product gallery scripts

* Minify

* Fixed conflict with the admin bar

* Photoswipe conflict with admin bar

* Index. #10721

* photoswipe button styles. #10721

* Styling. #10721

* No animation on zoom
* Image width on mobile

* No shadows please. #10721

Looking at you, Twenty Twelve.

* code tidy and add class to placeholder figure. #10721

* simplify rtl query

* photoswipe button styles

* Comma should not be here

* zoom icon #10721

* gallery thumb styles. #10721

* trigger icon. #10721

* Image margins. #10721

* icon hover states. #10721

* Variation handling

* Fix zoom and heights

* Resize after timeout
2016-10-13 15:25:42 +01:00
Mike Jolley e3fa4de7c8 Hide shipping tax class setting when shipping is disabled
Closes #11960
2016-10-13 12:14:41 +01:00
Mike Jolley 0829200299 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	includes/admin/class-wc-admin-help.php
2016-10-12 11:18:27 +01:00
Rami Yushuvaev eae583fc3c Update wp.org plugin directory links 2016-10-12 11:16:58 +01:00
Claudio Sanches 657c312cae Fix strings case (#12069)
* Fixed case for all _e, esc_attr_e and esc_html_e strings

* Fixed case for all _n_noop strings

* Fixed case for all _x strings

* Fixed case for all __, esc_html__ and esc_attr__ strings

* Fixed a few more strings

* Fixed strings in unit tests

* Fix PayPal Standard case.

* Save Order text
2016-10-12 11:16:30 +01:00
Rami Yushuvaev 65cf1bcb6f Merge branch 'master' of https://github.com/ramiy/woocommerce into i18n/similar-strings 2016-10-11 21:14:56 +03:00
Mike Jolley 2a51a76e4e Merge branch 'pr/12056' 2016-10-11 17:36:40 +01:00
Mike Jolley a7ccc38096 Define classnames to choose what gets hidden 2016-10-11 17:36:34 +01:00
Mike Jolley d7f2d29ddc Add row actions back 2016-10-11 11:46:23 +01:00
Rami Yushuvaev 83e938af1e i18n: Merge similar translation strings to reduce the total strings count #11905 2016-10-11 04:39:13 +03:00
Mike Jolley 2d270fb405 Fix saving and rest of world 2016-10-10 18:41:07 +01:00
Mike Jolley 160049eddd Remove save button from zones screen. 2016-10-10 17:50:29 +01:00
Mike Jolley 83cc0c7066 Work on shipping zone screens 2016-09-24 03:22:57 +01:00
Claudio Sanches c5c1e9ecbe Merge pull request #11904 from BIOSTALL/patch-1
Fix settings sectionend
2016-09-13 18:53:15 -03:00
Claudio Sanches be029374ce Fixed coding standards 2016-09-13 18:24:21 -03:00
Claudio Sanches 5de8dd0d65 Fixed coding standards 2016-09-13 17:47:19 -03:00
rspublishing e640707f89 Use numbered index in sprintf 2016-09-13 14:39:16 +02:00
rspublishing 9ec739c167 Link to SSL/HTTPS doc from checkout settings 2016-09-13 13:50:52 +02:00
Steve Marks 9f007e0875 Fix settings sectionend
Fixed incorrect sectionend reference in Email settings
2016-09-12 15:40:28 +01:00
Aristeides Stathopoulos 9668247b95 WordPress.PHP.YodaConditions.NotYoda 2016-09-09 03:14:28 +03:00
Mike Jolley 311c540662 Merge pull request #11833 from aristath/master
Coding Standards (2nd pass)
2016-09-07 10:14:17 +01:00
Justin Shreve fd952e8efa Payment Gateways API 2016-09-05 14:49:29 -07:00
Aristeides Stathopoulos d4e3faf014 PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket 2016-09-02 04:51:31 +03:00
Aristeides Stathopoulos 8fe4cd65a4 PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket 2016-09-02 04:12:22 +03:00
Aristeides Stathopoulos e07511502d Additional coding-standards fixes. 2016-09-02 03:26:24 +03:00
Aristeides Stathopoulos fde1037757 fix failing tests. 2016-09-01 23:50:14 +03:00
Aristeides Stathopoulos 72696901f3 WordPress.WhiteSpace.OperatorSpacing.SpacingAfter 2016-08-27 09:14:06 +03:00
Aristeides Stathopoulos f2730eea02 WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd 2016-08-27 08:57:05 +03:00
Aristeides Stathopoulos 82f3cc221e WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis 2016-08-27 07:23:02 +03:00
Aristeides Stathopoulos d430dabb37 Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines 2016-08-27 07:04:18 +03:00
Aristeides Stathopoulos 0b0f67ad28 WordPress.Arrays.ArrayDeclaration.SpaceAfterDoubleArrow 2016-08-27 05:36:32 +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
Mike Jolley 84487d0f4b Shipping debug mode moved to shipping settings 2016-08-24 16:55:34 +01:00
Claudio Sanches 2407a880f7 Updated the default colors for emails to match the Woo Style Guide
Closes #11748

cc @jameskoster
2016-08-22 20:59:56 -03:00