Bring up to date with master

This commit is contained in:
claudiulodro 2017-07-28 14:27:19 -07:00
commit e1fad0d7eb
199 changed files with 2554 additions and 1711 deletions

View File

@ -15,24 +15,24 @@ engines:
- javascript
ratings:
paths:
- "includes/*"
- "includes/*"
exclude_paths:
- tests/*
- apigen/*
- dummy-data/*
- i18n/*
- includes/api/legacy/*
- includes/libraries/*
- includes/updates/*
- includes/gateways/simplify-commerce/*
- includes/shipping/legacy-*
- includes/wc-deprecated-functions.php
- includes/class-wc-legacy-api.php
- assets/js/accounting/**
- assets/js/jquery-*
- assets/js/prettyPhoto/*
- assets/js/round/*
- assets/js/select2/*
- assets/js/selectWoo/*
- assets/js/stupidtable/*
- assets/js/zeroclipboard/*
- "tests/"
- "apigen/"
- "dummy-data/"
- "i18n/"
- "includes/api/legacy/"
- "includes/libraries/"
- "includes/updates/"
- "includes/gateways/simplify-commerce/"
- "includes/shipping/legacy-*"
- "includes/wc-deprecated-functions.php"
- "includes/class-wc-legacy-api.php"
- "assets/js/accounting/"
- "assets/js/jquery-*"
- "assets/js/prettyPhoto/"
- "assets/js/round/"
- "assets/js/select2/"
- "assets/js/selectWoo/"
- "assets/js/stupidtable/"
- "assets/js/zeroclipboard/"

View File

@ -1,3 +0,0 @@
src_dir: .
coverage_clover: ./tmp/clover.xml
json_path: ./tmp/coveralls-upload.json

View File

@ -1,35 +1,56 @@
<!-- Hi there! This form is for reporting bugs and issues specific to the WooCommerce plugin. This is not a support portal. If you need technical support from a human being, please submit a ticket via the helpdesk instead: https://woocommerce.com/contact-us/ -->
<!-- Usage questions can also be directed to the public support forum here: https://wordpress.org/support/plugin/woocommerce, unless this is a question about a premium extension in which case you should use the helpdesk. -->
<!-- If you have a feature request, submit it to: http://ideas.woocommerce.com/forums/133476-woocommerce -->
<!-- Please be as descriptive as possible; issues lacking the below details, or for any other reason than to report a bug, may be closed without action. -->
## Prerequisites
<!-- Mark checked items with an [x] -->
<!-- Mark completed items with an [x] -->
- [ ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate
- [ ] The issue still exists against the latest `master` branch of WooCommerce
- [ ] This is not a usage question (Those should be directed to the [community](https://wordpress.org/support/plugin/woocommerce), unless this is a question about a premium plugin in which you should [use the helpdesk](https://woocommerce.com/my-account/tickets/) for official extensions or contact the author of 3rd party extensions)
- [ ] The issue still exists against the latest `master` branch of WooCommerce on Github
- [ ] I have attempted to find the simplest possible steps to reproduce the issue
- [ ] I have included a failing test as a pull request (Optional)
## Steps to reproduce the issue
<!-- We need to be able to reproduce the bug in order to fix it so please be descriptive! -->
1.
2.
3.
## Expected behavior and actual behavior
## Expected/actual behavior
When I follow those steps, I see...
I was expecting...
I was expecting to see...
## Environment
<details>
```
Grab the system status report from WooCommerce > System Status and paste it here.
```
</details>
## Isolating the problem
<!-- Mark completed items with an [x] -->
- [ ] This bug happens with only WooCommerce plugin active
- [ ] This bug happens with a default WordPress theme active, or [Storefront](https://woocommerce.com/storefront/)
- [ ] I can reproduce this bug consistently
- [ ] I can reproduce this bug consistently using the steps above
## WordPress Environment
<details>
```
Copy and paste the system status report from **WooCommerce > System Status** in WordPress admin here.
```
</details>

View File

@ -1,32 +1,58 @@
filter:
excluded_paths:
- tests/*
- apigen/*
- dummy-data/*
- i18n/*
- includes/api/legacy/*
- includes/legacy/*
- includes/libraries/*
- includes/updates/*
- includes/gateways/simplify-commerce/*
- includes/shipping/legacy-*
- includes/wc-deprecated-functions.php
- includes/class-wc-legacy-api.php
build:
environment:
php: "7.1"
mysql: true
postgresql: false
redis: false
apache2:
modules:
- rewrite
variables:
WP_VERSION: latest
dependencies:
before:
- "bash tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION"
tests:
override:
-
command: "vendor/bin/phpunit -c phpunit.xml --coverage-clover=results"
coverage:
file: results
format: clover
tools:
php_code_sniffer:
config:
standard: WordPress
sensiolabs_security_checker: true
checks:
php:
avoid_closing_tag: false
avoid_superglobals: false
coding_standard:
name: WordPress
no_exit: false
no_global_keyword: false
one_class_per_file: false
psr2_class_declaration: false
psr2_control_structure_declaration: false
psr2_switch_declaration: false
variable_existence: false
verify_access_scope_valid: false
verify_argument_usable_as_reference: false
verify_property_names: false
no_global_keyword: false
psr2_switch_declaration: false
psr2_control_structure_declaration: false
psr2_class_declaration: false
one_class_per_file: false
no_exit: false
avoid_superglobals: false
avoid_closing_tag: false
tools:
sensiolabs_security_checker: true
filter:
excluded_paths:
- apigen/
- dummy-data/
- i18n/
- includes/api/legacy/
- includes/class-wc-legacy-api.php
- includes/gateways/simplify-commerce-deprecated/
- includes/gateways/simplify-commerce/includes/
- includes/legacy/
- includes/libraries/
- includes/shipping/legacy-*
- includes/updates/
- includes/vendor/
- includes/wc-deprecated-functions.php
- tests/

View File

@ -2,10 +2,8 @@ language: php
sudo: false
# Test main supported versions of PHP and HHVM against latest WP. 5.2 is min supported version.
# Test main supported versions of PHP and HHVM against latest WP.
php:
- 5.2
- 5.3
- 5.6
- 7.0
- 7.1
@ -18,6 +16,12 @@ matrix:
include:
- php: 5.6
env: WP_VERSION=latest WP_MULTISITE=1 PHP_LATEST_STABLE=7.1
- php: 5.3
env: WP_VERSION=latest WP_MULTISITE=0 PHP_LATEST_STABLE=7.1
dist: precise
- php: 5.2
env: WP_VERSION=latest WP_MULTISITE=0 PHP_LATEST_STABLE=7.1
dist: precise
before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
@ -25,8 +29,7 @@ before_script:
- bash tests/bin/travis.sh before
script:
- bash tests/bin/phpunit.sh
- bash tests/bin/travis.sh during
- phpunit -c phpunit.xml
after_script:
- bash tests/bin/travis.sh after

View File

@ -1 +1 @@
div.woocommerce-message{overflow:hidden;position:relative;border-right-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}.woocommerce-message a.button-primary,p.woocommerce-actions a.button-primary{background:#bb77ae;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,-1px 0 1px #a36597,0 1px 1px #a36597,1px 0 1px #a36597}.woocommerce-message a.button-primary:active,.woocommerce-message a.button-primary:focus,.woocommerce-message a.button-primary:hover,p.woocommerce-actions a.button-primary:active,p.woocommerce-actions a.button-primary:focus,p.woocommerce-actions a.button-primary:hover{background:#a36597;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:absolute;top:0;left:0;padding:10px 21px 10px 15px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:absolute;top:8px;right:0;transition:all .1s ease-in-out}.woocommerce-message a.button-primary,.woocommerce-message a.button-secondary,p.woocommerce-actions a.button-primary,p.woocommerce-actions a.button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-right:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;left:12px;position:absolute}
div.woocommerce-message{overflow:hidden;position:relative;border-right-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}.woocommerce-message a.button-primary,p.woocommerce-actions a.button-primary{background:#bb77ae;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,-1px 0 1px #a36597,0 1px 1px #a36597,1px 0 1px #a36597}.woocommerce-message a.button-primary:active,.woocommerce-message a.button-primary:focus,.woocommerce-message a.button-primary:hover,p.woocommerce-actions a.button-primary:active,p.woocommerce-actions a.button-primary:focus,p.woocommerce-actions a.button-primary:hover{background:#a36597;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:absolute;top:0;left:0;padding:10px 21px 10px 15px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:absolute;top:8px;right:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.woocommerce-message a.button-primary,.woocommerce-message a.button-secondary,p.woocommerce-actions a.button-primary,p.woocommerce-actions a.button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-right:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;left:12px;position:absolute}

View File

@ -1 +1 @@
div.woocommerce-message{overflow:hidden;position:relative;border-left-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}.woocommerce-message a.button-primary,p.woocommerce-actions a.button-primary{background:#bb77ae;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,1px 0 1px #a36597,0 1px 1px #a36597,-1px 0 1px #a36597}.woocommerce-message a.button-primary:active,.woocommerce-message a.button-primary:focus,.woocommerce-message a.button-primary:hover,p.woocommerce-actions a.button-primary:active,p.woocommerce-actions a.button-primary:focus,p.woocommerce-actions a.button-primary:hover{background:#a36597;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:absolute;top:0;right:0;padding:10px 15px 10px 21px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:absolute;top:8px;left:0;transition:all .1s ease-in-out}.woocommerce-message a.button-primary,.woocommerce-message a.button-secondary,p.woocommerce-actions a.button-primary,p.woocommerce-actions a.button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;right:12px;position:absolute}
div.woocommerce-message{overflow:hidden;position:relative;border-left-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}.woocommerce-message a.button-primary,p.woocommerce-actions a.button-primary{background:#bb77ae;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,1px 0 1px #a36597,0 1px 1px #a36597,-1px 0 1px #a36597}.woocommerce-message a.button-primary:active,.woocommerce-message a.button-primary:focus,.woocommerce-message a.button-primary:hover,p.woocommerce-actions a.button-primary:active,p.woocommerce-actions a.button-primary:focus,p.woocommerce-actions a.button-primary:hover{background:#a36597;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:absolute;top:0;right:0;padding:10px 15px 10px 21px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:absolute;top:8px;left:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.woocommerce-message a.button-primary,.woocommerce-message a.button-secondary,p.woocommerce-actions a.button-primary,p.woocommerce-actions a.button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;right:12px;position:absolute}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -989,6 +989,7 @@ ul.wc_coupon_list_block {
textarea,
select,
.wc-enhanced-select,
.wc-category-search,
.wc-customer-search {
width: 100%;
}
@ -5517,6 +5518,7 @@ table.bar_chart {
.woocommerce table.form-table .select2-container {
min-width: 400px !important;
}
.post-type-product .tablenav,
.post-type-shop_order .tablenav {
.actions {
overflow: visible;
@ -5877,3 +5879,12 @@ table.bar_chart {
}
}
}
.wc-pointer {
.wc-pointer-buttons {
.close {
float: left;
margin: 6px 0 0 15px;
}
}
}

View File

@ -1 +1 @@
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;text-align:center;float:right;font-size:.8em;border-right:1px solid #fff;border-left:1px solid #ececec;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-right:0}ul.woocommerce_stats li:last-child{border-left:0}ul.woocommerce_stats strong{font-family:Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:right;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:left;position:absolute;left:0;top:50%;margin-left:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;right:0;width:100%;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:right;margin-left:12px;margin-bottom:12px}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a::before{font-family:Dashicons;content:'\f185'}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a::before{content:'\e006'}#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-left:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.processing-orders a::before{content:'\e011';color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a::before{content:'\e033';color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock{border-left:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a::before{content:'\e016';color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a::before{content:'\e013';color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:right;margin:0 0 5px 10px}#woocommerce_dashboard_recent_reviews .star-rating{float:left;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-right:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating::before{content:'\e021\e021\e021\e021\e021';color:#b3b2b2;float:right;top:0;right:0;position:absolute;letter-spacing:.1em}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:right;top:0;right:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span::before{content:'\e020\e020\e020\e020\e020';top:0;position:absolute;right:0;letter-spacing:.1em;color:#9c5d90}#dash-right-now li.product-count a::before{font-family:WooCommerce;content:'\e01d'}
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;text-align:center;float:right;font-size:.8em;border-right:1px solid #fff;border-left:1px solid #ececec;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-right:0}ul.woocommerce_stats li:last-child{border-left:0}ul.woocommerce_stats strong{font-family:Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:right;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;-webkit-transition:all ease .5s;transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:left;position:absolute;left:0;top:50%;margin-left:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;right:0;width:100%;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:right;margin-left:12px;margin-bottom:12px}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a::before{font-family:Dashicons;content:'\f185'}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a::before{content:'\e006'}#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-left:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.processing-orders a::before{content:'\e011';color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a::before{content:'\e033';color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock{border-left:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a::before{content:'\e016';color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a::before{content:'\e013';color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:right;margin:0 0 5px 10px}#woocommerce_dashboard_recent_reviews .star-rating{float:left;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-right:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating::before{content:'\e021\e021\e021\e021\e021';color:#b3b2b2;float:right;top:0;right:0;position:absolute;letter-spacing:.1em}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:right;top:0;right:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span::before{content:'\e020\e020\e020\e020\e020';top:0;position:absolute;right:0;letter-spacing:.1em;color:#9c5d90}#dash-right-now li.product-count a::before{font-family:WooCommerce;content:'\e01d'}

View File

@ -1 +1 @@
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;text-align:center;float:left;font-size:.8em;border-left:1px solid #fff;border-right:1px solid #ececec;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-left:0}ul.woocommerce_stats li:last-child{border-right:0}ul.woocommerce_stats strong{font-family:Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:left;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:right;position:absolute;right:0;top:50%;margin-right:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:left;margin-right:12px;margin-bottom:12px}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a::before{font-family:Dashicons;content:'\f185'}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a::before{content:'\e006'}#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-right:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.processing-orders a::before{content:'\e011';color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a::before{content:'\e033';color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock{border-right:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a::before{content:'\e016';color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a::before{content:'\e013';color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:left;margin:0 10px 5px 0}#woocommerce_dashboard_recent_reviews .star-rating{float:right;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-left:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating::before{content:'\e021\e021\e021\e021\e021';color:#b3b2b2;float:left;top:0;left:0;position:absolute;letter-spacing:.1em}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span::before{content:'\e020\e020\e020\e020\e020';top:0;position:absolute;left:0;letter-spacing:.1em;color:#9c5d90}#dash-right-now li.product-count a::before{font-family:WooCommerce;content:'\e01d'}
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;text-align:center;float:left;font-size:.8em;border-left:1px solid #fff;border-right:1px solid #ececec;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-left:0}ul.woocommerce_stats li:last-child{border-right:0}ul.woocommerce_stats strong{font-family:Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:left;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;-webkit-transition:all ease .5s;transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:right;position:absolute;right:0;top:50%;margin-right:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:left;margin-right:12px;margin-bottom:12px}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a::before{font-family:Dashicons;content:'\f185'}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a::before{content:'\e006'}#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-right:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.processing-orders a::before{content:'\e011';color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a::before{content:'\e033';color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock{border-right:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a::before{content:'\e016';color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a::before{content:'\e013';color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:left;margin:0 10px 5px 0}#woocommerce_dashboard_recent_reviews .star-rating{float:right;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-left:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating::before{content:'\e021\e021\e021\e021\e021';color:#b3b2b2;float:left;top:0;left:0;position:absolute;letter-spacing:.1em}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span::before{content:'\e020\e020\e020\e020\e020';top:0;position:absolute;left:0;letter-spacing:.1em;color:#9c5d90}#dash-right-now li.product-count a::before{font-family:WooCommerce;content:'\e01d'}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
*{background:0 0!important;color:#000!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-right:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-right:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-right:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;box-shadow:none!important;border-bottom:1px solid gray!important}
*{background:0 0!important;color:#000!important;text-shadow:none!important;-webkit-filter:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;-webkit-transition:none!important;transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-right:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-right:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-right:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;box-shadow:none!important;border-bottom:1px solid gray!important}

View File

@ -1 +1 @@
*{background:0 0!important;color:#000!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-left:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-left:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-left:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;box-shadow:none!important;border-bottom:1px solid gray!important}
*{background:0 0!important;color:#000!important;text-shadow:none!important;-webkit-filter:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;-webkit-transition:none!important;transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-left:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-left:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-left:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;box-shadow:none!important;border-bottom:1px solid gray!important}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -902,10 +902,21 @@ button.pswp__button--zoom:hover {
.select2-choice:hover {
box-shadow: none !important;
}
.select2-choice {
padding: .7em 0 .7em .7em;
}
.select2-container .select2-selection--single {
height: 48px;
}
.select2-container .select2-selection--single .select2-selection__rendered {
line-height: 48px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 46px;
}
.select2-container--focus .select2-selection {
border-color: black;
}
}
.woocommerce-checkout-review-order-table {
@ -1028,6 +1039,10 @@ button.pswp__button--zoom:hover {
}
}
}
.select2-container--focus .select2-selection {
border-color: white;
}
}
/**

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1410,6 +1410,46 @@ p.demo_store,
font-weight: bold;
}
.woocommerce-order-downloads,
.woocommerce-customer-details,
.woocommerce-order-details {
margin-bottom: 2em;
*:last-child {
margin-bottom: 0;
}
}
.woocommerce-customer-details {
address {
font-style: normal;
margin-bottom: 0;
border: 1px solid rgba(0, 0, 0, 0.1);
border-bottom-width: 2px;
border-right-width: 2px;
text-align: left;
width: 100%;
border-radius: 5px;
padding: 6px 12px;
}
.woocommerce-customer-details--phone,
.woocommerce-customer-details--email {
margin-bottom: 0;
padding-left: 1.5em;
}
.woocommerce-customer-details--phone::before {
@include iconbefore( '\e037' );
margin-left: -1.5em;
line-height: 1.75;
position: absolute;
}
.woocommerce-customer-details--email::before {
@include iconbefore( '\e02d' );
margin-left: -1.5em;
line-height: 1.75;
position: absolute;
}
}
/**
* Layered nav widget
*/

View File

@ -239,16 +239,19 @@ jQuery( function( $ ) {
// DATE PICKER FIELDS.
$( '.sale_price_dates_fields' ).each( function() {
var dates = $( this ).find( 'input' ).datepicker({
$( this ).find( 'input' ).datepicker({
defaultDate: '',
dateFormat: 'yy-mm-dd',
numberOfMonths: 1,
showButtonPanel: true,
onSelect: function( selectedDate ) {
var option = $( this ).is( '#_sale_price_dates_from, .sale_price_dates_from' ) ? 'minDate' : 'maxDate';
var instance = $( this ).data( 'datepicker' );
var date = $.datepicker.parseDate( instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings );
var option = $( this ).next().is('.hasDatepicker') ? 'minDate' : 'maxDate',
instance = $( this ).data( 'datepicker' ),
dates = $( this ).closest( '.sale_price_dates_fields' ).find( 'input' ),
date = $.datepicker.parseDate( instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings );
dates.not( this ).datepicker( 'option', option, date );
$( this ).change();
}
});
});

File diff suppressed because one or more lines are too long

View File

@ -196,6 +196,47 @@ jQuery( function( $ ) {
});
}
});
// Ajax category search boxes
$( ':input.wc-category-search' ).filter( ':not(.enhanced)' ).each( function() {
var select2_args = $.extend( {
allowClear : $( this ).data( 'allow_clear' ) ? true : false,
placeholder : $( this ).data( 'placeholder' ),
minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : 3,
escapeMarkup : function( m ) {
return m;
},
ajax: {
url: wc_enhanced_select_params.ajax_url,
dataType: 'json',
delay: 250,
data: function( params ) {
return {
term: params.term,
action: 'woocommerce_json_search_categories',
security: wc_enhanced_select_params.search_categories_nonce
};
},
processResults: function( data ) {
var terms = [];
if ( data ) {
$.each( data, function( id, term ) {
terms.push({
id: term.slug,
text: term.formatted_name
});
});
}
return {
results: terms
};
},
cache: true
}
}, getEnhancedSelectFormatString() );
$( this ).selectWoo( select2_args ).addClass( 'enhanced' );
});
})
// WooCommerce Backbone Modal

File diff suppressed because one or more lines are too long

View File

@ -102,9 +102,11 @@
if ( _.size( zones ) ) {
// Sort zones
zones = _.sortBy( zones, function( zone ) {
return parseInt( zone.zone_order, 10 );
} );
zones = _( zones )
.chain()
.sortBy( function ( zone ) { return parseInt( zone.zone_id, 10 ); } )
.sortBy( function ( zone ) { return parseInt( zone.zone_order, 10 ); } )
.value();
// Populate $tbody with the current zones
$.each( zones, function( id, rowData ) {

View File

@ -1 +1 @@
!function(e,n,i,o){e(function(){var t=e(".wc-shipping-zones"),s=e(".wc-shipping-zone-rows"),d=e(".wc-shipping-zone-save"),a=i.template("wc-shipping-zone-row"),r=i.template("wc-shipping-zone-row-blank"),l=Backbone.Model.extend({changes:{},logChanges:function(e){var n=this.changes||{};_.each(e,function(e,i){n[i]=_.extend(n[i]||{zone_id:i},e)}),this.changes=n,this.trigger("change:zones")},discardChanges:function(e){var n=this.changes||{},i=null,o=_.indexBy(this.get("zones"),"zone_id");n[e]&&n[e].zone_order!==undefined&&(i=n[e].zone_order),delete n[e],null!==i&&o[e]&&o[e].zone_order!==i&&(n[e]=_.extend(n[e]||{},{zone_id:e,zone_order:i})),this.changes=n,0===_.size(this.changes)&&p.clearUnloadConfirmation()},save:function(){_.size(this.changes)?e.post(o+(o.indexOf("?")>0?"&":"?")+"action=woocommerce_shipping_zones_save_changes",{wc_shipping_zones_nonce:n.wc_shipping_zones_nonce,changes:this.changes},this.onSaveResponse,"json"):h.trigger("saved:zones")},onSaveResponse:function(e,i){"success"===i&&(e.success?(h.set("zones",e.data.zones),h.trigger("change:zones"),h.changes={},h.trigger("saved:zones")):window.alert(n.strings.save_failed))}}),c=Backbone.View.extend({rowTemplate:a,initialize:function(){this.listenTo(this.model,"change:zones",this.setUnloadConfirmation),this.listenTo(this.model,"saved:zones",this.clearUnloadConfirmation),this.listenTo(this.model,"saved:zones",this.render),s.on("change",{view:this},this.updateModelOnChange),s.on("sortupdate",{view:this},this.updateModelOnSort),e(window).on("beforeunload",{view:this},this.unloadConfirmation),e(document.body).on("click",".wc-shipping-zone-add",{view:this},this.onAddNewRow)},block:function(){e(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){e(this.el).unblock()},render:function(){var n=_.indexBy(this.model.get("zones"),"zone_id"),i=this;i.$el.empty(),i.unblock(),_.size(n)?(n=_.sortBy(n,function(e){return parseInt(e.zone_order,10)}),e.each(n,function(e,n){i.renderRow(n)})):i.$el.append(r),i.initRows()},renderRow:function(e){var n=this;n.$el.append(n.rowTemplate(e)),n.initRow(e)},initRow:function(e){var n=this,i=n.$el.find('tr[data-id="'+e.zone_id+'"]');n.renderShippingMethods(e.zone_id,e.shipping_methods),i.find(".wc-shipping-zone-delete").on("click",{view:this},this.onDeleteRow)},initRows:function(){0==e("tbody.wc-shipping-zone-rows tr").length%2?t.find("tbody.wc-shipping-zone-rows").next("tbody").find("tr").addClass("odd"):t.find("tbody.wc-shipping-zone-rows").next("tbody").find("tr").removeClass("odd"),e("#tiptip_holder").removeAttr("style"),e("#tiptip_arrow").removeAttr("style"),e(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:50})},renderShippingMethods:function(i,o){var t=e('.wc-shipping-zones tr[data-id="'+i+'"]').find(".wc-shipping-zone-methods ul");t.find(".wc-shipping-zone-method").remove(),_.size(o)?(o=_.sortBy(o,function(e){return parseInt(e.method_order,10)}),_.each(o,function(e){var n="method_disabled";"yes"===e.enabled&&(n="method_enabled"),t.append('<li class="wc-shipping-zone-method '+n+'">'+e.title+"</li>")})):t.append('<li class="wc-shipping-zone-method">'+n.strings.no_shipping_methods_offered+"</li>")},onDeleteRow:function(i){var o=i.data.view.model,t=_.indexBy(o.get("zones"),"zone_id"),s={},d=e(this).closest("tr").data("id");i.preventDefault(),window.confirm(n.strings.delete_confirmation_msg)&&t[d]&&(delete t[d],s[d]=_.extend(s[d]||{},{deleted:"deleted"}),o.set("zones",t),o.logChanges(s),i.data.view.block(),i.data.view.model.save())},setUnloadConfirmation:function(){this.needsUnloadConfirm=!0,d.prop("disabled",!1)},clearUnloadConfirmation:function(){this.needsUnloadConfirm=!1,d.prop("disabled",!0)},unloadConfirmation:function(e){if(e.data.view.needsUnloadConfirm)return e.returnValue=n.strings.unload_confirmation_msg,window.event.returnValue=n.strings.unload_confirmation_msg,n.strings.unload_confirmation_msg},updateModelOnChange:function(n){var i=n.data.view.model,o=e(n.target),t=o.closest("tr").data("id"),s=o.data("attribute"),d=o.val(),a=_.indexBy(i.get("zones"),"zone_id"),r={};a[t]&&a[t][s]===d||(r[t]={},r[t][s]=d),i.logChanges(r)},updateModelOnSort:function(n){var i=n.data.view.model,o=_.indexBy(i.get("zones"),"zone_id"),t=e("tbody.wc-shipping-zone-rows tr"),s={};_.each(t,function(n){var i=e(n).data("id"),t=null,d=parseInt(e(n).index(),10);o[i]&&(t=parseInt(o[i].zone_order,10)),t!==d&&(s[i]=_.extend(s[i]||{},{zone_order:d}))}),_.size(s)&&(i.logChanges(s),n.data.view.block(),n.data.view.model.save())}}),h=new l({zones:n.zones}),p=new c({model:h,el:s});p.render(),s.sortable({items:"tr",cursor:"move",axis:"y",handle:"td.wc-shipping-zone-sort",scrollSensitivity:40})})}(jQuery,shippingZonesLocalizeScript,wp,ajaxurl);
!function(e,n,i,o){e(function(){var t=e(".wc-shipping-zones"),s=e(".wc-shipping-zone-rows"),d=e(".wc-shipping-zone-save"),a=i.template("wc-shipping-zone-row"),r=i.template("wc-shipping-zone-row-blank"),l=Backbone.Model.extend({changes:{},logChanges:function(e){var n=this.changes||{};_.each(e,function(e,i){n[i]=_.extend(n[i]||{zone_id:i},e)}),this.changes=n,this.trigger("change:zones")},discardChanges:function(e){var n=this.changes||{},i=null,o=_.indexBy(this.get("zones"),"zone_id");n[e]&&n[e].zone_order!==undefined&&(i=n[e].zone_order),delete n[e],null!==i&&o[e]&&o[e].zone_order!==i&&(n[e]=_.extend(n[e]||{},{zone_id:e,zone_order:i})),this.changes=n,0===_.size(this.changes)&&p.clearUnloadConfirmation()},save:function(){_.size(this.changes)?e.post(o+(o.indexOf("?")>0?"&":"?")+"action=woocommerce_shipping_zones_save_changes",{wc_shipping_zones_nonce:n.wc_shipping_zones_nonce,changes:this.changes},this.onSaveResponse,"json"):h.trigger("saved:zones")},onSaveResponse:function(e,i){"success"===i&&(e.success?(h.set("zones",e.data.zones),h.trigger("change:zones"),h.changes={},h.trigger("saved:zones")):window.alert(n.strings.save_failed))}}),c=Backbone.View.extend({rowTemplate:a,initialize:function(){this.listenTo(this.model,"change:zones",this.setUnloadConfirmation),this.listenTo(this.model,"saved:zones",this.clearUnloadConfirmation),this.listenTo(this.model,"saved:zones",this.render),s.on("change",{view:this},this.updateModelOnChange),s.on("sortupdate",{view:this},this.updateModelOnSort),e(window).on("beforeunload",{view:this},this.unloadConfirmation),e(document.body).on("click",".wc-shipping-zone-add",{view:this},this.onAddNewRow)},block:function(){e(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){e(this.el).unblock()},render:function(){var n=_.indexBy(this.model.get("zones"),"zone_id"),i=this;i.$el.empty(),i.unblock(),_.size(n)?(n=_(n).chain().sortBy(function(e){return-1*parseInt(e.zone_id,10)}).sortBy(function(e){return parseInt(e.zone_order,10)}).value(),e.each(n,function(e,n){i.renderRow(n)})):i.$el.append(r),i.initRows()},renderRow:function(e){var n=this;n.$el.append(n.rowTemplate(e)),n.initRow(e)},initRow:function(e){var n=this,i=n.$el.find('tr[data-id="'+e.zone_id+'"]');n.renderShippingMethods(e.zone_id,e.shipping_methods),i.find(".wc-shipping-zone-delete").on("click",{view:this},this.onDeleteRow)},initRows:function(){0==e("tbody.wc-shipping-zone-rows tr").length%2?t.find("tbody.wc-shipping-zone-rows").next("tbody").find("tr").addClass("odd"):t.find("tbody.wc-shipping-zone-rows").next("tbody").find("tr").removeClass("odd"),e("#tiptip_holder").removeAttr("style"),e("#tiptip_arrow").removeAttr("style"),e(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:50})},renderShippingMethods:function(i,o){var t=e('.wc-shipping-zones tr[data-id="'+i+'"]').find(".wc-shipping-zone-methods ul");t.find(".wc-shipping-zone-method").remove(),_.size(o)?(o=_.sortBy(o,function(e){return parseInt(e.method_order,10)}),_.each(o,function(e){var n="method_disabled";"yes"===e.enabled&&(n="method_enabled"),t.append('<li class="wc-shipping-zone-method '+n+'">'+e.title+"</li>")})):t.append('<li class="wc-shipping-zone-method">'+n.strings.no_shipping_methods_offered+"</li>")},onDeleteRow:function(i){var o=i.data.view.model,t=_.indexBy(o.get("zones"),"zone_id"),s={},d=e(this).closest("tr").data("id");i.preventDefault(),window.confirm(n.strings.delete_confirmation_msg)&&t[d]&&(delete t[d],s[d]=_.extend(s[d]||{},{deleted:"deleted"}),o.set("zones",t),o.logChanges(s),i.data.view.block(),i.data.view.model.save())},setUnloadConfirmation:function(){this.needsUnloadConfirm=!0,d.prop("disabled",!1)},clearUnloadConfirmation:function(){this.needsUnloadConfirm=!1,d.prop("disabled",!0)},unloadConfirmation:function(e){if(e.data.view.needsUnloadConfirm)return e.returnValue=n.strings.unload_confirmation_msg,window.event.returnValue=n.strings.unload_confirmation_msg,n.strings.unload_confirmation_msg},updateModelOnChange:function(n){var i=n.data.view.model,o=e(n.target),t=o.closest("tr").data("id"),s=o.data("attribute"),d=o.val(),a=_.indexBy(i.get("zones"),"zone_id"),r={};a[t]&&a[t][s]===d||(r[t]={},r[t][s]=d),i.logChanges(r)},updateModelOnSort:function(n){var i=n.data.view.model,o=_.indexBy(i.get("zones"),"zone_id"),t=e("tbody.wc-shipping-zone-rows tr"),s={};_.each(t,function(n){var i=e(n).data("id"),t=null,d=parseInt(e(n).index(),10);o[i]&&(t=parseInt(o[i].zone_order,10)),t!==d&&(s[i]=_.extend(s[i]||{},{zone_order:d}))}),_.size(s)&&(i.logChanges(s),n.data.view.block(),n.data.view.model.save())}}),h=new l({zones:n.zones}),p=new c({model:h,el:s});p.render(),s.sortable({items:"tr",cursor:"move",axis:"y",handle:"td.wc-shipping-zone-sort",scrollSensitivity:40})})}(jQuery,shippingZonesLocalizeScript,wp,ajaxurl);

View File

@ -11,9 +11,10 @@ jQuery( function( $ ) {
var AddToCartHandler = function() {
$( document )
.on( 'click', '.add_to_cart_button', this.onAddToCart )
.on( 'click', '.remove_from_cart_button', this.onRemoveFromCart )
.on( 'added_to_cart', this.updateButton )
.on( 'added_to_cart', this.updateCartPage )
.on( 'added_to_cart', this.updateFragments );
.on( 'added_to_cart removed_from_cart', this.updateFragments );
};
/**
@ -64,6 +65,34 @@ jQuery( function( $ ) {
}
};
/**
* Update fragments after remove from cart event in mini-cart.
*/
AddToCartHandler.prototype.onRemoveFromCart = function( e ) {
var $thisbutton = $( this ),
$row = $thisbutton.closest( '.woocommerce-mini-cart-item' );
e.preventDefault();
$row.block({
message: null,
overlayCSS: {
opacity: 0.6
}
});
$.post( wc_add_to_cart_params.wc_ajax_url.toString().replace( '%%endpoint%%', 'remove_from_cart' ), { cart_item_key : $thisbutton.data( 'cart_item_key' ) }, function( response ) {
if ( ! response || ! response.fragments ) {
window.location = $thisbutton.attr( 'href' );
return;
}
$( document.body ).trigger( 'removed_from_cart', [ response.fragments, response.cart_hash ] );
}).fail( function() {
window.location = $thisbutton.attr( 'href' );
return;
});
};
/**
* Update cart page elements after add to cart events.
*/

View File

@ -1 +1 @@
jQuery(function(t){if("undefined"==typeof wc_add_to_cart_params)return!1;var a=function(){t(document).on("click",".add_to_cart_button",this.onAddToCart).on("added_to_cart",this.updateButton).on("added_to_cart",this.updateCartPage).on("added_to_cart",this.updateFragments)};a.prototype.onAddToCart=function(a){var d=t(this);if(d.is(".ajax_add_to_cart")){if(!d.attr("data-product_id"))return!0;a.preventDefault(),d.removeClass("added"),d.addClass("loading");var o={};t.each(d.data(),function(t,a){o[t]=a}),t(document.body).trigger("adding_to_cart",[d,o]),t.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),o,function(a){a&&(a.error&&a.product_url?window.location=a.product_url:"yes"!==wc_add_to_cart_params.cart_redirect_after_add?t(document.body).trigger("added_to_cart",[a.fragments,a.cart_hash,d]):window.location=wc_add_to_cart_params.cart_url)})}},a.prototype.updateButton=function(a,d,o,r){(r=void 0!==r&&r)&&(r.removeClass("loading"),r.addClass("added"),wc_add_to_cart_params.is_cart||0!==r.parent().find(".added_to_cart").length||r.after(' <a href="'+wc_add_to_cart_params.cart_url+'" class="added_to_cart wc-forward" title="'+wc_add_to_cart_params.i18n_view_cart+'">'+wc_add_to_cart_params.i18n_view_cart+"</a>"),t(document.body).trigger("wc_cart_button_updated",[r]))},a.prototype.updateCartPage=function(){var a=window.location.toString().replace("add-to-cart","added-to-cart");t(".shop_table.cart").load(a+" .shop_table.cart:eq(0) > *",function(){t(".shop_table.cart").stop(!0).css("opacity","1").unblock(),t(document.body).trigger("cart_page_refreshed")}),t(".cart_totals").load(a+" .cart_totals:eq(0) > *",function(){t(".cart_totals").stop(!0).css("opacity","1").unblock(),t(document.body).trigger("cart_totals_refreshed")})},a.prototype.updateFragments=function(a,d){d&&(t.each(d,function(a){t(a).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),t.each(d,function(a,d){t(a).replaceWith(d),t(a).stop(!0).css("opacity","1").unblock()}),t(document.body).trigger("wc_fragments_loaded"))},new a});
jQuery(function(t){if("undefined"==typeof wc_add_to_cart_params)return!1;var a=function(){t(document).on("click",".add_to_cart_button",this.onAddToCart).on("click",".remove_from_cart_button",this.onRemoveFromCart).on("added_to_cart",this.updateButton).on("added_to_cart",this.updateCartPage).on("added_to_cart removed_from_cart",this.updateFragments)};a.prototype.onAddToCart=function(a){var o=t(this);if(o.is(".ajax_add_to_cart")){if(!o.attr("data-product_id"))return!0;a.preventDefault(),o.removeClass("added"),o.addClass("loading");var r={};t.each(o.data(),function(t,a){r[t]=a}),t(document.body).trigger("adding_to_cart",[o,r]),t.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),r,function(a){a&&(a.error&&a.product_url?window.location=a.product_url:"yes"!==wc_add_to_cart_params.cart_redirect_after_add?t(document.body).trigger("added_to_cart",[a.fragments,a.cart_hash,o]):window.location=wc_add_to_cart_params.cart_url)})}},a.prototype.onRemoveFromCart=function(a){var o=t(this),r=o.closest(".woocommerce-mini-cart-item");a.preventDefault(),r.block({message:null,overlayCSS:{opacity:.6}}),t.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","remove_from_cart"),{cart_item_key:o.data("cart_item_key")},function(a){a&&a.fragments?t(document.body).trigger("removed_from_cart",[a.fragments,a.cart_hash]):window.location=o.attr("href")}).fail(function(){window.location=o.attr("href")})},a.prototype.updateButton=function(a,o,r,e){(e=void 0!==e&&e)&&(e.removeClass("loading"),e.addClass("added"),wc_add_to_cart_params.is_cart||0!==e.parent().find(".added_to_cart").length||e.after(' <a href="'+wc_add_to_cart_params.cart_url+'" class="added_to_cart wc-forward" title="'+wc_add_to_cart_params.i18n_view_cart+'">'+wc_add_to_cart_params.i18n_view_cart+"</a>"),t(document.body).trigger("wc_cart_button_updated",[e]))},a.prototype.updateCartPage=function(){var a=window.location.toString().replace("add-to-cart","added-to-cart");t(".shop_table.cart").load(a+" .shop_table.cart:eq(0) > *",function(){t(".shop_table.cart").stop(!0).css("opacity","1").unblock(),t(document.body).trigger("cart_page_refreshed")}),t(".cart_totals").load(a+" .cart_totals:eq(0) > *",function(){t(".cart_totals").stop(!0).css("opacity","1").unblock(),t(document.body).trigger("cart_totals_refreshed")})},a.prototype.updateFragments=function(a,o){o&&(t.each(o,function(a){t(a).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),t.each(o,function(a,o){t(a).replaceWith(o),t(a).stop(!0).css("opacity","1").unblock()}),t(document.body).trigger("wc_fragments_loaded"))},new a});

View File

@ -10,7 +10,7 @@
"require-dev": {
"squizlabs/php_codesniffer": "*",
"wp-coding-standards/wpcs": "0.10.0",
"phpunit/phpunit": "5.7.19"
"phpunit/phpunit": "6.2.3"
},
"scripts": {
"post-install-cmd": [

471
composer.lock generated
View File

@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "3e1a8fa4256dcf3ef3caee1b027d6779",
"content-hash": "4028dd750463d5e5ad5f2099196a949a",
"packages": [
{
"name": "composer/installers",
"version": "v1.2.0",
"version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/composer/installers.git",
"reference": "d78064c68299743e0161004f2de3a0204e33b804"
"reference": "79ad876c7498c0bbfe7eed065b8651c93bfd6045"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/installers/zipball/d78064c68299743e0161004f2de3a0204e33b804",
"reference": "d78064c68299743e0161004f2de3a0204e33b804",
"url": "https://api.github.com/repos/composer/installers/zipball/79ad876c7498c0bbfe7eed065b8651c93bfd6045",
"reference": "79ad876c7498c0bbfe7eed065b8651c93bfd6045",
"shasum": ""
},
"require": {
@ -59,12 +59,16 @@
"keywords": [
"Craft",
"Dolibarr",
"Eliasis",
"Hurad",
"ImageCMS",
"Kanboard",
"MODX Evo",
"Mautic",
"Maya",
"OXID",
"Plentymarkets",
"Porto",
"RadPHP",
"SMF",
"Thelia",
@ -87,9 +91,11 @@
"fuelphp",
"grav",
"installer",
"itop",
"joomla",
"kohana",
"laravel",
"lavalite",
"lithium",
"magento",
"mako",
@ -104,6 +110,7 @@
"roundcube",
"shopware",
"silverstripe",
"sydes",
"symfony",
"typo3",
"wordpress",
@ -111,7 +118,7 @@
"zend",
"zikula"
],
"time": "2016-08-13T20:53:52+00:00"
"time": "2017-04-24T06:37:16+00:00"
}
],
"packages-dev": [
@ -211,6 +218,108 @@
],
"time": "2017-04-12T18:52:22+00:00"
},
{
"name": "phar-io/manifest",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
"reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0",
"reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-phar": "*",
"phar-io/version": "^1.0.1",
"php": "^5.6 || ^7.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
},
{
"name": "Sebastian Heuer",
"email": "sebastian@phpeople.de",
"role": "Developer"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "Developer"
}
],
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
"time": "2017-03-05T18:14:27+00:00"
},
{
"name": "phar-io/version",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
"reference": "a70c0ced4be299a63d32fa96d9281d03e94041df"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df",
"reference": "a70c0ced4be299a63d32fa96d9281d03e94041df",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
},
{
"name": "Sebastian Heuer",
"email": "sebastian@phpeople.de",
"role": "Developer"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "Developer"
}
],
"description": "Library for handling version information and constraints",
"time": "2017-03-05T17:38:23+00:00"
},
{
"name": "phpdocumentor/reflection-common",
"version": "1.0",
@ -267,22 +376,22 @@
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "3.1.1",
"version": "3.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
"reference": "46f7e8bb075036c92695b15a1ddb6971c751e585"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/46f7e8bb075036c92695b15a1ddb6971c751e585",
"reference": "46f7e8bb075036c92695b15a1ddb6971c751e585",
"shasum": ""
},
"require": {
"php": ">=5.5",
"phpdocumentor/reflection-common": "^1.0@dev",
"phpdocumentor/type-resolver": "^0.2.0",
"phpdocumentor/type-resolver": "^0.4.0",
"webmozart/assert": "^1.0"
},
"require-dev": {
@ -308,24 +417,24 @@
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2016-09-30T07:12:33+00:00"
"time": "2017-07-15T11:38:20+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "0.2.1",
"version": "0.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb"
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
"reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
"shasum": ""
},
"require": {
"php": ">=5.5",
"php": "^5.5 || ^7.0",
"phpdocumentor/reflection-common": "^1.0"
},
"require-dev": {
@ -355,7 +464,7 @@
"email": "me@mikevanriel.com"
}
],
"time": "2016-11-25T06:54:22+00:00"
"time": "2017-07-14T14:27:02+00:00"
},
{
"name": "phpspec/prophecy",
@ -422,40 +531,41 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "4.0.8",
"version": "5.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d"
"reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d",
"reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/dc421f9ca5082a0c0cb04afb171c765f79add85b",
"reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlwriter": "*",
"php": "^5.6 || ^7.0",
"php": "^7.0",
"phpunit/php-file-iterator": "^1.3",
"phpunit/php-text-template": "^1.2",
"phpunit/php-token-stream": "^1.4.2 || ^2.0",
"phpunit/php-token-stream": "^1.4.11 || ^2.0",
"sebastian/code-unit-reverse-lookup": "^1.0",
"sebastian/environment": "^1.3.2 || ^2.0",
"sebastian/version": "^1.0 || ^2.0"
"sebastian/environment": "^3.0",
"sebastian/version": "^2.0",
"theseer/tokenizer": "^1.1"
},
"require-dev": {
"ext-xdebug": "^2.1.4",
"phpunit/phpunit": "^5.7"
"ext-xdebug": "^2.5",
"phpunit/phpunit": "^6.0"
},
"suggest": {
"ext-xdebug": "^2.5.1"
"ext-xdebug": "^2.5.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0.x-dev"
"dev-master": "5.2.x-dev"
}
},
"autoload": {
@ -481,7 +591,7 @@
"testing",
"xunit"
],
"time": "2017-04-02T07:44:40+00:00"
"time": "2017-04-21T08:03:57+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -671,16 +781,16 @@
},
{
"name": "phpunit/phpunit",
"version": "5.7.19",
"version": "6.2.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "69c4f49ff376af2692bad9cebd883d17ebaa98a1"
"reference": "fa5711d0559fc4b64deba0702be52d41434cbcb7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/69c4f49ff376af2692bad9cebd883d17ebaa98a1",
"reference": "69c4f49ff376af2692bad9cebd883d17ebaa98a1",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fa5711d0559fc4b64deba0702be52d41434cbcb7",
"reference": "fa5711d0559fc4b64deba0702be52d41434cbcb7",
"shasum": ""
},
"require": {
@ -689,33 +799,35 @@
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"myclabs/deep-copy": "~1.3",
"php": "^5.6 || ^7.0",
"phpspec/prophecy": "^1.6.2",
"phpunit/php-code-coverage": "^4.0.4",
"phpunit/php-file-iterator": "~1.4",
"phpunit/php-text-template": "~1.2",
"myclabs/deep-copy": "^1.3",
"phar-io/manifest": "^1.0.1",
"phar-io/version": "^1.0",
"php": "^7.0",
"phpspec/prophecy": "^1.7",
"phpunit/php-code-coverage": "^5.2",
"phpunit/php-file-iterator": "^1.4",
"phpunit/php-text-template": "^1.2",
"phpunit/php-timer": "^1.0.6",
"phpunit/phpunit-mock-objects": "^3.2",
"sebastian/comparator": "^1.2.4",
"sebastian/diff": "~1.2",
"sebastian/environment": "^1.3.4 || ^2.0",
"sebastian/exporter": "~2.0",
"sebastian/global-state": "^1.1",
"sebastian/object-enumerator": "~2.0",
"sebastian/resource-operations": "~1.0",
"sebastian/version": "~1.0.3|~2.0",
"symfony/yaml": "~2.1|~3.0"
"phpunit/phpunit-mock-objects": "^4.0",
"sebastian/comparator": "^2.0",
"sebastian/diff": "^1.4.3 || ^2.0",
"sebastian/environment": "^3.0.2",
"sebastian/exporter": "^3.1",
"sebastian/global-state": "^1.1 || ^2.0",
"sebastian/object-enumerator": "^3.0.2",
"sebastian/resource-operations": "^1.0",
"sebastian/version": "^2.0"
},
"conflict": {
"phpdocumentor/reflection-docblock": "3.0.2"
"phpdocumentor/reflection-docblock": "3.0.2",
"phpunit/dbunit": "<3.0"
},
"require-dev": {
"ext-pdo": "*"
},
"suggest": {
"ext-xdebug": "*",
"phpunit/php-invoker": "~1.1"
"phpunit/php-invoker": "^1.1"
},
"bin": [
"phpunit"
@ -723,7 +835,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.7.x-dev"
"dev-master": "6.2.x-dev"
}
},
"autoload": {
@ -749,33 +861,33 @@
"testing",
"xunit"
],
"time": "2017-04-03T02:22:27+00:00"
"time": "2017-07-03T15:54:24+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "3.4.3",
"version": "4.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24"
"reference": "d8833b396dce9162bb2eb5d59aee5a3ab3cfa5b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
"reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/d8833b396dce9162bb2eb5d59aee5a3ab3cfa5b4",
"reference": "d8833b396dce9162bb2eb5d59aee5a3ab3cfa5b4",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": "^5.6 || ^7.0",
"php": "^7.0",
"phpunit/php-text-template": "^1.2",
"sebastian/exporter": "^1.2 || ^2.0"
"sebastian/exporter": "^3.0"
},
"conflict": {
"phpunit/phpunit": "<5.4.0"
"phpunit/phpunit": "<6.0"
},
"require-dev": {
"phpunit/phpunit": "^5.4"
"phpunit/phpunit": "^6.0"
},
"suggest": {
"ext-soap": "*"
@ -783,7 +895,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2.x-dev"
"dev-master": "4.0.x-dev"
}
},
"autoload": {
@ -808,7 +920,7 @@
"mock",
"xunit"
],
"time": "2016-12-08T20:27:08+00:00"
"time": "2017-06-30T08:15:21+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@ -857,30 +969,30 @@
},
{
"name": "sebastian/comparator",
"version": "1.2.4",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
"reference": "20f84f468cb67efee293246e6a09619b891f55f0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
"reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/20f84f468cb67efee293246e6a09619b891f55f0",
"reference": "20f84f468cb67efee293246e6a09619b891f55f0",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"sebastian/diff": "~1.2",
"sebastian/exporter": "~1.2 || ~2.0"
"php": "^7.0",
"sebastian/diff": "^1.2",
"sebastian/exporter": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
"phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2.x-dev"
"dev-master": "2.0.x-dev"
}
},
"autoload": {
@ -917,27 +1029,27 @@
"compare",
"equality"
],
"time": "2017-01-29T09:50:25+00:00"
"time": "2017-03-03T06:26:08+00:00"
},
{
"name": "sebastian/diff",
"version": "1.4.1",
"version": "1.4.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
"reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
"reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4",
"reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": "^5.3.3 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
},
"type": "library",
"extra": {
@ -969,32 +1081,32 @@
"keywords": [
"diff"
],
"time": "2015-12-08T07:14:41+00:00"
"time": "2017-05-22T07:24:03+00:00"
},
{
"name": "sebastian/environment",
"version": "2.0.0",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac"
"reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
"reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
"reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0"
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "^5.0"
"phpunit/phpunit": "^6.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "3.1.x-dev"
}
},
"autoload": {
@ -1019,34 +1131,34 @@
"environment",
"hhvm"
],
"time": "2016-11-26T07:53:53+00:00"
"time": "2017-07-01T08:51:00+00:00"
},
{
"name": "sebastian/exporter",
"version": "2.0.0",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
"reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
"reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
"reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"sebastian/recursion-context": "~2.0"
"php": "^7.0",
"sebastian/recursion-context": "^3.0"
},
"require-dev": {
"ext-mbstring": "*",
"phpunit/phpunit": "~4.4"
"phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "3.1.x-dev"
}
},
"autoload": {
@ -1086,27 +1198,27 @@
"export",
"exporter"
],
"time": "2016-11-19T08:54:04+00:00"
"time": "2017-04-03T13:19:02+00:00"
},
{
"name": "sebastian/global-state",
"version": "1.1.1",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
"reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
"reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
"reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "~4.2"
"phpunit/phpunit": "^6.0"
},
"suggest": {
"ext-uopz": "*"
@ -1114,7 +1226,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"dev-master": "2.0-dev"
}
},
"autoload": {
@ -1137,33 +1249,34 @@
"keywords": [
"global state"
],
"time": "2015-10-12T03:26:01+00:00"
"time": "2017-04-27T15:39:26+00:00"
},
{
"name": "sebastian/object-enumerator",
"version": "2.0.1",
"version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
"reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7"
"reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7",
"reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7",
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/31dd3379d16446c5d86dec32ab1ad1f378581ad8",
"reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8",
"shasum": ""
},
"require": {
"php": ">=5.6",
"sebastian/recursion-context": "~2.0"
"php": "^7.0",
"sebastian/object-reflector": "^1.0",
"sebastian/recursion-context": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "~5"
"phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "3.0.x-dev"
}
},
"autoload": {
@ -1183,32 +1296,77 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"time": "2017-02-18T15:18:39+00:00"
"time": "2017-03-12T15:17:29+00:00"
},
{
"name": "sebastian/recursion-context",
"version": "2.0.0",
"name": "sebastian/object-reflector",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
"url": "https://github.com/sebastianbergmann/object-reflector.git",
"reference": "773f97c67f28de00d397be301821b06708fca0be"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a",
"reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a",
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
"reference": "773f97c67f28de00d397be301821b06708fca0be",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
"phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "1.1-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Allows reflection of object attributes, including inherited and non-public ones",
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
"time": "2017-03-29T09:07:27+00:00"
},
{
"name": "sebastian/recursion-context",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
"reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
"shasum": ""
},
"require": {
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0.x-dev"
}
},
"autoload": {
@ -1236,7 +1394,7 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"time": "2016-11-19T07:33:16+00:00"
"time": "2017-03-03T06:23:57+00:00"
},
{
"name": "sebastian/resource-operations",
@ -1325,16 +1483,16 @@
},
{
"name": "squizlabs/php_codesniffer",
"version": "2.7.0",
"version": "2.9.1",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed"
"reference": "dcbed1074f8244661eecddfc2a675430d8d33f62"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/571e27b6348e5b3a637b2abc82ac0d01e6d7bbed",
"reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62",
"reference": "dcbed1074f8244661eecddfc2a675430d8d33f62",
"shasum": ""
},
"require": {
@ -1399,62 +1557,47 @@
"phpcs",
"standards"
],
"time": "2016-09-01T23:53:02+00:00"
"time": "2017-05-22T02:43:20+00:00"
},
{
"name": "symfony/yaml",
"version": "v3.2.7",
"name": "theseer/tokenizer",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621"
"url": "https://github.com/theseer/tokenizer.git",
"reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/62b4cdb99d52cb1ff253c465eb1532a80cebb621",
"reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b",
"reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"require-dev": {
"symfony/console": "~2.8|~3.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
"ext-dom": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": "^7.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
},
"exclude-from-classmap": [
"/Tests/"
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
"BSD-3-Clause"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
}
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2017-03-20T09:45:15+00:00"
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"time": "2017-04-07T12:08:54+00:00"
},
{
"name": "webmozart/assert",

View File

@ -200,8 +200,8 @@ abstract class WC_Data {
} else {
$this->data_store->create( $this );
}
return $this->get_id();
}
return $this->get_id();
}
/**
@ -268,6 +268,23 @@ abstract class WC_Data {
return array_filter( $this->meta_data, array( $this, 'filter_null_meta' ) );
}
/**
* Check if the key is an internal one.
*
* @since 3.2.0
* @param string $key
* @return bool true if it's an internal key, false otherwise
*/
protected function is_internal_meta_key( $key ) {
if ( $this->data_store && ! empty( $key ) && in_array( $key, $this->data_store->get_internal_meta_keys() ) ) {
wc_doing_it_wrong( __FUNCTION__, __( 'Meta properties should not be accessed directly. Use getters and setters.', 'woocommerce' ), '3.2.0' );
return true;
}
return false;
}
/**
* Get Meta Data by Key.
*
@ -278,6 +295,14 @@ abstract class WC_Data {
* @return mixed
*/
public function get_meta( $key = '', $single = true, $context = 'view' ) {
if ( $this->is_internal_meta_key( $key ) ) {
$function = 'get_' . $key;
if ( is_callable( array( $this, $function ) ) ) {
return $this->{$function}();
}
}
$this->maybe_read_meta_data();
$meta_data = $this->get_meta_data();
$array_keys = array_keys( wp_list_pluck( $meta_data, 'key' ), $key );
@ -343,6 +368,14 @@ abstract class WC_Data {
* @param bool $unique Should this be a unique key?
*/
public function add_meta_data( $key, $value, $unique = false ) {
if ( $this->is_internal_meta_key( $key ) ) {
$function = 'set_' . $key;
if ( is_callable( array( $this, $function ) ) ) {
return $this->{$function}( $value );
}
}
$this->maybe_read_meta_data();
if ( $unique ) {
$this->delete_meta_data( $key );
@ -362,8 +395,18 @@ abstract class WC_Data {
* @param int $meta_id
*/
public function update_meta_data( $key, $value, $meta_id = '' ) {
if ( $this->is_internal_meta_key( $key ) ) {
$function = 'set_' . $key;
if ( is_callable( array( $this, $function ) ) ) {
return $this->{$function}( $value );
}
}
$this->maybe_read_meta_data();
if ( $array_key = $meta_id ? array_keys( wp_list_pluck( $this->meta_data, 'id' ), $meta_id ) : '' ) {
$array_key = $meta_id ? array_keys( wp_list_pluck( $this->meta_data, 'id' ), $meta_id ) : '';
if ( $array_key ) {
$this->meta_data[ current( $array_key ) ] = (object) array(
'id' => $meta_id,
'key' => $key,
@ -382,7 +425,9 @@ abstract class WC_Data {
*/
public function delete_meta_data( $key ) {
$this->maybe_read_meta_data();
if ( $array_keys = array_keys( wp_list_pluck( $this->meta_data, 'key' ), $key ) ) {
$array_keys = array_keys( wp_list_pluck( $this->meta_data, 'key' ), $key );
if ( $array_keys ) {
foreach ( $array_keys as $array_key ) {
$this->meta_data[ $array_key ]->value = null;
}
@ -397,7 +442,9 @@ abstract class WC_Data {
*/
public function delete_meta_data_by_mid( $mid ) {
$this->maybe_read_meta_data();
if ( $array_keys = array_keys( wp_list_pluck( $this->meta_data, 'id' ), $mid ) ) {
$array_keys = array_keys( wp_list_pluck( $this->meta_data, 'id' ), $mid );
if ( $array_keys ) {
foreach ( $array_keys as $array_key ) {
$this->meta_data[ $array_key ]->value = null;
}
@ -509,7 +556,7 @@ abstract class WC_Data {
$this->data = $this->default_data;
$this->changes = array();
$this->set_object_read( false );
}
}
/**
* Set object read property.
@ -644,7 +691,7 @@ abstract class WC_Data {
}
/**
* Sets a date prop whilst handling formatting and datatime objects.
* Sets a date prop whilst handling formatting and datetime objects.
*
* @since 3.0.0
* @param string $prop Name of prop to set.

View File

@ -616,7 +616,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
}
/**
* Sets order tax (sum of cart and shipping tax). Used internaly only.
* Sets order tax (sum of cart and shipping tax). Used internally only.
*
* @param string $value
* @throws WC_Data_Exception

View File

@ -130,7 +130,7 @@ class WC_Product extends WC_Abstract_Legacy_Product {
/**
* Get internal type. Should return string and *should be overridden* by child classes.
*
* The product_type property is deprecated but is used here for BW compat with child classes which may be defining product_type and not have a get_type method.
* The product_type property is deprecated but is used here for BW compatibility with child classes which may be defining product_type and not have a get_type method.
*
* @since 3.0.0
* @return string
@ -452,7 +452,7 @@ class WC_Product extends WC_Abstract_Legacy_Product {
}
/**
* Get upsel IDs.
* Get upsell IDs.
*
* @since 3.0.0
* @param string $context
@ -1280,6 +1280,7 @@ class WC_Product extends WC_Abstract_Legacy_Product {
* Save data (either create or update depending on if we are working on an existing product).
*
* @since 3.0.0
* @return int
*/
public function save() {
$this->validate_props();
@ -1296,8 +1297,8 @@ class WC_Product extends WC_Abstract_Legacy_Product {
if ( $this->get_parent_id() ) {
wc_deferred_product_sync( $this->get_parent_id() );
}
return $this->get_id();
}
return $this->get_id();
}
/*
@ -1331,7 +1332,7 @@ class WC_Product extends WC_Abstract_Legacy_Product {
/**
* Checks the product type.
*
* Backwards compat with downloadable/virtual.
* Backwards compatibility with downloadable/virtual.
*
* @param string|array $type Array or string of types
* @return bool

View File

@ -326,7 +326,7 @@ abstract class WC_REST_Terms_Controller extends WC_REST_Controller {
$response = rest_ensure_response( $response );
// Store pagation values for headers then unset for count query.
// Store pagination values for headers then unset for count query.
$per_page = (int) $prepared_args['number'];
$page = ceil( ( ( (int) $prepared_args['offset'] ) / $per_page ) + 1 );

View File

@ -89,7 +89,6 @@ abstract class WC_Settings_API {
* on the gateway's settings screen.
*
* @since 1.0.0
* @return string
*/
public function init_form_fields() {}

View File

@ -118,10 +118,8 @@ abstract class WC_Widget extends WP_Widget {
/**
* Output the html at the start of a widget.
*
* @param array $args
* @param array $args
* @param array $instance
*
* @return string
*/
public function widget_start( $args, $instance ) {
echo $args['before_widget'];
@ -135,7 +133,6 @@ abstract class WC_Widget extends WP_Widget {
* Output the html at the end of a widget.
*
* @param array $args
* @return string
*/
public function widget_end( $args ) {
echo $args['after_widget'];

View File

@ -128,6 +128,7 @@ class WC_Admin_Assets {
'ajax_url' => admin_url( 'admin-ajax.php' ),
'search_products_nonce' => wp_create_nonce( 'search-products' ),
'search_customers_nonce' => wp_create_nonce( 'search-customers' ),
'search_categories_nonce' => wp_create_nonce( 'search-categories' ),
) );
// Accounting

View File

@ -180,7 +180,7 @@ class WC_Admin_Help {
'title' => __( 'Guided Tour', 'woocommerce' ),
'content' =>
'<h2><a href="https://docs.woocommerce.com/document/woocommerce-guided-tour-videos/?utm_source=helptab&utm_medium=product&utm_content=videos&utm_campaign=woocommerceplugin">' . __( 'Guided Tour', 'woocommerce' ) . '</a> &ndash; ' . esc_html( $video_map[ $video_key ]['title'] ) . '</h2>' .
'<script src="//fast.wistia.net/assets/external/E-v1.js" aync></script>
'<script src="//fast.wistia.net/assets/external/E-v1.js" async></script>
<div class="wistia_embed wistia_async_' . esc_attr( $video_map[ $video_key ]['id'] ) . ' videoFoam=true seo=false" style="width:640px;height:360px;">&nbsp;</div>
',
) );

View File

@ -230,8 +230,16 @@ class WC_Admin_Importers {
if ( 100 === $percent_complete ) {
// Clear temp meta.
$wpdb->delete( $wpdb->postmeta, array( 'meta_key' => '_original_id' ) );
$wpdb->delete( $wpdb->posts, array( 'post_status' => 'importing', 'post_type' => 'product' ) );
$wpdb->delete( $wpdb->posts, array( 'post_status' => 'importing', 'post_type' => 'product_variation' ) );
$wpdb->query( "
DELETE {$wpdb->posts}, {$wpdb->postmeta}, {$wpdb->term_relationships}
FROM {$wpdb->posts}
LEFT JOIN {$wpdb->term_relationships} ON ( {$wpdb->posts}.ID = {$wpdb->term_relationships}.object_id )
LEFT JOIN {$wpdb->postmeta} ON ( {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id )
LEFT JOIN {$wpdb->term_taxonomy} ON ( {$wpdb->term_taxonomy}.term_taxonomy_id = {$wpdb->term_relationships}.term_taxonomy_id )
LEFT JOIN {$wpdb->terms} ON ( {$wpdb->terms}.term_id = {$wpdb->term_taxonomy}.term_id )
WHERE {$wpdb->posts}.post_type IN ( 'product', 'product_variation' )
AND {$wpdb->posts}.post_status = 'importing'
" );
// Send success.
wp_send_json_success( array(

View File

@ -239,11 +239,34 @@ class WC_Admin_Pointers {
function show_wc_pointer( id ) {
var pointer = wc_pointers.pointers[ id ];
var options = $.extend( pointer.options, {
pointerClass: 'wp-pointer wc-pointer',
close: function() {
if ( pointer.next ) {
show_wc_pointer( pointer.next );
}
}
},
buttons: function( event, t ) {
var close = '" . esc_js( __( 'Dismiss', 'woocommerce' ) ) . "',
next = '" . esc_js( __( 'Next', 'woocommerce' ) ) . "',
button = $( '<a class=\"close\" href=\"#\">' + close + '</a>' ),
button2 = $( '<a class=\"button button-primary\" href=\"#\">' + next + '</a>' ),
wrapper = $( '<div class=\"wc-pointer-buttons\" />' );
button.bind( 'click.pointer', function(e) {
e.preventDefault();
t.element.pointer('destroy');
});
button2.bind( 'click.pointer', function(e) {
e.preventDefault();
t.element.pointer('close');
});
wrapper.append( button );
wrapper.append( button2 );
return wrapper;
},
} );
var this_pointer = $( pointer.target ).pointer( options );
this_pointer.pointer( 'open' );

View File

@ -586,26 +586,19 @@ class WC_Admin_Post_Types {
if ( $post->comment_count ) {
// check the status of the post
$status = ( 'trash' !== $post->post_status ) ? '' : 'post-trashed';
remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
$latest_notes = get_comments( array(
'post_id' => $post->ID,
'number' => 1,
'status' => $status,
$latest_notes = wc_get_order_notes( array(
'order_id' => $post->ID,
'limit' => 1,
'orderby' => 'date_created_gmt',
) );
add_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
$latest_note = current( $latest_notes );
if ( isset( $latest_note->comment_content ) && 1 == $post->comment_count ) {
echo '<span class="note-on tips" data-tip="' . wc_sanitize_tooltip( $latest_note->comment_content ) . '">' . __( 'Yes', 'woocommerce' ) . '</span>';
} elseif ( isset( $latest_note->comment_content ) ) {
if ( isset( $latest_note->content ) && 1 == $post->comment_count ) {
echo '<span class="note-on tips" data-tip="' . wc_sanitize_tooltip( $latest_note->content ) . '">' . __( 'Yes', 'woocommerce' ) . '</span>';
} elseif ( isset( $latest_note->content ) ) {
/* translators: %d: notes count */
echo '<span class="note-on tips" data-tip="' . wc_sanitize_tooltip( $latest_note->comment_content . '<br/><small style="display:block">' . sprintf( _n( 'plus %d other note', 'plus %d other notes', ( $post->comment_count - 1 ), 'woocommerce' ), $post->comment_count - 1 ) . '</small>' ) . '">' . __( 'Yes', 'woocommerce' ) . '</span>';
echo '<span class="note-on tips" data-tip="' . wc_sanitize_tooltip( $latest_note->content . '<br/><small style="display:block">' . sprintf( _n( 'Plus %d other note', 'Plus %d other notes', ( $post->comment_count - 1 ), 'woocommerce' ), $post->comment_count - 1 ) . '</small>' ) . '">' . __( 'Yes', 'woocommerce' ) . '</span>';
} else {
/* translators: %d: notes count */
echo '<span class="note-on tips" data-tip="' . wc_sanitize_tooltip( sprintf( _n( '%d note', '%d notes', $post->comment_count, 'woocommerce' ), $post->comment_count ) ) . '">' . __( 'Yes', 'woocommerce' ) . '</span>';
@ -1469,7 +1462,15 @@ class WC_Admin_Post_Types {
global $wp_query;
// Category Filtering
wc_product_dropdown_categories( array( 'option_select_text' => __( 'Filter by category', 'woocommerce' ) ) );
$current_category_slug = isset( $_GET['product_cat'] ) ? wc_clean( $_GET['product_cat'] ) : false;
$current_category = $current_category_slug ? get_term_by( 'slug', $current_category_slug, 'product_cat' ) : false;
?>
<select class="wc-category-search" name="product_cat" data-placeholder="<?php esc_attr_e( 'Filter by category', 'woocommerce' ); ?>" data-allow_clear="true">
<?php if ( $current_category_slug && $current_category ) : ?>
<option value="<?php echo esc_attr( $current_category_slug ); ?>" selected="selected"><?php echo esc_html( $current_category->name ); ?><option>
<?php endif; ?>
</select>
<?php
// Type filtering
$terms = get_terms( 'product_type' );
@ -1675,16 +1676,6 @@ class WC_Admin_Post_Types {
}
}
// Categories
if ( isset( $_GET['product_cat'] ) && '0' === $_GET['product_cat'] ) {
$query->query_vars['tax_query'][] = array(
'taxonomy' => 'product_cat',
'field' => 'id',
'terms' => get_terms( 'product_cat', array( 'fields' => 'ids' ) ),
'operator' => 'NOT IN',
);
}
// Shipping classes
if ( isset( $_GET['product_shipping_class'] ) && '0' === $_GET['product_shipping_class'] ) {
$query->query_vars['tax_query'][] = array(

View File

@ -133,7 +133,7 @@ class WC_Admin_Reports {
}
$reports = apply_filters( 'woocommerce_admin_reports', $reports );
$reports = apply_filters( 'woocommerce_reports_charts', $reports ); // Backwards compat
$reports = apply_filters( 'woocommerce_reports_charts', $reports ); // Backwards compatibility.
foreach ( $reports as $key => $report_group ) {
if ( isset( $reports[ $key ]['charts'] ) ) {

View File

@ -110,7 +110,6 @@ class WC_Admin_Settings {
/**
* Output messages + errors.
* @return string
*/
public static function show_messages() {
if ( sizeof( self::$errors ) > 0 ) {

View File

@ -18,7 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) {
*/
class WC_Admin_Setup_Wizard {
/** @var string Currenct Step */
/** @var string Current Step */
private $step = '';
/** @var array Steps for the setup wizard */

View File

@ -176,8 +176,6 @@ class WC_Admin {
/**
* Preview email template.
*
* @return string
*/
public function preview_emails() {

View File

@ -374,7 +374,7 @@ class WC_Helper {
), admin_url( 'admin.php' ) );
/* translators: %1$s: product name, %2$s: deactivate url */
$message = sprintf( __( 'Subscription for %1$s deactivated successfully. You will no longer receive updates for this product. <a href="%2$s">Click here</a> if you wish to deactive the plugin as well.', 'woocommerce' ),
$message = sprintf( __( 'Subscription for %1$s deactivated successfully. You will no longer receive updates for this product. <a href="%2$s">Click here</a> if you wish to deactivate the plugin as well.', 'woocommerce' ),
'<strong>' . esc_html( $subscription['product_name'] ) . '</strong>', esc_url( $deactivate_plugin_url ) );
}
@ -835,7 +835,7 @@ class WC_Helper {
$plugins = get_plugins();
$woo_plugins = array();
// Back-compat for woothemes_queue_update().
// Backwards compatibility for woothemes_queue_update().
$_compat = array();
if ( ! empty( $GLOBALS['woothemes_queued_updates'] ) ) {
foreach ( $GLOBALS['woothemes_queued_updates'] as $_compat_plugin ) {
@ -880,7 +880,7 @@ class WC_Helper {
foreach ( $themes as $theme ) {
$header = $theme->get( 'Woo' );
// Back-compat for theme_info.txt
// Backwards compatibility for theme_info.txt
if ( ! $header ) {
$txt = $theme->get_stylesheet_directory() . '/theme_info.txt';
if ( is_readable( $txt ) ) {

View File

@ -226,7 +226,7 @@ class WC_Meta_Box_Coupon_Data {
'label' => __( 'Email restrictions', 'woocommerce' ),
'placeholder' => __( 'No restrictions', 'woocommerce' ),
'description' => __( 'List of allowed emails to check against the customer billing email when an order is placed. Separate email addresses with commas.', 'woocommerce' ),
'value' => implode( ', ', (array) get_post_meta( $post->ID, 'customer_email', true ) ),
'value' => implode( ', ', (array) $coupon->get_email_restrictions() ),
'desc_tip' => true,
'type' => 'email',
'class' => '',

View File

@ -26,18 +26,10 @@ class WC_Meta_Box_Order_Notes {
global $post;
$args = array(
'post_id' => $post->ID,
'orderby' => 'comment_ID',
'order' => 'DESC',
'approve' => 'approve',
'type' => 'order_note',
'order_id' => $post->ID,
);
remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
$notes = get_comments( $args );
add_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
$notes = wc_get_order_notes( $args );
echo '<ul class="order_notes">';
@ -46,20 +38,20 @@ class WC_Meta_Box_Order_Notes {
foreach ( $notes as $note ) {
$note_classes = array( 'note' );
$note_classes[] = get_comment_meta( $note->comment_ID, 'is_customer_note', true ) ? 'customer-note' : '';
$note_classes[] = ( __( 'WooCommerce', 'woocommerce' ) === $note->comment_author ) ? 'system-note' : '';
$note_classes[] = $note->customer_note ? 'customer-note' : '';
$note_classes[] = 'system' === $note->added_by ? 'system-note' : '';
$note_classes = apply_filters( 'woocommerce_order_note_class', array_filter( $note_classes ), $note );
?>
<li rel="<?php echo absint( $note->comment_ID ); ?>" class="<?php echo esc_attr( implode( ' ', $note_classes ) ); ?>">
<li rel="<?php echo absint( $note->id ); ?>" class="<?php echo esc_attr( implode( ' ', $note_classes ) ); ?>">
<div class="note_content">
<?php echo wpautop( wptexturize( wp_kses_post( $note->comment_content ) ) ); ?>
<?php echo wpautop( wptexturize( wp_kses_post( $note->content ) ) ); ?>
</div>
<p class="meta">
<abbr class="exact-date" title="<?php echo $note->comment_date; ?>"><?php printf( __( 'added on %1$s at %2$s', 'woocommerce' ), date_i18n( wc_date_format(), strtotime( $note->comment_date ) ), date_i18n( wc_time_format(), strtotime( $note->comment_date ) ) ); ?></abbr>
<abbr class="exact-date" title="<?php echo $note->date_created->date( 'y-m-d h:i:s' ); ?>"><?php printf( __( 'added on %1$s at %2$s', 'woocommerce' ), $note->date_created->date_i18n( wc_date_format() ), $note->date_created->date_i18n( wc_time_format() ) ); ?></abbr>
<?php
if ( __( 'WooCommerce', 'woocommerce' ) !== $note->comment_author ) :
if ( 'system' !== $note->added_by ) :
/* translators: %s: note author */
printf( ' ' . __( 'by %s', 'woocommerce' ), $note->comment_author );
printf( ' ' . __( 'by %s', 'woocommerce' ), $note->added_by );
endif;
?>
<a href="#" class="delete_note" role="button"><?php _e( 'Delete note', 'woocommerce' ); ?></a>

View File

@ -357,7 +357,7 @@ class WC_Meta_Box_Product_Data {
'product_url' => esc_url_raw( $_POST['_product_url'] ),
'button_text' => wc_clean( $_POST['_button_text'] ),
'children' => 'grouped' === $product_type ? self::prepare_children() : null,
'reviews_allowed' => ! empty( $_POST['_reviews_allowed'] ),
'reviews_allowed' => ! empty( $_POST['comment_status'] ) && 'open' === $_POST['comment_status'],
'attributes' => $attributes,
'default_attributes' => self::prepare_set_attributes( $attributes, 'default_attribute_' ),
) );

View File

@ -32,7 +32,7 @@ class WC_Meta_Box_Product_Images {
if ( metadata_exists( 'post', $post->ID, '_product_image_gallery' ) ) {
$product_image_gallery = get_post_meta( $post->ID, '_product_image_gallery', true );
} else {
// Backwards compat
// Backwards compatibility.
$attachment_ids = get_posts( 'post_parent=' . $post->ID . '&numberposts=-1&post_type=attachment&orderby=menu_order&order=ASC&post_mime_type=image&fields=ids&meta_key=_woocommerce_exclude_image&meta_value=0' );
$attachment_ids = array_diff( $attachment_ids, array( get_post_thumbnail_id() ) );
$product_image_gallery = implode( ',', $attachment_ids );

View File

@ -37,7 +37,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<div class="options_group reviews">
<?php
woocommerce_wp_checkbox( array(
'id' => '_reviews_allowed',
'id' => 'comment_status',
'value' => $product_object->get_reviews_allowed( 'edit' ) ? 'open' : 'closed',
'label' => __( 'Enable reviews', 'woocommerce' ),
'cbvalue' => 'open',

View File

@ -104,7 +104,8 @@ class WC_Admin_Report {
$query = array();
$select = array();
foreach ( $data as $key => $value ) {
foreach ( $data as $raw_key => $value ) {
$key = sanitize_key( $raw_key );
$distinct = '';
if ( isset( $value['distinct'] ) ) {
@ -146,16 +147,17 @@ class WC_Admin_Report {
// Joins
$joins = array();
foreach ( ( $data + $where ) as $key => $value ) {
foreach ( ( $data + $where ) as $raw_key => $value ) {
$join_type = isset( $value['join_type'] ) ? $value['join_type'] : 'INNER';
$type = isset( $value['type'] ) ? $value['type'] : false;
$key = sanitize_key( $raw_key );
switch ( $type ) {
case 'meta' :
$joins[ "meta_{$key}" ] = "{$join_type} JOIN {$wpdb->postmeta} AS meta_{$key} ON ( posts.ID = meta_{$key}.post_id AND meta_{$key}.meta_key = '{$key}' )";
$joins[ "meta_{$key}" ] = "{$join_type} JOIN {$wpdb->postmeta} AS meta_{$key} ON ( posts.ID = meta_{$key}.post_id AND meta_{$key}.meta_key = '{$raw_key}' )";
break;
case 'parent_meta' :
$joins[ "parent_meta_{$key}" ] = "{$join_type} JOIN {$wpdb->postmeta} AS parent_meta_{$key} ON (posts.post_parent = parent_meta_{$key}.post_id) AND (parent_meta_{$key}.meta_key = '{$key}')";
$joins[ "parent_meta_{$key}" ] = "{$join_type} JOIN {$wpdb->postmeta} AS parent_meta_{$key} ON (posts.post_parent = parent_meta_{$key}.post_id) AND (parent_meta_{$key}.meta_key = '{$raw_key}')";
break;
case 'order_item_meta' :
$joins["order_items"] = "{$join_type} JOIN {$wpdb->prefix}woocommerce_order_items AS order_items ON (posts.ID = order_items.order_id)";
@ -166,7 +168,7 @@ class WC_Admin_Report {
$joins[ "order_item_meta_{$key}" ] = "{$join_type} JOIN {$wpdb->prefix}woocommerce_order_itemmeta AS order_item_meta_{$key} ON " .
"(order_items.order_item_id = order_item_meta_{$key}.order_item_id) " .
" AND (order_item_meta_{$key}.meta_key = '{$key}')";
" AND (order_item_meta_{$key}.meta_key = '{$raw_key}')";
break;
case 'order_item' :
$joins["order_items"] = "{$join_type} JOIN {$wpdb->prefix}woocommerce_order_items AS order_items ON posts.ID = order_items.order_id";
@ -181,7 +183,7 @@ class WC_Admin_Report {
}
$join_type = isset( $value['join_type'] ) ? $value['join_type'] : 'INNER';
$type = isset( $value['type'] ) ? $value['type'] : false;
$key = is_array( $value['meta_key'] ) ? $value['meta_key'][0] . '_array' : $value['meta_key'];
$key = sanitize_key( is_array( $value['meta_key'] ) ? $value['meta_key'][0] . '_array' : $value['meta_key'] );
if ( 'order_item_meta' === $type ) {
@ -238,7 +240,7 @@ class WC_Admin_Report {
continue;
}
$key = is_array( $value['meta_key'] ) ? $value['meta_key'][0] . '_array' : $value['meta_key'];
$key = sanitize_key( is_array( $value['meta_key'] ) ? $value['meta_key'][0] . '_array' : $value['meta_key'] );
if ( strtolower( $value['operator'] ) == 'in' || strtolower( $value['operator'] ) == 'not in' ) {
@ -614,8 +616,6 @@ class WC_Admin_Report {
/**
* Get the main chart.
*
* @return string
*/
public function get_main_chart() {}

View File

@ -359,8 +359,6 @@ class WC_Report_Coupon_Usage extends WC_Admin_Report {
/**
* Get the main chart.
*
* @return string
*/
public function get_main_chart() {
global $wp_locale;

View File

@ -272,8 +272,6 @@ class WC_Report_Sales_By_Category extends WC_Admin_Report {
/**
* Get the main chart.
*
* @return string
*/
public function get_main_chart() {
global $wp_locale;

View File

@ -373,14 +373,14 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
$refunded_orders = array_merge( $this->report_data->partial_refunds, $this->report_data->full_refunds );
foreach ( $refunded_orders as $key => $value ) {
$this->report_data->total_tax_refunded += ( $value->total_tax < 0 ? $value->total_tax * -1 : $value->total_tax );
$this->report_data->total_refunds += $value->total_refund;
$this->report_data->total_shipping_tax_refunded += ( $value->total_shipping_tax < 0 ? $value->total_shipping_tax * -1 : $value->total_shipping_tax );
$this->report_data->total_shipping_refunded += ( $value->total_shipping < 0 ? $value->total_shipping * -1 : $value->total_shipping );
$this->report_data->total_tax_refunded += floatval( $value->total_tax < 0 ? $value->total_tax * -1 : $value->total_tax );
$this->report_data->total_refunds += floatval( $value->total_refund );
$this->report_data->total_shipping_tax_refunded += floatval( $value->total_shipping_tax < 0 ? $value->total_shipping_tax * -1 : $value->total_shipping_tax );
$this->report_data->total_shipping_refunded += floatval( $value->total_shipping < 0 ? $value->total_shipping * -1 : $value->total_shipping );
// Only applies to parial.
if ( isset( $value->order_item_count ) ) {
$this->report_data->refunded_order_items += ( $value->order_item_count < 0 ? $value->order_item_count * -1 : $value->order_item_count );
$this->report_data->refunded_order_items += floatval( $value->order_item_count < 0 ? $value->order_item_count * -1 : $value->order_item_count );
}
}
@ -607,8 +607,6 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
/**
* Get the main chart.
*
* @return string
*/
public function get_main_chart() {
global $wp_locale;

View File

@ -387,8 +387,6 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
/**
* Get the main chart.
*
* @return string
*/
public function get_main_chart() {
global $wp_locale;

View File

@ -67,8 +67,6 @@ class WC_Report_Taxes_By_Code extends WC_Admin_Report {
/**
* Get the main chart.
*
* @return string
*/
public function get_main_chart() {
global $wpdb;

View File

@ -67,8 +67,6 @@ class WC_Report_Taxes_By_Date extends WC_Admin_Report {
/**
* Get the main chart.
*
* @return string
*/
public function get_main_chart() {
$query_data = array(

View File

@ -92,7 +92,7 @@ class WC_REST_Authentication {
* @return WP_Error|null|bool
*/
public function check_authentication_error( $error ) {
// Passthrough other errors.
// Pass through other errors.
if ( ! empty( $error ) ) {
return $error;
}
@ -103,7 +103,7 @@ class WC_REST_Authentication {
/**
* Set authentication error.
*
* @param WP_Error $error Authication error data.
* @param WP_Error $error Authentication error data.
*/
protected function set_error( $error ) {
// Reset user.
@ -533,6 +533,8 @@ class WC_REST_Authentication {
return new WP_Error( 'woocommerce_rest_authentication_error', __( 'The API key provided does not have write permissions.', 'woocommerce' ), array( 'status' => 401 ) );
}
break;
case 'OPTIONS' :
return true;
default :
return new WP_Error( 'woocommerce_rest_authentication_error', __( 'Unknown request method.', 'woocommerce' ), array( 'status' => 401 ) );

View File

@ -240,7 +240,7 @@ class WC_REST_Coupons_Controller extends WC_REST_Legacy_Coupons_Controller {
}
/**
* Only reutrn writeable props from schema.
* Only return writable props from schema.
*
* @param array $schema
* @return bool

View File

@ -394,7 +394,7 @@ class WC_REST_Orders_Controller extends WC_REST_Legacy_Orders_Controller {
}
/**
* Only reutrn writeable props from schema.
* Only return writable props from schema.
*
* @param array $schema
* @return bool

View File

@ -888,6 +888,10 @@ class WC_REST_System_Status_Controller extends WC_REST_Controller {
'option' => 'woocommerce_myaccount_page_id',
'shortcode' => '[' . apply_filters( 'woocommerce_my_account_shortcode_tag', 'woocommerce_my_account' ) . ']',
),
_x( 'Terms and conditions', 'Page setting', 'woocommerce' ) => array(
'option' => 'woocommerce_terms_page_id',
'shortcode' => '',
),
);
$pages_output = array();

View File

@ -215,7 +215,7 @@ class WC_REST_Legacy_Orders_Controller extends WC_REST_CRUD_Controller {
* The dynamic portion of the hook name, $this->post_type, refers to post_type of the post being
* prepared for the response.
*
* @param WC_Order $order The prder object.
* @param WC_Order $order The Order object.
* @param WP_REST_Request $request Request object.
*/
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}", $order, $request );

View File

@ -19,7 +19,6 @@ class WC_API_Authentication {
* Setup class
*
* @since 2.1
* @return WC_API_Authentication
*/
public function __construct() {
@ -293,7 +292,7 @@ class WC_API_Authentication {
*
* @since 2.1
* @see rawurlencode()
* @param array $parameters un-normalized pararmeters
* @param array $parameters un-normalized parameters
* @return array normalized parameters
*/
private function normalize_parameters( $parameters ) {

View File

@ -31,7 +31,6 @@ class WC_API_Customers extends WC_API_Resource {
*
* @since 2.1
* @param WC_API_Server $server
* @return WC_API_Customers
*/
public function __construct( WC_API_Server $server ) {

View File

@ -28,7 +28,6 @@ class WC_API_Resource {
*
* @since 2.1
* @param WC_API_Server $server
* @return WC_API_Resource
*/
public function __construct( WC_API_Server $server ) {

View File

@ -112,7 +112,6 @@ class WC_API_Server {
*
* @since 2.1
* @param $path
* @return WC_API_Server
*/
public function __construct( $path ) {

View File

@ -19,7 +19,6 @@ class WC_API_Authentication {
* Setup class
*
* @since 2.1
* @return WC_API_Authentication
*/
public function __construct() {
@ -291,7 +290,7 @@ class WC_API_Authentication {
*
* @since 2.1
* @see rawurlencode()
* @param array $parameters un-normalized pararmeters
* @param array $parameters un-normalized parameters
* @return array normalized parameters
*/
private function normalize_parameters( $parameters ) {

View File

@ -30,7 +30,6 @@ class WC_API_Customers extends WC_API_Resource {
*
* @since 2.1
* @param WC_API_Server $server
* @return WC_API_Customers
*/
public function __construct( WC_API_Server $server ) {
@ -608,7 +607,7 @@ class WC_API_Customers extends WC_API_Resource {
$query_args['order'] = $args['order'];
}
// Orderby
// Order by
if ( ! empty( $args['orderby'] ) ) {
$query_args['orderby'] = $args['orderby'];

View File

@ -1444,7 +1444,7 @@ class WC_API_Orders extends WC_API_Resource {
}
// Force delete since trashed order notes could not be managed through comments list table
$result = wp_delete_comment( $note->comment_ID, true );
$result = wc_delete_order_note( $note->comment_ID );
if ( ! $result ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_delete_order_note', __( 'This order note cannot be deleted', 'woocommerce' ), 500 );

View File

@ -27,7 +27,6 @@ class WC_API_Resource {
*
* @since 2.1
* @param WC_API_Server $server
* @return WC_API_Resource
*/
public function __construct( WC_API_Server $server ) {

View File

@ -111,7 +111,6 @@ class WC_API_Server {
*
* @since 2.1
* @param $path
* @return WC_API_Server
*/
public function __construct( $path ) {

View File

@ -19,7 +19,6 @@ class WC_API_Authentication {
* Setup class
*
* @since 2.1
* @return WC_API_Authentication
*/
public function __construct() {
@ -290,7 +289,7 @@ class WC_API_Authentication {
*
* @since 2.1
* @see rawurlencode()
* @param array $parameters un-normalized pararmeters
* @param array $parameters un-normalized parameters
* @return array normalized parameters
*/
private function normalize_parameters( $parameters ) {

View File

@ -30,7 +30,6 @@ class WC_API_Customers extends WC_API_Resource {
*
* @since 2.1
* @param WC_API_Server $server
* @return WC_API_Customers
*/
public function __construct( WC_API_Server $server ) {
@ -598,7 +597,7 @@ class WC_API_Customers extends WC_API_Resource {
$query_args['order'] = $args['order'];
}
// Orderby
// Order by
if ( ! empty( $args['orderby'] ) ) {
$query_args['orderby'] = $args['orderby'];

View File

@ -1491,7 +1491,7 @@ class WC_API_Orders extends WC_API_Resource {
}
// Force delete since trashed order notes could not be managed through comments list table
$result = wp_delete_comment( $note->comment_ID, true );
$result = wc_delete_order_note( $note->comment_ID );
if ( ! $result ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_delete_order_note', __( 'This order note cannot be deleted', 'woocommerce' ), 500 );

View File

@ -27,7 +27,6 @@ class WC_API_Resource {
*
* @since 2.1
* @param WC_API_Server $server
* @return WC_API_Resource
*/
public function __construct( WC_API_Server $server ) {

View File

@ -111,7 +111,6 @@ class WC_API_Server {
*
* @since 2.1
* @param $path
* @return WC_API_Server
*/
public function __construct( $path ) {

View File

@ -297,7 +297,7 @@ class WC_API_Taxes extends WC_API_Resource {
continue;
}
// Fix compund and shipping values
// Fix compound and shipping values
if ( in_array( $key, array( 'compound', 'shipping' ) ) ) {
$value = $value ? 1 : 0;
}

View File

@ -219,7 +219,7 @@ class WC_REST_Coupons_V1_Controller extends WC_REST_Posts_Controller {
}
/**
* Only reutrn writeable props from schema.
* Only return writable props from schema.
* @param array $schema
* @return bool
*/

View File

@ -279,7 +279,7 @@ class WC_REST_Customers_V1_Controller extends WC_REST_Controller {
$response = rest_ensure_response( $users );
// Store pagation values for headers then unset for count query.
// Store pagination values for headers then unset for count query.
$per_page = (int) $prepared_args['number'];
$page = ceil( ( ( (int) $prepared_args['offset'] ) / $per_page ) + 1 );

View File

@ -310,7 +310,7 @@ class WC_REST_Order_Notes_V1_Controller extends WC_REST_Controller {
$request->set_param( 'context', 'edit' );
$response = $this->prepare_item_for_response( $note, $request );
$result = wp_delete_comment( $note->comment_ID, true );
$result = wc_delete_order_note( $note->comment_ID );
if ( ! $result ) {
return new WP_Error( 'woocommerce_rest_cannot_delete', sprintf( __( 'The %s cannot be deleted.', 'woocommerce' ), 'order_note' ), array( 'status' => 500 ) );

View File

@ -496,7 +496,7 @@ class WC_REST_Orders_V1_Controller extends WC_REST_Posts_Controller {
* The dynamic portion of the hook name, $this->post_type, refers to post_type of the post being
* prepared for the response.
*
* @param WC_Order $order The prder object.
* @param WC_Order $order The order object.
* @param WP_REST_Request $request Request object.
*/
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}", $order, $request );
@ -513,7 +513,7 @@ class WC_REST_Orders_V1_Controller extends WC_REST_Posts_Controller {
}
/**
* Only reutrn writeable props from schema.
* Only return writable props from schema.
* @param array $schema
* @return bool
*/

View File

@ -252,14 +252,14 @@ class WC_REST_Taxes_V1_Controller extends WC_REST_Controller {
$response = rest_ensure_response( $taxes );
// Store pagation values for headers then unset for count query.
// Store pagination values for headers then unset for count query.
$per_page = (int) $prepared_args['number'];
$page = ceil( ( ( (int) $prepared_args['offset'] ) / $per_page ) + 1 );
// Query only for ids.
$wpdb->get_results( str_replace( 'SELECT *', 'SELECT tax_rate_id', $query ) );
// Calcule totals.
// Calculate totals.
$total_taxes = (int) $wpdb->num_rows;
$response->header( 'X-WP-Total', (int) $total_taxes );
$max_pages = ceil( $total_taxes / $per_page );

View File

@ -93,6 +93,7 @@ class WC_AJAX {
'get_cart_totals' => true,
'update_order_review' => true,
'add_to_cart' => true,
'remove_from_cart' => true,
'checkout' => true,
'get_variation' => true,
'get_customer_location' => true,
@ -127,6 +128,7 @@ class WC_AJAX {
'json_search_products_and_variations' => false,
'json_search_downloadable_products_and_variations' => false,
'json_search_customers' => false,
'json_search_categories' => false,
'term_ordering' => false,
'product_ordering' => false,
'refund_line_items' => false,
@ -382,6 +384,21 @@ class WC_AJAX {
}
}
/**
* AJAX add to cart.
*/
public static function remove_from_cart() {
ob_start();
$cart_item_key = wc_clean( $_POST['cart_item_key'] );
if ( $cart_item_key && false !== WC()->cart->remove_cart_item( $cart_item_key ) ) {
self::get_refreshed_fragments();
} else {
wp_send_json_error();
}
}
/**
* Process ajax checkout form.
*/
@ -575,7 +592,7 @@ class WC_AJAX {
$variation_object->set_parent_id( $product_id );
$variation_id = $variation_object->save();
$variation = get_post( $variation_id );
$variation_data = array_merge( array_map( 'maybe_unserialize', get_post_custom( $variation_id ) ), wc_get_product_variation_attributes( $variation_id ) ); // kept for BW compat.
$variation_data = array_merge( array_map( 'maybe_unserialize', get_post_custom( $variation_id ) ), wc_get_product_variation_attributes( $variation_id ) ); // kept for BW compatibility.
include( 'admin/meta-boxes/views/html-variation-admin.php' );
wp_die();
}
@ -613,7 +630,7 @@ class WC_AJAX {
}
$added = 0;
$possible_attributes = wc_array_cartesian( $attributes );
$possible_attributes = array_reverse( wc_array_cartesian( $attributes ) );
foreach ( $possible_attributes as $possible_attribute ) {
if ( in_array( $possible_attribute, $existing_attributes ) ) {
@ -1023,7 +1040,7 @@ class WC_AJAX {
// Save order items first
wc_save_order_items( $order_id, $items );
// Grab the order and recalc taxes
// Grab the order and recalculate taxes
$order = wc_get_order( $order_id );
$order->calculate_taxes( $calculate_tax_args );
$order->calculate_totals( false );
@ -1120,7 +1137,7 @@ class WC_AJAX {
$note_id = (int) $_POST['note_id'];
if ( $note_id > 0 ) {
wp_delete_comment( $note_id );
wc_delete_order_note( $note_id );
}
wp_die();
}
@ -1269,6 +1286,53 @@ class WC_AJAX {
wp_send_json( apply_filters( 'woocommerce_json_search_found_customers', $found_customers ) );
}
/**
* Search for categories and return json.
*/
public static function json_search_categories() {
ob_start();
check_ajax_referer( 'search-categories', 'security' );
if ( ! current_user_can( 'edit_products' ) ) {
wp_die( -1 );
}
if ( ! $search_text = wc_clean( stripslashes( $_GET['term'] ) ) ) {
wp_die();
}
$found_categories = array();
$args = array(
'taxonomy' => array( 'product_cat' ),
'orderby' => 'id',
'order' => 'ASC',
'hide_empty' => true,
'fields' => 'all',
'name__like' => $search_text,
);
if ( $terms = get_terms( $args ) ) {
foreach ( $terms as $term ) {
$term->formatted_name = '';
if ( $term->parent ) {
$ancestors = array_reverse( get_ancestors( $term->term_id, 'product_cat' ) );
foreach ( $ancestors as $ancestor ) {
if ( $ancestor_term = get_term( $ancestor, 'product_cat' ) ) {
$term->formatted_name .= $ancestor_term->name . ' > ';
}
}
}
$term->formatted_name .= $term->name . ' (' . $term->count . ')';
$found_categories[ $term->term_id ] = $term;
}
}
wp_send_json( apply_filters( 'woocommerce_json_search_found_categories', $found_categories ) );
}
/**
* Ajax request handling for categories ordering.
*/
@ -1590,7 +1654,7 @@ class WC_AJAX {
foreach ( $variations as $variation_object ) {
$variation_id = $variation_object->get_id();
$variation = get_post( $variation_id );
$variation_data = array_merge( array_map( 'maybe_unserialize', get_post_custom( $variation_id ) ), wc_get_product_variation_attributes( $variation_id ) ); // kept for BW compat.
$variation_data = array_merge( array_map( 'maybe_unserialize', get_post_custom( $variation_id ) ), wc_get_product_variation_attributes( $variation_id ) ); // kept for BW compatibility.
include( 'admin/meta-boxes/views/html-variation-admin.php' );
$loop++;
}

View File

@ -379,7 +379,7 @@ class WC_Auth {
} catch ( Exception $e ) {
$this->maybe_delete_key( $consumer_data );
/* translators: %s: error messase */
/* translators: %s: error message */
wp_die( sprintf( __( 'Error: %s.', 'woocommerce' ), $e->getMessage() ), __( 'Access denied', 'woocommerce' ), array( 'response' => 401 ) );
}
}

View File

@ -1339,7 +1339,7 @@ class WC_Cart {
/**
* Store costs + taxes for lines. For tax inclusive prices, we do some extra rounding logic so the stored
* values "add up" when viewing the order in admin. This does have the disadvatage of not being able to
* values "add up" when viewing the order in admin. This does have the disadvantage of not being able to
* recalculate the tax total/subtotal accurately in the future, but it does ensure the data looks correct.
*
* Tax exclusive prices are not affected.

View File

@ -562,7 +562,7 @@ class WC_Checkout {
switch ( $type ) {
case 'checkbox' :
$value = (int) isset( $_POST[ $key ] );
$value = isset( $_POST[ $key ] ) ? 1 : '';
break;
case 'multiselect' :
$value = isset( $_POST[ $key ] ) ? implode( ', ', wc_clean( $_POST[ $key ] ) ) : '';

View File

@ -316,7 +316,7 @@ class WC_Coupon extends WC_Legacy_Coupon {
}
/**
* Get minium spend amount.
* Get minimum spend amount.
* @since 3.0.0
* @param string $context
* @return float
@ -665,7 +665,7 @@ class WC_Coupon extends WC_Legacy_Coupon {
*/
/**
* Developers can programically return coupons. This function will read those values into our WC_Coupon class.
* Developers can programmatically return coupons. This function will read those values into our WC_Coupon class.
* @since 3.0.0
* @param string $code Coupon code
* @param array $coupon Array of coupon properties
@ -929,7 +929,7 @@ class WC_Coupon extends WC_Legacy_Coupon {
}
/**
* Cart discounts cannot be added if non-eligble product is found in cart.
* Cart discounts cannot be added if non-eligible product is found in cart.
*/
private function validate_cart_excluded_items() {
if ( ! $this->is_type( wc_get_product_coupon_types() ) ) {

View File

@ -5,7 +5,8 @@ if ( ! defined( 'ABSPATH' ) ) {
}
/**
* WC Wrapper for PHP DateTime.
* WC Wrapper for PHP DateTime which adds support for gmt/utc offset when a
* timezone is absent.
*
* @class WC_DateTime
* @since 3.0.0
@ -16,13 +17,15 @@ if ( ! defined( 'ABSPATH' ) ) {
class WC_DateTime extends DateTime {
/**
* UTC Offset if needed.
* UTC Offset, if needed. Only used when a timezone is not set. When
* timezones are used this will equal 0.
*
* @var integer
*/
protected $utc_offset = 0;
/**
* Output an ISO 8601 date string in local timezone.
* Output an ISO 8601 date string in local (WordPress) timezone.
*
* @since 3.0.0
* @return string
@ -32,7 +35,7 @@ class WC_DateTime extends DateTime {
}
/**
* Set UTC offset.
* Set UTC offset - this is a fixed offset instead of a timezone.
*
* @param int $offset
*/
@ -41,7 +44,7 @@ class WC_DateTime extends DateTime {
}
/**
* getOffset.
* Get UTC offset if set, or default to the DateTime object's offset.
*/
public function getOffset() {
if ( $this->utc_offset ) {
@ -64,7 +67,7 @@ class WC_DateTime extends DateTime {
}
/**
* Missing in PHP 5.2.
* Missing in PHP 5.2 so just here so it can be supported consistently.
*
* @since 3.0.0
* @return int

View File

@ -189,13 +189,17 @@ class WC_Download_Handler {
$wp_uploads_dir = $wp_uploads['basedir'];
$wp_uploads_url = $wp_uploads['baseurl'];
// Replace uploads dir, site url etc with absolute counterparts if we can
/**
* Replace uploads dir, site url etc with absolute counterparts if we can.
* Note the str_replace on site_url is on purpose, so if https is forced
* via filters we can still do the string replacement on a HTTP file.
*/
$replacements = array(
$wp_uploads_url => $wp_uploads_dir,
network_site_url( '/', 'https' ) => ABSPATH,
network_site_url( '/', 'http' ) => ABSPATH,
site_url( '/', 'https' ) => ABSPATH,
site_url( '/', 'http' ) => ABSPATH,
$wp_uploads_url => $wp_uploads_dir,
network_site_url( '/', 'https' ) => ABSPATH,
str_replace( 'https:', 'http:', network_site_url( '/', 'http' ) ) => ABSPATH,
site_url( '/', 'https' ) => ABSPATH,
str_replace( 'https:', 'http:', site_url( '/', 'http' ) ) => ABSPATH,
);
$file_path = str_replace( array_keys( $replacements ), array_values( $replacements ), $file_path );

View File

@ -165,6 +165,7 @@ class WC_Emails {
// Email Header, Footer and content hooks
add_action( 'woocommerce_email_header', array( $this, 'email_header' ) );
add_action( 'woocommerce_email_footer', array( $this, 'email_footer' ) );
add_action( 'woocommerce_email_order_details', array( $this, 'order_downloads' ), 10, 4 );
add_action( 'woocommerce_email_order_details', array( $this, 'order_details' ), 10, 4 );
add_action( 'woocommerce_email_order_meta', array( $this, 'order_meta' ), 10, 3 );
add_action( 'woocommerce_email_customer_details', array( $this, 'customer_details' ), 10, 3 );
@ -340,13 +341,42 @@ class WC_Emails {
}
}
/**
* Show order downloads in a table.
*
* @since 3.2.0
* @param WC_Order $order
* @param bool $sent_to_admin
* @param bool $plain_text
* @param string $email
*/
public function order_downloads( $order, $sent_to_admin = false, $plain_text = false, $email = '' ) {
$show_downloads = $order->has_downloadable_item() && $order->is_download_permitted();
if ( ! $show_downloads ) {
return;
}
$downloads = $order->get_downloadable_items();
$columns = apply_filters( 'woocommerce_email_downloads_columns', array(
'download-product' => __( 'Product', 'woocommerce' ),
'download-expires' => __( 'Expires', 'woocommerce' ),
'download-file' => __( 'Download', 'woocommerce' ),
) );
if ( $plain_text ) {
wc_get_template( 'emails/plain/email-downloads.php', array( 'order' => $order, 'sent_to_admin' => $sent_to_admin, 'plain_text' => $plain_text, 'email' => $email, 'downloads' => $downloads, 'columns' => $columns ) );
} else {
wc_get_template( 'emails/email-downloads.php', array( 'order' => $order, 'sent_to_admin' => $sent_to_admin, 'plain_text' => $plain_text, 'email' => $email, 'downloads' => $downloads, 'columns' => $columns ) );
}
}
/**
* Add order meta to email templates.
*
* @param mixed $order
* @param bool $sent_to_admin (default: false)
* @param bool $plain_text (default: false)
* @return string
* @param bool $sent_to_admin (default: false)
* @param bool $plain_text (default: false)
*/
public function order_meta( $order, $sent_to_admin = false, $plain_text = false ) {
$fields = apply_filters( 'woocommerce_email_order_meta_fields', array(), $sent_to_admin, $order );
@ -401,7 +431,9 @@ class WC_Emails {
}
/**
* Add customer details to email templates.
* Allows developers to add additional customer details to templates.
*
* In versions prior to 3.2 this was used for notes, phone and email but this data has moved.
*
* @param WC_Order $order
* @param bool $sent_to_admin (default: false)
@ -412,35 +444,15 @@ class WC_Emails {
if ( ! is_a( $order, 'WC_Order' ) ) {
return;
}
$fields = array();
if ( $order->get_customer_note() ) {
$fields['customer_note'] = array(
'label' => __( 'Note', 'woocommerce' ),
'value' => wptexturize( $order->get_customer_note() ),
);
}
$fields = array_filter( apply_filters( 'woocommerce_email_customer_details_fields', array(), $sent_to_admin, $order ), array( $this, 'customer_detail_field_is_valid' ) );
if ( $order->get_billing_email() ) {
$fields['billing_email'] = array(
'label' => __( 'Email address', 'woocommerce' ),
'value' => wptexturize( $order->get_billing_email() ),
);
}
if ( $order->get_billing_phone() ) {
$fields['billing_phone'] = array(
'label' => __( 'Phone', 'woocommerce' ),
'value' => wptexturize( $order->get_billing_phone() ),
);
}
$fields = array_filter( apply_filters( 'woocommerce_email_customer_details_fields', $fields, $sent_to_admin, $order ), array( $this, 'customer_detail_field_is_valid' ) );
if ( $plain_text ) {
wc_get_template( 'emails/plain/email-customer-details.php', array( 'fields' => $fields ) );
} else {
wc_get_template( 'emails/email-customer-details.php', array( 'fields' => $fields ) );
if ( ! empty( $fields ) ) {
if ( $plain_text ) {
wc_get_template( 'emails/plain/email-customer-details.php', array( 'fields' => $fields ) );
} else {
wc_get_template( 'emails/email-customer-details.php', array( 'fields' => $fields ) );
}
}
}

View File

@ -40,7 +40,7 @@ class WC_Form_Handler {
}
/**
* Remove key and login from querystring, set cookie, and redirect to account page to show the form.
* Remove key and login from query string, set cookie, and redirect to account page to show the form.
*/
public static function redirect_reset_password_link() {
if ( is_account_page() && ! empty( $_GET['key'] ) && ! empty( $_GET['login'] ) ) {

View File

@ -131,7 +131,7 @@ class WC_Order_Item_Coupon extends WC_Order_Item {
| Array Access Methods
|--------------------------------------------------------------------------
|
| For backwards compat with legacy arrays.
| For backwards compatibility with legacy arrays.
|
*/

Some files were not shown because too many files have changed in this diff Show More