Commit Graph

494 Commits

Author SHA1 Message Date
Mike Jolley c556facd41 Fix percent coupon and display 2017-08-09 19:02:10 +01:00
Mike Jolley f71dc64d35 Manual discounts and negative taxes 2017-08-09 18:53:10 +01:00
Mike Jolley f0a9050241 HTML 2017-08-09 16:17:30 +01:00
Mike Jolley 6c0750e2e9 Discount lines and button 2017-08-09 14:55:42 +01:00
Josh Smith 677b81174e [#12517] Add statistic on download count to download permissions listings on order details page 2017-08-05 04:35:37 +00:00
Josh Smith dfeead42a5 [#12517] Add download log report to WC admin reports, with link from Order details Downloads section 2017-08-03 21:24:53 +00:00
Mike Jolley 916294b7d0 Use comment_status input name
Closes #16153
2017-07-19 15:18:33 +01:00
Mike Jolley f79f5bb5cb Simply enables drag and drop sorting on the grouped product field
Fixes #14560
2017-07-07 14:20:30 +01:00
Claudio Sanches 10f039ad79 Merge pull request #15827 from woocommerce/fix/15818
If stock changes between page load and editing, reject stock changes
2017-07-05 15:49:58 -03:00
Mike Jolley beba2757ee feedback 2017-07-05 17:11:34 +01:00
Claudio Sanches d2f9211ffb Removed non-existing classes from refunds form on admin 2017-07-04 17:27:25 -03:00
Claudio Sanches 2d8902c91f Hide Cross-sells if external, removed in #15692 2017-07-04 16:44:08 -03:00
Mike Jolley 1265633286 If stock changes between page load and editing, reject stock changes
Fixes #15818
2017-06-27 21:22:46 +01:00
Caleb Burks cfbd56c04a Remove some settings for grouped products
Purchase notes and Cross-sells aren’t needing as you can never add a grouped product to your cart or purchase it.
2017-06-20 21:04:56 -05:00
Caleb Burks f13c4c3b30 Hide Cross-sells for external products 2017-06-20 20:56:54 -05:00
Caleb Burks ae6a5e34f2 Move “Grouped products” setting to the top 2017-06-19 21:59:42 -05:00
Job 8b48accc01 Upsell/up-sell
We had a few different usages of up-sells and upsells in the copy -
“Upsells” were used more and also seems to be more correct English so
I’ve updated the “up-sells”
2017-06-15 15:56:01 +02:00
Mike Jolley 4a56c8b92a Fix indent 2017-06-09 09:36:44 +01:00
nishitlangaliya 9ba5f534ea Fixed Don't show 'Restock refunded items' ref #14888 2017-06-09 09:06:57 +05:30
Mike Jolley 5ee38c54c2 Option to disable reviews globally 2017-06-08 15:26:30 +01:00
Peter 314f64b566 Change the name of the new action
Change the name of the new action to woocommerce_after_order_fee_item_name.
2017-05-28 20:40:59 +02:00
Peter 05516dbea5 New action for display order fee custom data
We need to display custom data in fee lines, similarly to woocommerce_after_order_itemmeta action in shipping line items.
2017-05-26 10:05:26 +02:00
Mike Jolley bc4d36fd3f Add abspath checks
Closes #14999
2017-05-10 19:03:19 +01:00
Mike Jolley ca0c3e0bb8 Merge pull request #14064 from rafsuntaskin/develop
added bulk variation update for stock status, resolves #14046
2017-04-27 17:37:59 +01: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 801f5e1eb1 Avoid escaped quote chars in strings
Closes #14670
2017-04-26 13:51:53 +01:00
Mike Jolley 63e8221e2c Add required placeholder for meta fields
Closes #14700
2017-04-26 11:35:34 +01:00
Mike Jolley 2a4103d776 Removed the non-functional order total input and combine the recalculation buttons into one working button.
Fixes #14494
2017-04-18 19:44:42 +01:00
claudiulodro f21e47f7d0 Update save logic to allow filtering 2017-04-17 14:45:53 -07:00
Mike Jolley 41f7a637cd Use refund date not order date in refund display
Fixes #14332
2017-04-13 13:24:48 +01:00
rafsuntaskin ac5de585e5 added bulk variation update for stock status, resolves #14046 2017-04-07 02:11:04 +06:00
Claudiu Lodromanean 955f20be80 Do custom buttons before Cancel and Save buttons 2017-03-31 11:28:00 -07:00
corsonr 0608eaf11a Fix 13820
Add the “description” class to `.cancel_sale_schedule` so that the
“cancel” link gets aligned properly with a margin left of 7 pixels.
2017-03-29 10:01:45 +02:00
pierrebuet 32f8142c91 Fixes #13748 2017-03-24 12:13:00 +00:00
Mike Jolley d55653a408 Merge branch 'master' into fix-13498
# Conflicts:
#	includes/class-wc-order.php
#	tests/unit-tests/crud/data.php
2017-03-15 15:52:40 +00:00
Mike Jolley 7f787fac84 Check empty strings literally
Closes #13565
2017-03-14 12:17:49 +00:00
Mike Jolley e13badcdb3 Merge pull request #13584 from woocommerce/13527-update-downloads-dates
Apply WC_DateTime to WC_Customer_Downloads
2017-03-14 12:11:28 +00:00
Claudio Sanches f1c08f1a8e Updated downloads view on admin 2017-03-13 20:54:43 -03:00
Mike Jolley 9bee678819 API updates 2017-03-13 21:36:31 +00:00
Mike Jolley dd1b8e35dc API endpoints 2017-03-13 20:26:52 +00:00
Rami Yushuvaev d2457fe922 i18n: escape translation strings and fix wrong usage of i18n functions 2017-03-13 07:39:46 +02:00
Mike Jolley 53962f1143 Other date_date call replacements 2017-03-10 16:43:05 +00:00
Mike Jolley a185e57ccb Admin panel should not hide _ meta.
Fixes #13510
2017-03-09 11:45:22 +00:00
Mike Jolley 5c06a6a591 Missing wc_format_localized_price
Fixes #13356
2017-02-27 13:39:35 +00:00
Claudio Sanches ad09c23d1f Fixed wrong index for _wc_variation_file_hashes, closes #13322 2017-02-23 18:17:44 -03:00
Mike Jolley 04aebd9fa7 Merge pull request #13306 from woocommerce/fix-13303
Fix multiple item additon to orders
2017-02-23 18:11:02 +00:00
Mike Jolley 34d03e524a woocommerce_date_input_html_pattern filter
Closes #13289
2017-02-23 12:57:33 +00:00
Mike Jolley dec52e8be2 Fix multiple item additon 2017-02-23 10:19:15 +00:00
Mike Jolley 2ac125417f Fix sale date field 2017-02-22 10:31:20 +00:00
Mike Jolley 82d9abd4c5 Make sure enabled is checked by default
#13147
2017-02-10 17:43:32 +00:00
Mike Jolley 3b06660edf Merge pull request #12917 from woocommerce/12170-rtl
#12170 Set up RTL generation and enqueuing
2017-02-08 10:29:55 +00:00
Mike Jolley fcae260b43 Missing placeholder 2017-02-07 17:07:11 +00:00
Claudiu Lodromanean da22e021f9 Tweak admin tabs CSS to look good in LTR and RTL modes. 2017-01-31 10:09:56 +01:00
Mike Jolley 66c3cff76d More escaping 2017-01-06 14:09:36 +00:00
Mike Jolley 76f8c3dddd Escaping for scruitinizer 2017-01-06 12:45:28 +00:00
Mike Jolley 96877dbb25 Fix product search inputs 2016-12-21 13:23:26 +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
Mike Jolley 086d8bce1d Fix is_callable 2016-11-25 14:48:20 +00:00
Matty ff1442e9aa Allow cross sells to be sold as variations 2016-11-25 13:17:09 +00:00
Mike Jolley 9087a45f29 Remove attribute_ prefix rather than add so that get_attributes has better return values, and don't show duplicate data in cart. 2016-11-24 14:20:48 +00:00
Mike Jolley c8d1acb33e Prevent tags breaking page layout 2016-11-23 15:49:35 +00:00
Mike Jolley bc1103b438 Missing key in download variation 2016-11-22 15:43:21 +00:00
Mike Jolley b73bbabab6 Fix missing key variable 2016-11-22 15:41:37 +00:00
Mike Jolley 32de28355a Merge branch 'master' into order-data-store
# Conflicts:
#	includes/admin/meta-boxes/class-wc-meta-box-order-data.php
2016-11-21 14:45:46 +00:00
Mike Jolley b81bde4f5a admin updates 2016-11-18 19:56:17 +00:00
Mike Jolley b1565cf0d6 Download update routine and interface 2016-11-18 19:29:37 +00:00
Mike Jolley 1b6d7acd24 Data store for downloads 2016-11-18 17:13:02 +00:00
Claudio Sanches 2a4aa26a31 Removed extra … 2016-11-18 12:19:44 -02:00
Justin Shreve 20fca44334 Handle product quick and bulk edit. 2016-11-16 12:54:53 -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
Mike Jolley 599a2ad296 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:17:00 +00:00
Mike Jolley e1c4c4ab96 Fix error in variation admin 2016-11-11 16:22:39 +00:00
Mike Jolley aa2ce1a1cc Fix error 2016-11-09 17:29:28 +00:00
Mike Jolley b9d60965d2 Conflicts 2016-11-09 16:53:23 +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
Justin Shreve cee91cccbf Remove the download type input from the product data metabox for downloadable products. (#12221) 2016-11-09 15:47:23 +00:00
Mike Jolley 038104c8a8 [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
2016-11-09 15:44:02 +00:00
Mike Jolley af32b3ea91 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
2016-11-09 15:43:20 +00:00
Mike Jolley ed46abf3a3 [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 12:26:46 +00:00
Rami Yushuvaev d85075dcb0 a11y: replace `title` attributes with `aria-label`, for better accessibility 2016-11-04 17:41:51 +02:00
Mike Jolley db0ce210a3 [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-02 18:50:42 +00:00
Justin Shreve 91ddc7ecbd Remove the download type input from the product data metabox for downloadable products. (#12221) 2016-10-31 15:12:46 +00:00
Rami Yushuvaev 55f08d62ae add translators comments 2016-10-29 23:03:28 +03: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
Mike Jolley 5855170c5a [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
2016-10-27 14:08:16 +01:00
Mike Jolley 38703f1907 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
2016-10-26 18:02:50 +01:00
Rami Yushuvaev f27499b501 i18n Improvements (#12078)
* use %s in translations strings

* merge simmilar error strings

* i18n: use sprintf() in translation strings to make them easier to understand for translators

* i18n: remove sprintf() function from translation string with unused parameter

* i18n: move colons and brackets into the translation strings

* revert comit addaa5d

* Fix broken sprintf()

* i18n: move colons into the translation strings on error messages

* Fix Travis-CI Error: operator must be surrounded by a single space
2016-10-24 08:33:32 +01: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
Terence O'Donoghue edd14cd8df New Action for after Product Attribute Settings (#12099)
Allows developers to add extra checkboxes etc.
2016-10-21 15:31:20 +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
Mike Jolley 42f420b16c Correct admin link for variable product. 2016-10-13 15:18:44 +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 83e938af1e i18n: Merge similar translation strings to reduce the total strings count #11905 2016-10-11 04:39:13 +03:00
Claudio Sanches be029374ce Fixed coding standards 2016-09-13 18:24:21 -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 cf59524dd7 Fix order total race condition in CRUD 2016-09-07 09:28:11 +01:00
Aristeides Stathopoulos 6ac7f03241 Generic.Formatting.DisallowMultipleStatements.SameLine 2016-09-02 06:40:52 +03:00
Aristeides Stathopoulos d4e3faf014 PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket 2016-09-02 04:51:31 +03:00
Aristeides Stathopoulos 0516e96843 PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket 2016-09-02 04:33:57 +03:00
Aristeides Stathopoulos e07511502d Additional coding-standards fixes. 2016-09-02 03:26:24 +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 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 7cf75f5085 Remove use of deprecated functions 2016-08-22 16:57:54 +01:00
Mike Jolley c88984eb0e Replace add methods 2016-08-22 16:48:19 +01:00
Mike Jolley fdd7e797ba API get refunds 2016-08-22 13:15:15 +01:00
Mike Jolley 9e45927803 Create refund with crud 2016-08-22 13:15:15 +01:00
Mike Jolley 190cd0bf86 Remove direct access of item props in admin 2016-08-19 15:08:00 +01:00
Mike Jolley 21ad196297 Use CRUD in wc_save_order_items 2016-08-19 13:43:33 +01:00
Mike Jolley eb45acf0d5 [2.6] Use method title in admin shipping dropdown
fixes #11678
2016-08-12 14:23:59 +01:00
Mike Jolley a8759fc0aa Meta/product handling 2016-08-08 16:20:15 +01:00
Mike Jolley c3aa933ad2 coupon 2016-08-08 15:25:22 +01:00
Mike Jolley 75975de58a Item meta 2016-08-08 15:22:00 +01:00
Mike Jolley 39b4831e95 get_id 2016-08-05 15:56:23 +01:00
Mike Jolley 9181c107a8 get_currency 2016-08-05 15:49:17 +01:00
Manos Psychogyiopoulos 0173447cf9 add $order arg to woocommerce_admin_order_item_class and woocommerce_admin_html_order_item_class filters 2016-07-21 11:50:45 +03:00
Mike Jolley d17b4de6d5 woocommerce_admin_order_item_bulk_actions
Closes #11099
2016-07-20 13:37:17 +01:00
Mike Jolley 53511e36ec Use permission id to revoke access to downloads to prevent removing wrong rows.
Fixes #11423 @claudiosmweb
2016-07-14 15:54:28 +02:00
Claudio Sanches 7d9d091767 Fixed mixed tabs and spaces 2016-07-11 16:56:35 +02:00
Claudio Sanches 05c7f186ba Fixed line_subtotal_tax and line_tax localized price format 2016-06-14 17:41:20 -03:00
Teemu Suoranta 35519fb685 Add filters for attribute selection UI 2016-06-05 21:22:10 +03:00
Mike Jolley d24fceab44 When calculating discount amount in backend, use unrounded values
#10963
2016-05-23 16:23:27 +01:00
Mike Jolley 36021ab1ac Improve no longer editable text
Closes #10916
2016-05-16 11:12:04 +01:00
Mike Jolley ba2bfdc685 Fix invalid closing tag 2016-05-16 10:17:44 +01:00
corsonr becc4ef841 use wc_help_tip() 2016-05-13 18:49:58 +02:00
corsonr ca040a3d1f Add a refund reason help bubble 2016-05-13 18:15:35 +02:00
Mike Jolley 96cb47e037 escape 2016-05-11 10:58:04 +01:00
Caleb Burks 2fd455769d Make customer download links available for admins 2016-05-10 23:52:18 -05:00
Mike Jolley 0782b869f5 Remove double filter on meta_key label
Fixes #10845
2016-05-03 16:01:16 +01:00
Mike Jolley 6f42514afb Pass false for product in attribute label filter
Closes #10773
2016-04-25 14:11:07 +01:00
Mike Jolley 29c6acf767 Used positional placeholders in strings where the order of strings may require modification in the locale.
Closes #10775
2016-04-25 13:07:41 +01:00
Mike Jolley 95de7f5a2c Minor spacing issues 2016-03-23 13:06:15 +00:00
Mike Jolley f73149feaf Tweak variation display and reenable bulk editing 2016-03-22 17:13:39 +00:00
Mike Jolley f1b3d0f708 Further layout tweaks 2016-03-22 14:54:02 +00:00
Mike Jolley 5862785522 Restyle items panel 2016-03-21 18:35:00 +00:00
Mike Jolley 7be2b129b6 Removed bulk actions from order items panel
Reduce/increase order item stock is less important these days do to
automatic stock reduction (when status changes) and because when you
refund items you can restock items via checkbox. Manual stock changes
can be performed by editing products.

Decreases complexity of order items box.
2016-03-21 14:58:14 +00:00
Jeff Stieler 16b65ea8c3 Fire action before order line items are rendered. 2016-03-18 15:25:31 -06:00
Mike Jolley 9ce892bd39 Avoid title case. Clean up colon.
Closes #10524 (lol)
2016-03-10 11:39:32 +00:00
Mike Jolley 6880a71ea9 Merge pull request #10141 from woothemes/fix-10135
Fix 10135
2016-02-12 13:37:53 +00:00
Mike Jolley 75c264837f Justins feedback/code tidy 2016-02-10 13:21:16 +00:00
Mike Jolley 352184cc06 Merge branch 'master' into shipping-zones
# Conflicts:
#	assets/css/admin.css
#	i18n/languages/woocommerce.pot
#	includes/abstracts/abstract-wc-payment-gateway.php
#	includes/abstracts/abstract-wc-shipping-method.php
#	includes/admin/settings/class-wc-settings-shipping.php
#	includes/wc-core-functions.php
#	uninstall.php
2016-02-05 14:58:48 +00:00
Mike Jolley 57c643c93e [2.5] Round tax/tax refunded amounts on display.
Closes #10162
2016-01-25 15:18:49 +00:00
Mike Jolley 77e1aa8263 Make qty for refunds negative
Fixes order counts reported in #10135

May however require an upgrade routine and needs more testing. Not for
2.5.

Fixes #10135
2016-01-22 16:28:29 +00:00
Mike Jolley 007abbc98e Shipping meta data
Closes #9094
2016-01-08 11:42:32 +00:00
Claudio Sanches 997d1caa50 Fixed several new variations admin actions, closes #9886 2015-12-21 03:36:36 -02:00
Claudio Sanches c001d5b274 Make tooltips consistent, closes #9856 2015-12-16 03:38:53 -02:00
Mike Jolley d515ddaaed Merge pull request #9798 from JeroenSormani/admin-order-item-hooks
Add hooks after order line items in admin
2015-12-14 12:50:54 +00:00
JeroenSormani 0bc4089ea7 Add hooks after order line items in admin 2015-12-09 09:29:32 +01:00
roykho 887d37583c Seperate variation description field from shipping div container 2015-11-28 07:20:47 -08:00
Claudio Sanches 5893875b0c Removed period for file headers 2015-11-03 11:53:50 -02:00
Claudio Sanches efa19f799d Fixed some coding standards for docblocks 2015-11-03 10:28:01 -02:00
Claudio Sanches b85ae9056c Rename wc_add_help_tip() function to wc_help_tip() 2015-10-23 13:09:08 -02:00
Claudio Sanches 2e95a68357 Use new "question" mark icon font
Created wc_add_help_tip() function to generate the icons
Replaced all .help_tip elements and [?]

We'll keep the old image and styles in order to maintain backwards
compatibility

Closes #9381
2015-10-23 01:40:52 -02:00
Claudio Sanches 1ea5b8433f Escape normalized for the woocommerce_variation_option_name filter 2015-10-18 10:42:44 -06:00
Claudio Sanches 3a536ac8b7 Sanitize shipping method label/title, closes #9159 2015-10-01 17:17:45 +02:00
Claudio Sanches 7c05671188 Added new actions to make easy add custom fields for variations, closes #8827 2015-10-01 16:30:02 +02:00
Claudio Sanches ebedba7906 Merge pull request #9081 from helgatheviking/filter-admin-order-item-thumbnails
Add `woocommerce_admin_order_item_thumbnail` filter in admin
2015-09-15 19:58:23 -03:00
Claudio Sanches 7e63374aaf Merge pull request #8735 from shivapoudel/backbone-modal
Allow support for variable in backbone modal template in extensions
2015-09-15 19:44:50 -03:00
James Koster 82f8b61418 make it clearer that variation drag/drop only applies to the backend. closes #9104 2015-09-15 17:05:55 +01:00
Kathy Darling 9571b8827e Add `woocommerce_admin_order_item_thumbnail` filter in `html-order-item.php`. 2015-09-08 13:41:12 -04:00
Kevin Hagerty 3671bcf39d Improve order total formatting
The function get_formatted_order_total already provides formatted HTML with indication of a prior refund. No need to do that logic and formatting again.
2015-09-05 07:48:24 -04:00
Mike Jolley dd7c32c22c Added 'false' check in variation admin
@claudiosmweb Closes #8966
2015-09-01 16:35:13 +01:00
Mike Jolley 2d8b3f0c1f menu_order notices on IIS. 2015-08-21 14:08:32 +01:00
Shiva Poudel 4cc26ab799 Backbone modal template to support wp.template 2015-08-06 10:22:53 +05:45
George Stephanis 95e6b84fbb Make sure we esc_attr translation results
Part 2 of … 2, I think.
2015-08-05 14:15:00 -04:00
Mike Jolley e7dfff8687 Update wording and add tooltip
#8690
2015-07-31 17:14:28 +01:00
Mike Jolley 82f50cedb0 Allow menu_order sorting like in 2.3
Also allow setting manually to allow sorting between pages.

Fixes #8690
2015-07-31 12:39:23 +01:00
Mike Jolley 64d38f6dd8 STOCK STATUS field for variations should never be hidden
Fixes #8687
2015-07-30 15:45:05 +01:00
Mike Jolley 7b2aec4791 Take item qty into consideration when refunding orders
Fixes #8675
2015-07-29 13:13:41 +01:00
Mike Jolley 8d6858bb80 Sanitize not needed 2015-07-27 16:43:05 +01:00
Manos Psychogyiopoulos 18a7c6b7fb back-compat with text-based attributes: defaults don't work in WC2.4 2015-07-18 12:34:41 +03:00
Mike Jolley 34f149bcbf Replace dash with colon 2015-07-08 23:51:44 +01:00
Mike Jolley 8161cbd095 Change remove buttons into links 2015-07-08 23:08:07 +01:00
Claudio Sanches 843a55a6b5 Admin ajax variations 2015-07-07 20:53:36 -03:00
Claudio Sanches 8b681fddf7 Created bulk edit actions for variable sale schedule 2015-07-07 16:39:59 -03:00
adnanoner 725e3ee4e0 Add $order to action 'woocommerce_order_item_' . $item['type'] . '_html'
This comes in handy when you want change the line_items loop.
In my case I wanted to have a single line for each order items (per quantity) so I could edit the order and change the product for individual items. Would be appreciated if this could be merged.
2015-07-06 18:09:06 +02:00
Claudio Sanches 3d59933d6b Created initial methods to load variations by ajax 2015-07-02 17:42:22 -03:00
Justin Shreve 5d8b17bd6f Update the help text to mention that we expect already encoded URLs. 2015-06-16 15:48:05 +00:00
Mike Jolley f8151f416c Merge branch 'text-attribute-handling' 2015-06-16 15:11:58 +01:00
Mike Jolley 753a22734f Prevent Manage stock being forced on
Closes #8336
2015-06-12 11:22:54 +01:00
Mike Jolley 12396f4296 Attempted bw compat by comparing sanitised text to real text 2015-06-11 15:42:18 +01:00
Mike Jolley 89f7e15052 Save full version of text based attributes when dealing with variations 2015-06-11 14:43:02 +01:00
Mike Jolley b9708c4df9 Show refunded total shipping and taxes
Closes #8222
2015-06-01 11:06:11 +01:00
Mike Jolley 0a3defd798 Move tax enabled check 2015-05-29 14:55:57 +01:00
roykho b9eefa58fa use esc_textarea function 2015-05-28 16:08:22 -07:00
roykho 54b0a0ca54 changed dynamic variation description to allow limited HTML and some sanitized tweaks 2015-05-28 14:31:45 -07:00
roykho b812b2fd94 add dynamic variation description feature 2015-05-14 10:56:26 -07:00
Gustavo Bordoni 22393df867 The woocommerce_admin_order_item_headers action lacks a variable for context 2015-04-21 23:13:55 -03:00
Dominic be8e61161b Prevent notices if variation_id isn't set
It's a minor thing, but I have ran into circumstances where the `$item`
array doesn't have the `variation_id` set (namely after importing data
using another plugin). This tweak checks for the `variation_id` without
throwing a notice if the array key isn't defined.
2015-04-09 16:15:28 -07:00
Mike Jolley 26e7a5c705 Merge pull request #7865 from SiR-DanieL/scrutinizer-issues
Fix scrutinizer issues
2015-04-08 11:53:44 +01:00
James Koster cd20ce6789 variation images. closes #7844 2015-04-08 10:19:23 +01:00
shivapoudel 227c83a084 Use of <button> instead of <a> for modal-close
This was the clone of themes.php modal close button
2015-04-04 13:57:20 +05:45
shivapoudel 29f584ba98 Fix - Unusual slightly dark box on the backdrop of modal right side 2015-04-04 13:51:10 +05:45
Nicola Mustone 85fd634861 fix scrutinizer issues 2015-04-01 15:33:56 +02:00
Mike Jolley 01ee531136 Same as #7662 for backend 2015-03-09 13:48:47 +00:00
Mike Jolley 8bdd4fc283 Run item meta label through wc_attribute_label() in admin order page.
Closes #7420
2015-02-16 13:49:44 +00:00
Mike Jolley 447ee6e7bb Docblocks 2015-02-03 14:02:38 +00:00