Commit Graph

1800 Commits

Author SHA1 Message Date
Mike Jolley cd4e23a864 Use correct classnames and tidy 2017-04-27 17:32:36 +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 5f63f81b72 Merge branch 'add/inline-terms'
# Conflicts:
#	assets/js/frontend/single-product.min.js
2017-04-27 12:37:46 +01:00
Mike Jolley 115da407c0 Correct notice 2017-04-27 12:34:20 +01:00
Mike Jolley d546613c25 Merge branch 'pr/14394'
# Conflicts:
#	assets/js/frontend/single-product.min.js
2017-04-27 11:53:08 +01:00
Mike Jolley 13a610d1d8 Merge branch 'pr/14612' 2017-04-26 13:26:26 +01:00
Mike Jolley 13bc235020 Bump template version and move to correct function files. 2017-04-26 13:25:14 +01:00
Mike Jolley 1e6d52a3bd Add a data-caption for captions and keep title around.
Fixes #14578
2017-04-25 14:31:24 +01:00
Claudio Sanches 1314b6845e Merge pull request #14432 from emgk/fix-14428
added new filter for product thumbnail size.
2017-04-24 21:05:27 -03:00
mdrahul c6bc8f7836 Fix Cart Empty message, ref #14519 2017-04-22 11:09:17 +05:30
Theme.al 79d3291ba5 Hook comments for each action on template files
As i'm working with my theme i have found difficult to keep track of all actions and hooks, i think all actions should be commented with their respective hooks like you have already done on archive-product.php
2017-04-20 09:48:36 +02:00
Mike Jolley cffe326e0e Add variable so shipping calculator is shown on first row
Ref: #14461
2017-04-17 16:35:33 +01:00
Mike Jolley df57e73eae use div for comment-form-rating to prevent bad nested markup due to star ratings
Fixes #14434
2017-04-17 12:23:43 +01:00
Govind Kumar fef8b8365b changed thumbnail image filter name 2017-04-17 15:43:17 +05:30
Govind Kumar d8f7deb92c added new filter for product thumbnail size. 2017-04-17 11:30:26 +05:30
refael iliaguyev 14806a4a6f Bump version for variable.php 2017-04-15 20:23:27 +03:00
AJ Clarke 3b09dc5793 Undo edits 2017-04-14 17:39:00 -07:00
AJ Clarke 3731d629f5 Undo product gallery mods 2017-04-14 17:37:54 -07:00
AJ Clarke e037635f18 Prevents duplicate thumbnail when featured image is added to the product gallery 2017-04-14 09:52:13 -07:00
Theme.al 969b0f4ee2 Notices hook information
Notices are hooked here on product archive pages but still im not sure if this is the right place. They should be above the page title probably in their own action like they are on the content-single-product.php template
2017-04-14 11:37:32 +02:00
Theme.al 52d56bed41 Update mini-cart.php
empty cart message should be outside of the cart UL list as of course its not a HTML list.
2017-04-14 11:01:18 +02:00
Claudio Sanches 3618cfa672 Bump cart/cart.php template version 2017-04-13 13:52:41 -03:00
Claudio Sanches daf8b3a39b Bump single-product/add-to-cart/grouped.php template version
Because fixes introduced in #14346
2017-04-13 12:33:21 -03:00
Claudio Sanches 00f01af0bd Merge pull request #14346 from rwilliam/patch-1
Group Child porduct link visiblity isuues - Update grouped.php
2017-04-13 12:31:58 -03:00
Claudio Sanches f2dc15d09b Merge pull request #14339 from rellect/cart_escape_attr
Escape attributes in cart.php
2017-04-13 12:20:56 -03:00
rwilliam 910588b91f Update grouped.php
Group child product link viable in main group product page if we set child product visibility to hidden 
if we change  $product->is_visible() to $grouped_product->is_visible() then it working fine
2017-04-13 19:05:13 +05:30
Refael Iliaguyev ec47a7b35f Escape attributes 2017-04-13 10:39:21 +03:00
Claudio Sanches d04e1f42ea Merge pull request #14251 from woocommerce/fix/gallery-titles
Fix caption on thumbnails as well as main image
2017-04-11 17:33:04 -03:00
Mike Jolley 2d973503ee Merge pull request #14204 from rafsuntaskin/version-bump
Version bump on templates that were updated on milestone 2.7 and 3.0
2017-04-11 19:34:39 +01:00
Mike Jolley 34f2c66333 Merge pull request #14237 from dixitadusara/update-issue-14178
Updated templates/checkout/form-shipping.php template version
2017-04-11 12:54:57 +01:00
Mike Jolley 98b21b6be7 Fix caption on thumbnails as well as main image 2017-04-11 12:08:04 +01:00
Mike Jolley 4f2a46e83a Merge pull request #14223 from woocommerce/fix/14218
Gallery images should show caption not description
2017-04-11 10:31:04 +01:00
dixitadusara f5d40ce16d updated templates/checkout/form-shipping.php template version ref #14178 2017-04-11 10:43:03 +05:30
Mike Jolley d89567f0e6 Gallery images should show caption not description
Fixes #14218
2017-04-10 22:38:16 +01:00
rafsuntaskin d2287521df several other templates version bump those have labels milestone 2.7 and 3.0 2017-04-10 21:34:35 +06:00
rafsuntaskin 41f20d84da view-order.php version bump, resolves #14183 2017-04-10 21:14:42 +06:00
dixitadusara 3f6d851500 form-shipping.php template has not updated the version number ref #14178 2017-04-10 14:25:55 +05:30
refael iliaguyev 6b0ea403f3 fix #14133 2017-04-08 15:18:54 +03:00
Claudio Sanches 9c61914a14 Merge pull request #14116 from woocommerce/fix/14114
Prevent notice in thumbnails html
2017-04-07 13:30:20 -03:00
Mike Jolley 2638f61a86 Prevent notice in thumbnails html
Fixes #14114
2017-04-07 17:05:28 +01:00
refael iliaguyev 3e0daa8215 Bump template versions for changes 2017-04-07 14:22:52 +03:00
Claudio Sanches 567a551d83 Fixed shortcode render for variations and backwards compatibility
Fixes #13949
2017-04-06 13:00:02 -03:00
Claudio Sanches f2fa4f127d Added context to string in result-count.php to make GlotPress catch
Missing this string on GlotPress, since the first part is equal from the
previous translatable string.
2017-04-06 11:07:48 -03:00
Claudio Sanches 3ce04d2bee Merge pull request #14024 from dixitadusara/issue-14016
fixes issue-14016
2017-04-06 10:42:33 -03:00
Claudio Sanches 49ce6bdda5 Merge pull request #14022 from dixitadusara/issue-14015
fixes issue-14015
2017-04-06 10:41:13 -03:00
Claudio Sanches 954c45d01c Merge pull request #14021 from dixitadusara/issue-14020
fixes added issue-14020
2017-04-06 10:40:58 -03:00
dixitadusara a0843e8bb9 fixes issue-14016 2017-04-06 16:26:21 +05:30
dixitadusara 205a9b6c24 fixes issue-14015 2017-04-06 15:52:34 +05:30
dixitadusara fe87815d8d fixes added issue-14020 2017-04-06 15:44:22 +05:30
Mike Jolley 41553930cd Template version bump
Closes #13988
2017-04-06 09:59:24 +01:00
Claudio Sanches f250cac8d1 Merge pull request #13967 from woocommerce/fix/13933
Use parent settings for determining if variations are sold individually.
2017-04-05 15:33:17 -03:00
Claudiu Lodromanean 5389844a1b Use parent data for sold_individually 2017-04-05 11:02:26 -07:00
Md. Kowsar Hossain 2bbf5ed42f version number updated in up-sells template 2017-04-05 18:26:23 +06:00
Mike Jolley 71ce5b85bc Merge pull request #13884 from woocommerce/fix-13875-13877
Private and variable product fixes
2017-04-03 19:16:35 +01:00
Manos Psychogyiopoulos d4c58588fd Fix unnecessary margin in #13879 2017-04-03 15:03:32 +03:00
Mike Jolley c06fdc2e2e If product has_options, don't show qty in grouped product add to cart form
Fixes #13875
2017-04-03 12:05:28 +01:00
Manos Psychogyiopoulos bec1f9b113 Use `small` 2017-04-03 11:50:02 +03:00
Manos Psychogyiopoulos 196c317ab1 Fix order item meta e-mails style 2017-04-03 11:37:51 +03:00
Mike Jolley 62bd505bda CSS transition 2017-03-31 15:16:10 +01:00
Manos Psychogyiopoulos eb43190e1e Stripslashes of posted variation attribute values
Resolves issues with values that contain quotes, for instance.
2017-03-24 12:00:46 +02:00
Mike Jolley e8974f709d docblock
Closes #13740
2017-03-23 14:25:56 +00:00
terenceneedssurgery a86d4f62f3 Checkout: Order Pay to Template 2017-03-23 11:25:08 +00:00
Mike Jolley 47f363a463 data-src on all gallery images
#13710
2017-03-22 13:26:00 +00:00
Mike Jolley e2f1449553 Set data-src
Closes #13710
2017-03-22 12:51:27 +00:00
Claudio Sanches f1dab3fdce Fixed coding standards 2017-03-21 12:38:35 -03:00
refael iliaguyev e13ba40254 use variable for aligning 2017-03-20 22:26:20 +02:00
refael iliaguyev af55947f87 Revert "Drop repeated conditions for rtl aligning, use variable instead"
This reverts commit a894e7b241.
2017-03-20 22:21:44 +02:00
refael iliaguyev a894e7b241 Drop repeated conditions for rtl aligning, use variable instead 2017-03-20 20:53:16 +02:00
refael iliaguyev 6aed418b6f replace hard coded aligning with rtl conditions 2017-03-19 22:23:18 +02:00
Mike Jolley 476041698f tabs 2017-03-17 11:27:23 +00:00
Krzysztof Grabania b1af09c550 Hide Customer details section in email if $fields are empty 2017-03-16 14:02:19 +01:00
Claudio Sanches 59c2849736 Changed version 2.7 to 3.0 2017-03-15 13:36:53 -03: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 448954b9ad Merge pull request #13592 from woocommerce/13572-prototype-pattern
Reusable galleries
2017-03-14 18:26:22 +00:00
Mike Jolley 1a2989376d Revert "Remove clear divs from address forms"
This reverts commit 4f8030aafb.
2017-03-14 17:32:04 +00:00
Mike Jolley 1b8e4612ee Load markup for photoswipe so shortcodes can use it 2017-03-14 16:32:59 +00:00
Manos Psychogyiopoulos 20d2c8b269 merge branch 'master' into multiple-and-dynamic-galleries 2017-03-14 15:31:01 +02:00
Mike Jolley 4f8030aafb Remove clear divs from address forms
#13583
2017-03-14 11:19:59 +00:00
Manos Psychogyiopoulos 9181f1c151 allow init with args 2017-03-14 12:55:25 +02:00
James Koster 53b7844412 Replace figure tags with divs. closes #13546
For easier theme support
2017-03-14 10:42:21 +00:00
Claudio Sanches ad1073c212 Merge pull request #13575 from woocommerce/fix-13573
Only show thumbs if there is a main post thumbnail
2017-03-13 16:25:48 -03:00
Mike Jolley ee0896a7ec Only show thumbs if there is a main post thumbnail 2017-03-13 18:04:43 +00:00
Mike Jolley 7fd4005475 Wrap hidden input in div
Closes #13541
2017-03-13 17:56:25 +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 8ab839a030 Replace template usage of dates 2017-03-10 16:35:47 +00:00
Aristeides Stathopoulos 10ffc92a73 Inline control structures are not allowed 2017-03-07 22:24:24 +02:00
Claudio Sanches 88f32a782e Fixed download file in downloads.php template 2017-03-06 19:45:13 -03:00
Mike Jolley 31b10d861e Add wrappers around sortable checkout fields
Fixes #13432
Fixes #13434
2017-03-02 15:08:02 +00:00
Mike Jolley f7fe5812d0 Revert "Wrap order notes field"
This reverts commit 8500beb56d.
2017-03-02 14:42:08 +00:00
Mike Jolley 8500beb56d Wrap order notes field
Fixes #13432
2017-03-02 14:23:17 +00:00
Mike Jolley d390aca2d5 Incorrect nesting of account fields 2017-02-28 09:26:59 +00:00
mik-laj 0c0676fb68 Add language attributes to e-mail header 2017-02-26 04:31:45 +01:00
Mike Jolley dc30c264c9 Move account wrapper to prevent field reordering
Fixes #13301
2017-02-23 11:35:03 +00:00
Claudio Sanches 486a81bf12 Fixed coding standards 2017-02-17 16:10:15 -02:00
Mike Jolley 89be42e5a3 woocommerce_before_add_to_cart_quantity and after actions 2017-02-17 15:53:28 +00:00
Mike Jolley 81bad72c78 When showing sold individually item in grouped template, use checkbox 2017-02-17 15:53:15 +00:00
Mike Jolley 846e1ca25c If max and min value are identical, don't show qty input 2017-02-17 15:51:59 +00:00
Mike Jolley 4271352502 Escaping dates and statuses 2017-02-16 15:59:28 +00:00
Mike Jolley b81e56b597 Escape $args['list_class'] 2017-02-10 11:23:47 +00:00
Mike Jolley 234b4cfa91 Merge pull request #13009 from woocommerce/gallery-tweaks
Gallery tweaks
2017-02-09 12:34:23 +00:00
Mike Jolley 9c523d2bc1 Merge branch 'pr/12937'
# Conflicts:
#	templates/single-product/product-image.php
2017-01-27 16:52:46 +00:00
Mike Jolley 9bc5eefc98 Use array for class filter 2017-01-27 16:52:23 +00:00
Mike Jolley db77ad96e1 Add image links to template files 2017-01-27 15:35:20 +00:00
Mike Jolley d2f4859f18 Merge branch 'pr/12938' 2017-01-26 14:50:49 +00:00
Mike Jolley e99d8c9ef6 Name filter woocommerce_single_product_image_thumbnail_html 2017-01-26 14:50:40 +00:00
Maximus80 be3a77be32 add column data attr to the single product image gallery wrapper 2017-01-23 14:27:25 +01:00
Maximus80 afc3d3a26a add filter for single product image gallery wrapper classes 2017-01-23 14:25:31 +01:00
Maximus80 5dca57f239 add filter for the additional single product image gallery thumbnails 2017-01-23 14:25:05 +01:00
Claudiu Lodromanean 20da494eb6 Nope I was right before. Dont commit before coffee. 2017-01-20 06:56:09 -08:00
Claudiu Lodromanean a04ccb1941 12518 Missed an esc_html 2017-01-20 06:54:50 -08:00
Claudiu Lodromanean 9f94b7d51d 12518 Sanitizing and brackets 2017-01-19 15:48:15 -08:00
Claudiu Lodromanean b977784a66 Needed a space for style guidelines 2017-01-18 14:58:36 -08:00
Claudiu Lodromanean cc5452cfe3 Make product attributes link through to archives
Issue #12518. In the "Additional information" tab, link public attributes to their archive pages
2017-01-18 14:53:01 -08:00
James Koster 01b6471c0b Use wc_format_content() #12861 2017-01-18 18:00:08 +00:00
James Koster f0c35ed45e Display (toggle-able) terms inline on the checkout rather than opening a new window 2017-01-17 15:18:23 +00:00
Claudio Sanches bd655af072 Restore attributes ordering, closes #12847 2017-01-16 21:11:56 -02:00
James Koster 88a378ea79 Don't allow users to open the lightbox for placeholder images 2017-01-16 14:17:03 +00:00
James Koster 5b01bb693e Correct use of `--` in checkbox / checkbox label classes 2017-01-13 17:26:09 +00:00
Claudio Sanches fff98a9fbd Removed more legacy $woocommerce variable 2017-01-11 13:31:31 -02:00
James Koster d5b86259c5 Update css classes to use latest convention. Also adds a class to the tr based on the order status. closes #12658
Didn’t update the template version as we’re just adding new classes.
2017-01-09 13:32:32 +00: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 b150e4c790 Fix image display when only placeholders are visible. 2017-01-06 11:51:09 +00:00
Andrew Minion 9c9701e92e add product id and class to grouped product rows 2016-12-27 15:24:42 -05:00
Shohei Tanaka 79686dbd8a Mistake numbering in sprintf
change %3$s to %2$s
2016-12-23 20:50:40 +09:00
Mike Jolley 4394f24326 Missing meta function ids
Fixes #12644
2016-12-19 12:10:28 +00:00
Mike Jolley 2e77e38d33 colour -> color
#12627
2016-12-19 11:41:48 +00:00
Manos Psychogyiopoulos af3c24881d render product attributes in 'woocommerce_product_additional_information' action 2016-12-18 00:53:45 +02:00
Claudio Sanches d9a165c758 Fixed coding standards and improved #12597 2016-12-14 17:51:01 -02:00
Claudio Sanches 5b0357ee9d Merge pull request #12597 from andreagrillo/master
wrong information on checkout page for not logged in users
2016-12-14 17:41:40 -02:00
agrillo e08184ff06 if the option woocommerce_enable_checkout_login_reminder (under WooCommerce > Settings > Accounts and look for login option) is unchecked in checkout appears the string "If you are a returning customer please login at the top of the page.", but there aren't any login box at the top of page. 2016-12-14 10:49:00 +01:00
Mike Jolley 74f3972e26 Add sort parameter to checkout fields to aid with sorting per locale. 2016-12-12 15:23:28 +00:00
Mike Jolley fe9e89f3b7 wc_logout_url function 2016-12-07 12:04:44 +00:00
Mike Jolley 4130ae0e1f Merge pull request #12520 from woocommerce/feedback-12495
2.7 CRUD Feedback
2016-12-05 13:47:58 +00:00
Mike Jolley 4cd4e8b9f8 Remove register_form action to avoid outputting non-validated captchas
Closes #12500
2016-12-05 12:00:48 +00:00
Mike Jolley d67f17a789 Put get_availability functions back in main product classes. 2016-12-02 16:46:35 +00:00
Mike Jolley 43d362d107 Tidy, refactor, and split up methods in checkout class 2016-11-25 21:46:34 +00:00
Mike Jolley 11bb13d613 Use getters instead of property 2016-11-25 20:16:38 +00:00
Mike Jolley 430a31a963 Add notice class to checkout message
Closes #12245
2016-11-22 14:21:21 +00:00
Claudio Sanches e1aeba9f21 Remove all wp_get_post_terms() and wp_get_object_terms() terms occurrences 2016-11-17 17:02:05 -02:00
James Koster b0d326ec2e Update old suitCSS inspired class names to use BEM model. #10674 2016-11-17 11:56:57 +00:00
James Koster f709d6be3c Standardise class names #12297 2016-11-17 11:51:54 +00:00
James Koster 6c67c70fa8 Merge pull request #12297 from woocommerce/normalize-checkbox-labels
Updated use of labels for checkboxes
2016-11-17 11:41:12 +00:00
Claudio Sanches f201684917 Wrap checkbox label texts into span elements 2016-11-16 19:44:22 -02: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 e1dd355cd9 Cart js class (#12172)
* Add classes and revise JS

* Block correct element in totals

* If no form with class is present, revert to reloading page

* Reload

* Rebase fail
2016-11-11 16:00:32 +00:00
Claudio Sanches 1939abf059 Updated use of labels for checkboxes 2016-11-09 22:41:14 -02:00
Rami Yushuvaev 7447dd4eec Fix tab IDs 2016-11-05 01:56:14 +02:00
Rami Yushuvaev 35c2912fd2 a11y - make tabs accessible using "role" and "aria" tags 2016-11-05 00:44:55 +02:00
Claudio Sanches 4982e91e2c Fixed hardcoded strings in woocommerce/single-product/photoswipe.php template 2016-11-04 17:31:34 -02:00
Rami Yushuvaev d85075dcb0 a11y: replace `title` attributes with `aria-label`, for better accessibility 2016-11-04 17:41:51 +02:00
Rami Yushuvaev 9469673c05 a11y: remove unneeded `title` attributes 2016-11-04 17:40:15 +02:00
Claudio Sanches 2de494e105 Merge pull request #12219 from ramiy/i18n-translation-comments
i18n: add translators comments
2016-11-03 13:24:35 -02:00
Rami Yushuvaev 55f08d62ae add translators comments 2016-10-29 23:03:28 +03:00
Gabe Shackle f161278254 Add $load_address to 'woocommerce_my_account_edit_address_title'
Add $load_address to the 'woocommerce_my_account_edit_address_title' filter so that scripts can determine which address is being edited. Currently there is no obvious way to determine what address is being edited if it is not the 'billing' or 'shipping' built-in addresses. By adding $load_address we can use that to detect the name of the address being edited and display the corresponding title.
2016-10-27 19:39:56 -05: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 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 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
Claudio Sanches 68b864313a Fixed conflicts 2016-10-13 16:58:20 -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 705dc18991 Merge branch 'pr/12064' 2016-10-12 11:54:40 +01:00
Mike Jolley a42d021807 We can still include empty meta here - change not needed 2016-10-12 11:54:34 +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
Lucas Stark 3e11e168cd Only display price meta when price is not empty 2016-10-11 09:15:45 -04: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 35f11dea28 Fixed the download URL in my downloads page 2016-10-05 15:27:11 -03:00
Claudio Sanches e972c1aac2 Change woothemes.com to woocommerce.com, closes #11966 2016-09-27 12:44:48 -03:00
opportus d22589ba5a improved structured data - valids TCI checks - revision1 2016-09-21 17:11:34 +02:00
opportus cff7189a87 improved structured data - branch update
Travis CI check...
2016-09-21 15:52:27 +02:00
Claudio Sanches f08ad38f12 Added fixes suggested by WP CodeSniffer #11954 2016-09-20 22:24:03 -03:00
matheusgimenez 6ddd09098b change echo __() to _e() on cart/proceed-to-checkout.php 2016-09-20 21:38:25 -03:00
Claudio Sanches beaeac9648 Fixed coding standards
cc @mikejolley
2016-09-15 19:22:30 -03:00
opportus 8123ba6184 improved structured data - merge conflict fix 2016-09-14 22:15:49 +02:00
Mike Jolley 78bde4ad09 Tweak download layout 2016-09-12 23:00:31 +01:00
Aristeides Stathopoulos 7a509f53d4 Merge pull request #4 from woothemes/master
sync
2016-09-09 03:17:28 +03:00
Aristeides Stathopoulos 9668247b95 WordPress.PHP.YodaConditions.NotYoda 2016-09-09 03:14:28 +03:00
Claudio Sanches 1259a118c8 Fixed dashboard.php documentation, closes #11878 2016-09-08 15:58:37 -03:00
Mike Jolley 311c540662 Merge pull request #11833 from aristath/master
Coding Standards (2nd pass)
2016-09-07 10:14:17 +01:00
James Koster 0edfadaf0d Tidy up order markup and add our new css classes. #11784 2016-09-06 19:55:16 +01:00
Mike Jolley ac7476002a autocomplete="off"
Closes #11839
2016-09-06 10:30:48 +01:00
Aristeides Stathopoulos 2346c3b735 Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace 2016-09-02 06:15:49 +03:00
Aristeides Stathopoulos cc0b29ccf4 PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket 2016-09-02 05:00:46 +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 8fe4cd65a4 PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket 2016-09-02 04:12:22 +03:00
Aristeides Stathopoulos c823236098 Fix failing tests. 2016-09-02 00:33:36 +03:00
Aristeides Stathopoulos fde1037757 fix failing tests. 2016-09-01 23:50:14 +03:00
opportus 53a257bb91 improved structured data - merge conflict fix 2016-09-01 14:15:15 +02:00
Mike Jolley 1b2df3dd3b Merge branch 'pr/11797'
# Conflicts:
#	includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php
#	includes/api/class-wc-rest-coupons-controller.php
#	includes/class-wc-coupon.php
#	tests/unit-tests/api/coupons.php
#	tests/unit-tests/coupon/crud.php
2016-09-01 11:46:05 +01:00
Mike Jolley 047242515d Make API and CRUD use consistent keys and make use of data 2016-08-30 17:50:35 +01: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 a19848978a WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis 2016-08-27 07:47:24 +03:00
Aristeides Stathopoulos 2101dae5a0 WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen 2016-08-27 07:35:04 +03:00
Aristeides Stathopoulos dcd5495af9 WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBetweenStructureColon 2016-08-27 07:32:21 +03:00
Aristeides Stathopoulos 82f3cc221e WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis 2016-08-27 07:23:02 +03:00
Aristeides Stathopoulos 741f2b954a Squiz.WhiteSpace.SuperfluousWhitespace.EndLine 2016-08-27 07:01:22 +03:00
Aristeides Stathopoulos ff852038c9 WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys 2016-08-27 06:11:30 +03:00