Merge remote-tracking branch 'woothemes/master'

This commit is contained in:
Shohei Tanaka 2015-10-27 06:27:49 +09:00
commit 89dca3187f
299 changed files with 19485 additions and 11227 deletions

2
.gitignore vendored
View File

@ -5,12 +5,10 @@ project.properties
.buildpath
.project
.settings*
sftp-config.json
.idea
# Grunt
/node_modules/
/deploy/
# Sass
.sass-cache/

View File

@ -6,7 +6,7 @@ When contributing please ensure you follow the guidelines below to help us keep
__Please Note:__
GitHub and Transifex are for *bug reports and contributions only* - if you have a support question or a request for a customization this is not the right place to post it. Use [WooThemes Support](http://support.woothemes.com) for customer support, [WordPress.org](http://wordpress.org/support/plugin/woocommerce) for community support, and for customizations we recommend one of the following services:
GitHub is for *bug reports and contributions only* - if you have a support question or a request for a customization this is not the right place to post it. Use [WooThemes Support](http://support.woothemes.com) for customer support, [WordPress.org](http://wordpress.org/support/plugin/woocommerce) for community support, and for customizations we recommend one of the following services:
- [Codeable](https://codeable.io/)
- [Affiliated Woo Workers](http://www.woothemes.com/affiliated-woo-workers/)
@ -42,7 +42,7 @@ If you think something could be improved and you're able to do so, make your cha
* When committing, reference your issue number (#1234) and include a note about the fix
* Push the changes to your fork and submit a pull request on the master branch of the WooCommerce repository. Existing maintenance branches will be maintained by WooCommerce developers
* Please **don't** modify the changelog - this will be maintained by the WooCommerce developers.
* Please **don't** add your localizations or update the .pot files - these will also be maintained by the WooCommerce developers. To contribute to the localization of WooCommerce, please join the [WooCommerce Transifex project](https://www.transifex.com/projects/p/woocommerce/). This is much needed, if you speak a language that needs translating consider yourself officially invited to the party.
* Please **don't** add your localizations or update the .pot files - these will also be maintained by the WooCommerce developers. To contribute to the localization of WooCommerce, please join the [translate.wordpress.org project](https://translate.wordpress.org/projects/wp-plugins/woocommerce). This is much needed, if you speak a language that needs translating consider yourself officially invited to the party.
After you follow the step above, the next stage will be waiting on us to merge your Pull Request. We review them all, and make suggestions and changes as and if necessary.
@ -52,7 +52,7 @@ Localization is a very important part of WooCommerce. We believe in net neutrali
### Translating The Core
We have a [public project on Transifex](https://www.transifex.com/projects/p/woocommerce/). You can join the localization team of your language and help by translating WooCommerce.
We have a [project on translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/woocommerce). You can join the localization team of your language and help by translating WooCommerce.
If WooCommerce is already 100% translated for your language, join the team anyway! We regularly update our language files and there will definitely be need of your help soon.
### Translating Video Tutorials
@ -65,7 +65,5 @@ By translating video tutorials you'll be helping non-English speaking users to g
* [General GitHub documentation](http://help.github.com/)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
* [General Transifex documentation](http://docs.transifex.com/)
* [Translate using Transifex](http://docs.transifex.com/introduction/translators/)
* [WooCommerce Docs](http://docs.woothemes.com/)
* [WooThemes Support](http://support.woothemes.com)

View File

@ -21,9 +21,6 @@ module.exports = function( grunt ) {
'Gruntfile.js',
'<%= dirs.js %>/admin/*.js',
'!<%= dirs.js %>/admin/*.min.js',
'!<%= dirs.js %>/admin/jquery.flot*',
'!<%= dirs.js %>/admin/accounting.js',
'!<%= dirs.js %>/admin/round.js',
'<%= dirs.js %>/frontend/*.js',
'!<%= dirs.js %>/frontend/*.min.js',
'includes/gateways/simplify-commerce/assets/js/*.js',
@ -42,33 +39,30 @@ module.exports = function( grunt ) {
cwd: '<%= dirs.js %>/admin/',
src: [
'*.js',
'!*.min.js',
'!Gruntfile.js',
'!jquery.flot*' // !jquery.flot* prevents to join all jquery.flot files in jquery.min.js
'!*.min.js'
],
dest: '<%= dirs.js %>/admin/',
ext: '.min.js'
}]
},
adminflot: { // minify correctly the jquery.flot lib
files: {
'<%= dirs.js %>/admin/jquery.flot.min.js': ['<%= dirs.js %>/admin/jquery.flot.js'],
'<%= dirs.js %>/admin/jquery.flot.pie.min.js': ['<%= dirs.js %>/admin/jquery.flot.pie.js'],
'<%= dirs.js %>/admin/jquery.flot.resize.min.js': ['<%= dirs.js %>/admin/jquery.flot.resize.js'],
'<%= dirs.js %>/admin/jquery.flot.stack.min.js': ['<%= dirs.js %>/admin/jquery.flot.stack.js'],
'<%= dirs.js %>/admin/jquery.flot.time.min.js': ['<%= dirs.js %>/admin/jquery.flot.time.js']
}
},
jquery: {
vendor: {
files: {
'<%= dirs.js %>/accounting/accounting.min.js': ['<%= dirs.js %>/accounting/accounting.js'],
'<%= dirs.js %>/jquery-blockui/jquery.blockUI.min.js': ['<%= dirs.js %>/jquery-blockui/jquery.blockUI.js'],
'<%= dirs.js %>/jquery-cookie/jquery.cookie.min.js': ['<%= dirs.js %>/jquery-cookie/jquery.cookie.js'],
'<%= dirs.js %>/jquery-flot/jquery.flot.min.js': ['<%= dirs.js %>/jquery-flot/jquery.flot.js'],
'<%= dirs.js %>/jquery-flot/jquery.flot.pie.min.js': ['<%= dirs.js %>/jquery-flot/jquery.flot.pie.js'],
'<%= dirs.js %>/jquery-flot/jquery.flot.resize.min.js': ['<%= dirs.js %>/jquery-flot/jquery.flot.resize.js'],
'<%= dirs.js %>/jquery-flot/jquery.flot.stack.min.js': ['<%= dirs.js %>/jquery-flot/jquery.flot.stack.js'],
'<%= dirs.js %>/jquery-flot/jquery.flot.time.min.js': ['<%= dirs.js %>/jquery-flot/jquery.flot.time.js'],
'<%= dirs.js %>/jquery-payment/jquery.payment.min.js': ['<%= dirs.js %>/jquery-payment/jquery.payment.js'],
'<%= dirs.js %>/jquery-qrcode/jquery.qrcode.min.js': ['<%= dirs.js %>/jquery-qrcode/jquery.qrcode.js'],
'<%= dirs.js %>/jquery-serializejson/jquery.serializejson.min.js': ['<%= dirs.js %>/jquery-serializejson/jquery.serializejson.js'],
'<%= dirs.js %>/jquery-tiptip/jquery.tipTip.min.js': ['<%= dirs.js %>/jquery-tiptip/jquery.tipTip.js'],
'<%= dirs.js %>/jquery-ui-touch-punch/jquery-ui-touch-punch.min.js': ['<%= dirs.js %>/jquery-ui-touch-punch/jquery-ui-touch-punch.js'],
'<%= dirs.js %>/prettyPhoto/jquery.prettyPhoto.init.min.js': ['<%= dirs.js %>/prettyPhoto/jquery.prettyPhoto.init.js'],
'<%= dirs.js %>/prettyPhoto/jquery.prettyPhoto.min.js': ['<%= dirs.js %>/prettyPhoto/jquery.prettyPhoto.js'],
'<%= dirs.js %>/round/round.min.js': ['<%= dirs.js %>/round/round.js'],
'<%= dirs.js %>/select2/select2.min.js': ['<%= dirs.js %>/select2/select2.js'],
'<%= dirs.js %>/stupidtable/stupidtable.min.js': ['<%= dirs.js %>/stupidtable/stupidtable.js'],
'<%= dirs.js %>/zeroclipboard/jquery.zeroclipboard.min.js': ['<%= dirs.js %>/zeroclipboard/jquery.zeroclipboard.js']
@ -155,31 +149,14 @@ module.exports = function( grunt ) {
'language-team': 'LANGUAGE <EMAIL@ADDRESS>'
}
},
frontend: {
dist: {
options: {
potFilename: 'woocommerce.pot',
exclude: [
'includes/admin/.*',
'apigen/.*',
'tests/.*',
'tmp/.*'
],
processPot: function ( pot ) {
pot.headers['project-id-version'] += ' Frontend';
return pot;
}
}
},
admin: {
options: {
potFilename: 'woocommerce-admin.pot',
include: [
'includes/admin/.*'
],
processPot: function ( pot ) {
pot.headers['project-id-version'] += ' Admin';
return pot;
}
]
}
}
},

File diff suppressed because one or more lines are too long

View File

@ -184,6 +184,26 @@ mark.amount {
}
}
/**
* Help Tip
*/
.woocommerce-help-tip {
color: #666;
display: inline-block;
font-size: 13px;
font-style: normal;
height: 16px;
line-height: 16px;
position: relative;
vertical-align: middle;
width: 16px;
&:after {
@include icon( "\e018" );
cursor: help;
}
}
table.wc_status_table {
margin-bottom: 1em;
@ -1683,11 +1703,11 @@ table.wp-list-table {
td.column-thumb img {
margin: 0;
vertical-align: middle;
width: auto;
height: auto;
max-width: 40px;
max-height: 40px;
vertical-align: middle;
}
span.na {
@ -1842,6 +1862,14 @@ a.import_rates {
margin-bottom: 0;
}
#rates-search {
float: right;
input.wc-tax-rates-search-field {
padding: 4px 8px;
font-size: 1.2em;
}
}
table.wc_tax_rates,
table.wc_input_table {
width: 100%;
@ -1897,31 +1925,36 @@ table.wc_input_table {
th.sort {
width: 17px;
padding: 0;
padding: 0 4px;
}
td.sort {
padding: 0 4px;
cursor: move;
background: #f9f9f9;
text-align: center;
vertical-align: middle;
}
&:before {
content: "\e032";
font-family: 'WooCommerce';
.ui-sortable:not(.ui-sortable-disabled) {
td.sort {
cursor: move;
background: #f9f9f9;
text-align: center;
line-height: 1;
color: #999;
display: block;
width: 17px;
float: left;
height: 100%;
}
vertical-align: middle;
&:hover {
&:before {
color: #333;
content: "\e032";
font-family: 'WooCommerce';
text-align: center;
line-height: 1;
color: #999;
display: block;
width: 17px;
float: left;
height: 100%;
}
&:hover {
&:before {
color: #333;
}
}
}
}
@ -2038,12 +2071,16 @@ table.wc_shipping {
}
img.help_tip {
vertical-align: middle;
margin: 0 0 0 9px;
vertical-align: middle;
}
.postbox img.help_tip {
margin-top: -4px;
margin-top: 0px;
}
.postbox .woocommerce-help-tip {
margin: 0 0 0 9px;
}
.status-enabled,
@ -2118,7 +2155,8 @@ img.help_tip {
width: 100%;
}
img.help_tip {
img.help_tip,
.woocommerce-help-tip {
padding: 0;
margin: -4px 0 0 5px;
vertical-align: middle;
@ -2145,15 +2183,21 @@ img.help_tip {
padding-right: inherit;
}
th img.help_tip {
th img.help_tip,
th .woocommerce-help-tip {
margin: 0 -24px 0 0;
float: right;
}
.wp-list-table .woocommerce-help-tip {
float: none;
}
fieldset {
margin-top: 4px;
img.help_tip {
img.help_tip,
.woocommerce-help-tip {
margin: -3px 0 0 5px;
}
@ -2606,15 +2650,15 @@ img.help_tip {
#woocommerce-order-downloads,
#woocommerce-coupon-data {
.inside {
padding: 0;
margin: 0;
padding: 0;
}
}
.woocommerce_options_panel,
.panel {
padding: 9px 9px 9px 9px;
color: #555;
padding: 9px;
color: #555;
}
.woocommerce_page_settings .woocommerce_options_panel,
@ -2624,8 +2668,8 @@ img.help_tip {
#woocommerce-product-type-options .panel,
#woocommerce-product-specs .inside {
padding: 9px;
margin: 0;
padding: 9px;
}
.woocommerce_options_panel p,
@ -2648,8 +2692,8 @@ img.help_tip {
.woocommerce_options_panel .checkbox,
.woocommerce_variable_attributes .checkbox {
width: auto;
margin: 3px 0;
vertical-align: middle;
margin: 7px 0;
}
.woocommerce_variations,
@ -2771,6 +2815,7 @@ img.help_tip {
}
.woocommerce_options_panel {
min-height: 175px;
box-sizing: border-box;
.downloadable_files {
@ -2787,7 +2832,7 @@ img.help_tip {
}
p {
margin: 9px 0 9px;
margin: 9px 0;
}
p.form-field,
@ -2838,9 +2883,9 @@ img.help_tip {
}
textarea {
vertical-align: top;
height: 3.5em;
line-height: 1.5em;
vertical-align: top;
}
input[type="text"],
@ -2874,48 +2919,48 @@ img.help_tip {
.options_group {
border-top: 1px solid white;
border-bottom: 1px solid #eee;
}
.options_group:first-child {
border-top: 0;
}
.options_group:last-child {
border-bottom: 0;
}
.options_group fieldset {
margin: 9px 0;
font-size: 12px;
padding: 5px 9px;
line-height: 24px;
label {
width: auto;
float: none;
&:first-child {
border-top: 0;
}
ul {
float: left;
width: 50%;
margin: 0;
padding: 0;
&:last-child {
border-bottom: 0;
}
li {
margin: 0;
fieldset {
margin: 9px 0;
font-size: 12px;
padding: 5px 9px;
line-height: 24px;
label {
width: auto;
float: none;
}
input {
ul {
float: left;
width: 50%;
margin: 0;
padding: 0;
li {
margin: 0;
width: auto;
float: none;
margin-right: 4px;
input {
width: auto;
float: none;
margin-right: 4px;
}
}
}
}
ul.wc-radios {
label {
margin-left: 0;
ul.wc-radios {
label {
margin-left: 0;
}
}
}
}

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

@ -274,7 +274,7 @@ body {
}
}
}
.woocommerce-tracker, .woocommerce-language-pack, .updated {
.woocommerce-tracker, .updated {
padding: 24px 24px 0;
margin: 0 0 24px 0;
overflow: hidden;

File diff suppressed because one or more lines are too long

View File

@ -147,7 +147,7 @@ p.demo_store {
margin-top: 10px;
}
.woocommerce-breadcrumb{
.woocommerce-breadcrumb {
@include clearfix();
margin: 0 0 1em;
padding: 0;
@ -913,102 +913,56 @@ p.demo_store {
}
p.stars {
position: relative;
font-size: 1em;
a {
display: inline-block;
font-weight: 700;
margin-right: 1em;
text-indent: -9999px;
position: relative;
border-bottom: 0 !important;
outline: 0;
height: 1em;
width: 1em;
text-indent: -999em;
display: inline-block;
text-decoration: none;
&:last-child {
border-right: 0;
&:before {
display: block;
position: absolute;
top: 0;
left: 0;
width: 1em;
height: 1em;
line-height: 1;
font-family: "WooCommerce";
content: "\e021";
text-indent: 0;
}
&.star-1,
&.star-2,
&.star-3,
&.star-4,
&.star-5 {
border-right: 1px solid #ccc;
&:after {
font-family: "WooCommerce";
text-indent: 0;
position: absolute;
top: 0;
left: 0;
}
}
&.star-1 {
width: 2em;
&:after {
&:hover {
~ a:before {
content: "\e021";
}
}
}
&:hover:after,
&.active:after {
content: "\e020"
&:hover {
a {
&:before {
content: "\e020";
}
}
}
&.selected {
a.active {
&:before {
content: "\e020";
}
~ a:before {
content: "\e021";
}
}
&.star-2 {
width: 3em;
&:after {
content: "\e021\e021";
}
&:hover:after,
&.active:after {
content: "\e020\e020"
}
}
&.star-3 {
width: 4em;
&:after {
content: "\e021\e021\e021";
}
&:hover:after,
&.active:after {
content: "\e020\e020\e020"
}
}
&.star-4 {
width: 5em;
&:after {
content: "\e021\e021\e021\e021";
}
&:hover:after,
&.active:after {
content: "\e020\e020\e020\e020"
}
}
&.star-5 {
width: 6em;
border: 0;
&:after {
content: "\e021\e021\e021\e021\e021";
}
&:hover:after,
&.active:after {
content: "\e020\e020\e020\e020\e020"
a:not(.active) {
&:before {
content: "\e020";
}
}
}
@ -1925,6 +1879,42 @@ p.demo_store {
}
}
/**
* Password strength meter
*/
.woocommerce-password-strength {
text-align: center;
font-weight: 600;
padding: 3px 0px 3px 0px;
&.strong {
background-color: #c1e1b9;
border-color: #83c373;
}
&.short {
background-color: #f1adad;
border-color: #e35b5b;
}
&.bad {
background-color: #fbc5a9;
border-color: #f78b53;
}
&.good {
background-color: #ffe399;
border-color: #ffc733;
}
}
/* added to get around variation image flicker issue */
.product.has-default-attributes {
> .images {
opacity: 0;
}
}
/**
* Twenty Eleven specific styles
*/

BIN
assets/fonts/WooCommerce.eot Normal file → Executable file

Binary file not shown.

140
assets/fonts/WooCommerce.svg Normal file → Executable file
View File

@ -3,6 +3,7 @@
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
<json>
<![CDATA[
{
"fontFamily": "WooCommerce",
"fontURL": "http://woothemes.com",
@ -10,7 +11,7 @@
"designerURL": "http://jameskoster.co.uk",
"license": "SIL OFL",
"licenseURL": "http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL",
"version": "Version 1.0.3",
"version": "Version 1.0",
"majorVersion": 0,
"fontId": "WooCommerce",
"psName": "WooCommerce",
@ -18,78 +19,79 @@
"fullName": "WooCommerce",
"description": "Font generated by IcoMoon."
}
]]>
</json>
</metadata>
<defs>
<font id="WooCommerce" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" d="" horiz-adv-x="512" />
<glyph unicode="&#xe000;" d="M307.2 780.752v-153.6h51.248v153.6h-51.248zM230.4 780.752v-153.6h25.648v153.6h-25.648zM435.2 780.752v-153.6h128.048v153.6h-128.048zM179.2 780.752v-153.6h25.648v153.6h-25.648zM819.152 780.752v-153.6h25.648v153.6h-25.648zM742.384 780.752v-153.6h25.6v153.6h-25.6zM614.4 780.752v-153.6h51.152v153.6h-51.152zM947.136 883.152v-358.352h-870.336v358.352h870.336zM971.312 960h-895.888c-17.104 0-42.656-5.728-55.472-18.512-12.784-14.208-19.904-24.208-19.904-41.2v-382.56c0-17.088 7.12-37.040 19.904-51.248 12.832-12.784 38.384-18.464 55.456-18.464h895.904c17.088 0 21.392 5.696 34.16 18.464 12.784 14.208 18.464 34.16 18.464 51.248l0.016 382.56c0 16.992-5.696 32.672-18.464 45.456s-17.088 14.256-34.176 14.256zM308.624 122.336c0-9.952 5.728-18.464 14.256-25.6-31.28-11.344-54.064-41.2-54.064-78.224 0-45.456 35.552-82.496 81.104-82.496h375.344c45.552 0 81.104 37.040 81.104 82.496 0 37.040-22.768 68.272-55.456 78.224 9.904 10 15.648 19.904 15.648 32.672 0 91.008-72.496 164.976-162.128 164.976-52.592 0-101.024-27.040-129.424-68.224-15.6 8.512-32.672 12.784-51.152 12.784-64.016 0-115.232-52.592-115.232-116.608z" />
<glyph unicode="&#xe001;" d="M547.504-49.936l143.696 160.688c22.768 18.464 22.768 36.992 0 55.504h-102.4v143.6c0 15.648-15.648 35.552-36.944 35.552h-79.664c-21.344 0-36.992-14.16-36.992-31.28v-147.856h-85.264c-21.392-18.512-35.552-37.040-12.864-55.504l143.696-160.688c21.28-18.496 45.44-18.496 66.736-0.016zM307.2 780.56v-153.6h51.248v153.6h-51.248zM230.4 780.56v-153.6h25.648v153.6h-25.648zM435.2 780.56v-153.6h128.048v153.6h-128.048zM179.2 780.56v-153.6h25.648v153.6h-25.648zM819.152 780.56v-153.6h25.648v153.6h-25.648zM742.384 780.56v-153.6h25.6v153.6h-25.6zM614.4 780.56v-153.6h51.152v153.6h-51.152zM947.136 882.96v-358.352l-870.336-0.016v358.368h870.336zM971.312 959.792h-895.888c-17.088 0-42.624-5.728-55.456-18.512-12.8-14.208-19.92-24.208-19.92-41.2v-382.56c0-17.088 7.12-37.040 19.904-51.248 12.832-12.784 38.384-18.464 55.456-18.464h895.904c17.088 0 21.392 5.696 34.16 18.464 12.784 14.208 18.464 34.16 18.464 51.248l0.016 382.56c0 16.992-5.696 32.672-18.464 45.456s-17.088 14.256-34.176 14.256z" />
<glyph unicode="&#xe002;" d="M307.2 780.752v-153.6h51.248v153.6h-51.248zM230.4 780.752v-153.6h25.648v153.6h-25.648zM435.2 780.752v-153.6h128.048v153.6h-128.048zM179.2 780.752v-153.6h25.648v153.6h-25.648zM819.152 780.752v-153.6h25.648v153.6h-25.648zM742.384 780.752v-153.6h25.6v153.6h-25.6zM614.4 780.752v-153.6h51.152v153.6h-51.152zM947.136 883.152v-358.352h-870.336v358.352h870.336zM971.312 960h-895.888c-17.104 0-42.656-5.728-55.472-18.512-12.784-14.208-19.904-24.208-19.904-41.2v-382.56c0-17.088 7.12-37.040 19.904-51.248 12.832-12.784 38.384-18.464 55.456-18.464h410.992v-76.8h-358.352v-128l-52.624-0.016c-17.088 0-42.624-5.648-55.456-18.432-12.8-14.256-19.92-24.24-19.92-41.296v-177.76c0-17.040 7.12-36.992 19.904-51.2 12.832-12.784 38.384-18.512 55.456-18.512h179.152c17.088 0 21.392 5.728 34.16 18.512 12.784 14.208 18.464 34.16 18.464 51.2v177.76c0 17.040-5.696 32.72-18.464 45.504s-17.088 14.208-34.16 14.208h-75.376l0.016 76.864h307.2v-76.848h-52.592c-17.136 0-42.672-5.648-55.504-18.432-12.784-14.256-19.856-24.256-19.856-41.296v-177.76c0-17.040 7.072-36.992 19.856-51.2 12.832-12.784 38.384-18.512 55.504-18.512h179.152c17.040 0 21.392 5.728 34.16 18.512 12.784 14.208 18.432 34.16 18.432 51.2v177.76c0 17.040-5.648 32.72-18.432 45.504s-17.136 14.208-34.16 14.208h-75.376v76.864h307.2v-76.848h-52.624c-17.088 0-42.624-5.648-55.504-18.432-12.784-14.256-19.904-24.256-19.904-41.296v-177.76c0-17.040 7.12-36.992 19.904-51.2 12.864-12.784 38.432-18.512 55.504-18.512h179.152c17.088 0 21.392 5.728 34.16 18.512 12.784 14.208 18.464 34.16 18.464 51.2v177.76c0 17.040-5.696 32.72-18.464 45.504s-17.088 14.208-34.16 14.208h-75.328v128l-358.384 0.032v76.8h433.712c17.088 0 21.392 5.696 34.16 18.464 12.784 14.208 18.464 34.16 18.464 51.248l0.016 382.56c0 16.992-5.696 32.672-18.464 45.456s-17.088 14.256-34.176 14.256zM256.048 192.048v-204.848h-204.8v204.848h204.8zM972.752 192.048v-204.848h-204.752v204.848h204.752zM614.4 192.048v-204.848h-204.752v204.848h204.752z" />
<glyph unicode="&#xe003;" d="M307.2 729.552v-409.504h51.248l-0.016 409.504h-51.232zM230.4 729.552v-409.504h25.648v409.504h-25.648zM563.248 729.552v-409.504h51.152v409.504h-51.152zM179.2 729.552v-409.504h25.648v409.504h-25.648zM665.552 729.552v-409.504h25.648v409.504h-25.648zM486.4 729.552v-409.504h25.552v409.504h-25.552zM435.2 729.552v-409.504h25.6v409.504h-25.6zM793.552 832v-614.4h-716.752v614.4h716.752zM817.76 908.8h-742.336c-17.088 0-42.624-5.696-55.456-18.512-12.8-14.256-19.92-24.16-19.92-41.296v-638.464c0-17.088 7.12-37.040 19.904-51.2 12.832-12.832 38.384-18.512 55.456-18.512h742.336c17.040 0 21.344 5.696 34.112 18.512 12.784 14.16 18.464 34.112 18.464 51.2l0.032 638.464c0 17.136-5.696 32.72-18.464 45.552-12.784 12.768-17.088 14.256-34.128 14.256zM230.4 64h-76.8v-7.072c0-17.088 7.168-36.944 19.952-51.2 12.784-12.832 38.384-18.512 55.456-18.512h742.304c17.088 0 21.392 5.696 34.16 18.512 12.784 14.256 18.464 34.112 18.464 51.2l0.032 638.56c0 17.040-5.696 32.672-18.464 45.456s-17.088 14.256-34.16 14.256h-24.16v-691.2h-716.784z" />
<glyph unicode="&#xe004;" d="M511.984-63.952c282.992 0 512 228.96 512 511.904 0 283.024-229.008 512-512 512-283.024 0-511.952-228.96-511.952-512 0-282.944 228.912-511.904 511.952-511.904zM511.984 0.032c-247.472 0-447.936 200.528-447.936 447.936 0 247.472 200.448 448.032 447.936 448.032 247.424 0 447.984-200.528 447.984-448.032-0.016-247.408-200.544-447.936-447.984-447.936zM322.096 437.44v-51.2h82.496l-89.536-96.704c-11.392-11.392-10-34.112 2.832-48.336 12.784-12.832 29.872-14.208 42.624-2.832l89.584 96.656v-76.752h51.248v179.168h-179.248zM706.144 463.088v51.152h-86.752l89.584 95.264c11.392 11.392 9.952 31.328-2.832 45.504-12.864 12.832-28.528 14.208-39.904 1.44l-88.096-93.872 0.016 79.664h-51.248v-179.152h179.232z" />
<glyph unicode="&#xe005;" d="M524.768 639.984v-51.2h82.496l-236.080-233.232v79.616h-51.152v-179.152h179.152v51.2h-86.72l240.304 230.416v-76.8h51.248v179.152h-179.248zM511.984-63.952c282.992 0 512 228.96 512 511.904 0 283.024-229.008 512-512 512-283.024 0-511.952-228.96-511.952-512 0-282.944 228.912-511.904 511.952-511.904zM511.984 0.032c-247.472 0-447.936 200.528-447.936 447.936 0 247.472 200.448 448.032 447.936 448.032 247.424 0 447.984-200.528 447.984-448.032-0.016-247.408-200.544-447.936-447.984-447.936z" />
<glyph unicode="&#xe006;" d="M947.136 806.4h-870.288v-716.8h870.304l-0.016 716.8zM971.312 883.152c17.136 0 21.344-1.44 34.16-14.208 12.784-12.784 18.512-28.48 18.512-45.504v-740.88c0-17.136-5.728-37.040-18.512-51.296-12.832-12.784-17.040-18.432-34.16-18.432l-895.856 0.032c-17.136 0-42.72 5.648-55.504 18.432-12.784 14.256-19.952 34.16-19.952 51.296l-0.016 740.832c0 17.040 7.168 27.040 19.952 41.296 12.784 12.784 38.384 18.432 55.504 18.432l895.872-0.016zM307.2 703.952h51.184v-511.888h-51.184zM230.448 703.952h25.6v-511.888h-25.6zM716.8 703.952h51.136v-511.888h-51.136zM435.2 703.952h76.8v-511.888h-76.8zM179.248 703.952h25.552v-511.888h-25.552zM819.2 703.952h25.552v-511.888h-25.552zM639.952 703.952h25.648v-511.888h-25.648zM588.8 703.952h25.6v-511.888h-25.6z" />
<glyph unicode="&#xe007;" d="M268.88 486.464v-76.848h204.752v-204.752h76.848l-0.016 204.768h204.752v76.848l-204.752-0.016v204.752h-76.848v-204.752h-204.736zM0.048 448.048c0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904-283.040 0-512-228.96-512-511.904zM64.032 448.048c0 247.392 200.528 447.936 448.032 447.936 247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.504 0.016-448.032 200.544-448.032 448.032z" />
<glyph unicode="&#xe008;" d="M551.856 243.168l136.48 140.816 34.16 35.552 17.040 18.512-179.152 189.152-51.2-52.688 82.496-88.144h-246.016c-28.48 0-51.248-22.72-51.248-51.2s22.768-51.2 51.248-51.2h243.184l-86.8-89.632 49.808-51.168zM512.048-63.952c282.944 0 511.904 228.96 511.904 511.904 0 283.024-228.96 512-511.904 512-283.040 0-512-228.96-512-511.984 0-282.96 228.96-511.92 512-511.92zM512.048 0.032c-247.472 0-448.032 200.528-448.032 447.936 0 247.472 200.528 448.032 448.032 448.032 247.392 0 447.936-200.528 447.936-448.032-0.016-247.408-200.544-447.936-447.936-447.936z" />
<glyph unicode="&#xe009;" d="M716.848 487.808l-140.816 136.528-35.552 34.064-18.512 17.136-189.168-179.168 52.688-51.296 88.144 82.496v-246c0-28.432 22.72-51.2 51.2-51.2s51.2 22.768 51.2 51.2v243.184l89.632-86.704 51.184 49.76zM1023.952 447.968c0 283.024-228.96 512-511.904 512-283.040-0.016-512-228.976-512-512 0-282.944 228.96-511.904 512-511.904 282.944-0.016 511.904 228.944 511.904 511.904zM959.968 447.968c0-247.392-200.528-447.936-447.936-447.936-247.472 0-448.032 200.528-448.032 447.936 0 247.472 200.528 448.032 448.032 448.032 247.408-0.032 447.936-200.56 447.936-448.032z" />
<glyph unicode="&#xe00a;" d="M307.168 408.192l140.816-136.528 35.552-34.064 18.512-17.136 189.152 179.168-52.688 51.296-88.144-82.496v246c0 28.432-22.72 51.2-51.2 51.2s-51.2-22.768-51.2-51.2v-243.184l-89.632 86.704-51.168-49.76zM0.048 448.048c0-283.024 228.96-512 511.904-512 283.024 0 512 228.96 512 512 0 282.944-228.96 511.904-512 511.904-282.944 0-511.904-228.96-511.904-511.904zM64.032 448.048c0 247.392 200.528 447.936 447.936 447.936 247.472 0 448.032-200.528 448.032-447.936 0-247.472-200.528-448.032-448.032-448.032-247.408 0.016-447.936 200.544-447.936 448.032z" />
<glyph unicode="&#xe00b;" d="M472.192 652.848l-136.528-140.816-34.064-35.552-17.136-18.512 179.152-189.152 51.296 52.688-82.496 88.144h246c28.432 0 51.2 22.72 51.2 51.2s-22.768 51.2-51.2 51.2h-243.184l86.704 89.632-49.744 51.168zM512.048 959.952c-283.040 0-512-228.96-512-511.904 0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904zM512.048 895.968c247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.472 0-448.032 200.528-448.032 448.032 0.016 247.408 200.544 447.936 448.032 447.936z" />
<glyph unicode="&#xe00c;" d="M844.736 115.2l-255.904 255.952-179.248-179.152-76.752 76.8-153.6-153.6 665.504-0.016zM281.632 473.6c0-42.672 34.16-76.848 76.752-76.848 42.72 0 76.848 34.16 76.848 76.848 0 42.592-34.112 76.752-76.848 76.752-42.592 0-76.752-34.16-76.752-76.752zM947.168 703.952v-691.152l-870.336 0.016v691.152l870.336-0.016zM1023.984 959.952h-1023.952v-1023.904h948.528c24.208 0 34.16 8.464 49.76 24.16 17.136 15.648 25.648 38.432 25.648 61.104v938.64z" />
<glyph unicode="&#xe00d;" d="M752.352 878.896c-52.688 51.2-137.952 51.2-190.544-1.392l-479.312-479.312c-52.576-52.592-52.576-137.856-1.392-190.544l17.040-17.040 66.832 68.224-44.064 44.064 536.16 536.192 44.064-44.064 68.224 66.832-17.008 17.040zM254.608 34.144l17.040-17.040c52.688-51.2 137.952-51.2 190.544 1.392l479.312 479.312c52.592 52.592 52.592 137.872 1.392 190.544l-17.040 17.040-66.832-68.224 44.064-44.064-536.16-536.176-44.064 44.064-68.256-66.848zM992.656 950c-12.784 12.832-32.72 12.832-45.504 1.44l-312.848-312.896c-11.392-12.784-11.392-32.672 0-45.456l22.768-22.768c12.784-11.392 32.672-11.392 45.456 0l312.912 312.832c11.392 12.784 11.392 32.72-1.44 45.504l-21.344 21.344zM366.928 325.696c-12.784 11.392-32.672 11.392-45.456 0l-312.912-312.832c-11.392-12.784-11.392-32.72 1.44-45.504l21.344-21.344c12.784-12.832 32.72-12.832 45.504-1.44l312.848 312.896c11.392 12.784 11.392 32.672 0 45.456l-22.768 22.768z" />
<glyph unicode="&#xe00e;" d="M358.384 524.8l-76.752-76.8h76.752v-230.4l-76.752 0.016v-51.152h204.752v51.152h-76.8l-0.016 307.184h-51.184zM588.832 524.8c-28.528 0-51.2-22.768-51.2-51.152v-256.048c0-28.384 22.688-51.152 51.2-51.152h102.4c28.432 0 51.2 22.768 51.2 51.152l-0.016 256.048c0 28.384-22.768 51.152-51.2 51.152h-102.384zM588.832 473.648h102.4v-256.048h-102.4v256.048zM947.168 678.4v-665.552l-870.336 0.016v665.552l870.336-0.016zM1023.984 960h-1023.952v-1024h948.528c24.208 0 34.16 8.56 49.76 24.16 17.136 15.744 25.648 38.432 25.648 61.2v938.64zM755.2 857.568c21.296 0 38.384-17.088 38.384-38.384 0-21.344-17.088-38.432-38.384-38.432-21.344 0-38.432 17.088-38.432 38.432 0.016 21.296 17.088 38.384 38.432 38.384zM243.216 857.568c21.392 0 38.432-17.088 38.432-38.384 0-21.344-17.040-38.432-38.432-38.432-21.296 0-38.432 17.088-38.432 38.432 0 21.296 17.136 38.384 38.432 38.384z" />
<glyph unicode="&#xe00f;" d="M0.080 448c0-49.808 39.776-89.584 91.008-89.584 49.712 0 89.584 39.776 89.584 89.584s-39.856 89.584-89.584 89.584c-51.232 0-91.008-39.776-91.008-89.584zM420.976 448c0-49.808 41.296-89.584 91.056-89.584 49.712 0 90.96 39.776 90.96 89.584s-41.248 89.584-90.96 89.584c-49.76 0-91.056-39.776-91.056-89.584zM843.344 448c0-49.808 39.824-89.584 89.632-89.584 51.2 0 90.96 39.776 90.96 89.584s-39.776 89.584-90.96 89.584c-49.808 0-89.632-39.776-89.632-89.584z" />
<glyph unicode="&#xe010;" d="M305.824 428.8c0-108.096 92.448-196.24 206.144-196.24 113.84 0 206.288 88.144 206.288 196.24 0 46.944-18.512 91.056-49.808 125.136 204.8-46.944 355.536-172.080 355.536-172.080v91.056c0 0-230.4 190.544-509.136 190.544-277.328-0.016-514.8-190.544-514.8-190.544v-91.056c0 0 150.736 120.864 352.704 170.688-28.464-34.176-46.928-76.8-46.928-123.744z" />
<glyph unicode="&#xe011;" d="M294.432 448.048c0-21.392 17.088-38.432 38.384-38.432 21.344 0 38.432 17.040 38.432 38.432 0 21.296-17.088 38.432-38.432 38.432-21.312-0.016-38.384-17.136-38.384-38.432zM473.632 448.048c0-21.392 17.040-38.432 38.432-38.432 21.296 0 38.432 17.040 38.432 38.432 0 21.296-17.136 38.432-38.432 38.432-21.408-0.016-38.432-17.136-38.432-38.432zM652.784 448.048c0-21.392 17.136-38.432 38.432-38.432s38.432 17.040 38.432 38.432c0 21.296-17.136 38.432-38.432 38.432s-38.432-17.136-38.432-38.432zM0.048 448.048c0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904-283.040 0-512-228.96-512-511.904zM64.032 448.048c0 247.392 200.528 447.936 448.032 447.936 247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.504 0.016-448.032 200.544-448.032 448.032z" />
<glyph unicode="&#xe012;" d="M473.632 716.768v-332.752h281.6v76.8h-204.768v255.952h-76.832zM0.048 448.048c0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904-283.040 0-512-228.96-512-511.904zM64.032 448.048c0 247.392 200.528 447.936 448.032 447.936 247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.504 0.016-448.032 200.544-448.032 448.032z" />
<glyph unicode="&#xe013;" d="M369.728 658.048l-53.984-53.984 142.208-145.088-143.6-146.48 53.984-55.456 143.6 146.48 143.696-146.48 54.032 55.456-143.6 146.48 142.208 145.088-54.112 53.984-142.208-145.040-142.224 145.040zM156.416 820.208c-199.040-199.104-203.312-524.736-5.632-729.536 199.152-206.24 523.344-206.24 722.448 0 197.664 204.8 193.408 530.432-5.76 729.536-197.568 197.712-513.328 197.712-711.056 0zM200.528 776.096c172.080 172.128 450.8 172.128 622.864 0 173.504-174.896 176.368-460.704 4.304-638.464-173.552-179.248-457.968-179.248-631.392 0-172.096 177.76-169.216 463.568 4.224 638.464z" />
<glyph unicode="&#xe014;" d="M601.616 439.536l154.992 93.792-154.992 95.36v-65.472l-332.736 0.016v-169.248l51.152 46.944v71.104h281.6l-0.016-72.496zM448.032 435.184l-154.992-95.264 154.992-95.264v62.592h332.752v173.504l-51.152-48.384v-73.936l-281.6-0.016v76.768zM0.048 448.048c0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904-283.040 0-512-228.96-512-511.904zM64.032 448.048c0 247.392 200.528 447.936 448.032 447.936 247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.504 0.016-448.032 200.544-448.032 448.032z" />
<glyph unicode="&#xe015;" d="M281.6 459.44l140.768-136.576 35.552-34.112 18.464-17.088 291.552 281.552-52.592 51.2-240.32-231.776-142.208 136.528-51.216-49.728zM0.048 448.048c0-283.024 228.96-512 511.904-512 283.024 0 512 228.96 512 512 0 282.944-228.96 511.904-512 511.904-282.944 0-511.904-228.96-511.904-511.904zM64.032 448.048c0 247.392 200.528 447.936 447.936 447.936 247.472 0 448.032-200.528 448.032-447.936 0-247.472-200.528-448.032-448.032-448.032-247.408 0.016-447.936 200.544-447.936 448.032z" />
<glyph unicode="&#xe016;" d="M478.752 691.216v-358.352h76.848l-0.016 358.352h-76.832zM478.752 281.664v-76.8h76.848v76.8h-76.848zM5.264 448.048c0-283.024 228.96-512 511.904-512 283.024 0 512 228.96 512 512 0 282.944-228.96 511.904-512 511.904-282.944 0-511.904-228.96-511.904-511.904zM69.248 448.048c0 247.392 200.528 447.936 447.936 447.936 247.472 0 448.032-200.528 448.032-447.936 0-247.472-200.528-448.032-448.032-448.032-247.408 0.016-447.936 200.544-447.936 448.032z" />
<glyph unicode="&#xe017;" d="M0.032 418.192l294.384-290.112 35.552-34.176 18.512-17.088 675.504 665.6-78.224 76.768-598.768-590.144-270.16 264.512z" />
<glyph unicode="&#xe018;" d="M550.384 348.432c91.056 15.648 140.768 76.848 140.768 176.32 0 113.84-65.472 179.2-179.152 179.2-109.536 0-172.128-59.712-179.248-166.368h51.264c7.072 78.224 46.944 115.168 128 115.168 85.312 0 127.952-42.672 127.952-128 0-71.104-28.432-110.88-89.584-123.744v8.512l-76.8-25.552v-76.752h76.8l0.016 41.216zM473.6 256.016v-76.8h76.8v76.8h-76.8zM0.016 447.968c0-282.944 228.96-511.904 512-511.904 282.944 0 511.952 228.96 511.952 511.904 0 283.024-229.008 511.984-511.952 511.984-283.040 0-512-228.96-512-511.984zM64.048 447.968c0 247.472 200.48 448 447.968 448 247.392 0 447.936-200.528 447.936-448.032 0-247.392-200.528-447.936-447.936-447.936-247.488 0.032-447.968 200.56-447.968 447.968z" />
<glyph unicode="&#xe019;" d="M664.16 192.048c8.56 0 14.256 1.392 19.904 5.696-9.952 2.784-18.512 7.072-24.16 12.784-12.784 14.256-19.904 34.064-19.904 51.2v510.512c0 17.040 7.12 27.040 19.904 41.2 12.832 12.864 38.384 18.56 55.456 18.56h1.392l0.016 68.288c0 16.992-5.648 32.672-18.464 45.456-12.8 12.768-17.104 14.256-34.144 14.256h-588.736c-17.104 0-42.656-5.728-55.472-18.512-12.784-14.208-19.904-24.208-19.904-41.2v-638.56c0-17.136 7.12-36.944 19.904-51.2 12.832-12.784 38.384-18.464 55.456-18.464h588.752zM716.752 268.848v486.352l230.4-51.248-0.016-435.104h-230.384zM971.312 780.752l-254.56 51.248h-1.376c-17.088 0-42.624-5.696-55.456-18.56-12.784-14.16-19.904-24.16-19.904-41.2v-510.528c0-17.136 7.12-36.944 19.904-51.2 5.648-5.696 14.208-10 24.16-12.784 10-4.304 21.392-5.696 31.28-5.696h255.952c17.088 0 21.392 5.696 34.16 18.464 12.784 14.256 18.464 34.064 18.464 51.2v459.344c0 17.088-5.696 32.672-18.464 45.552-12.768 12.768-17.072 14.16-34.16 14.16zM76.8 25.632c0-49.712 39.856-89.632 89.632-89.632 49.808 0 89.632 39.904 89.632 89.632 0 49.76-39.824 89.632-89.632 89.632-49.776-0.016-89.632-39.872-89.632-89.632zM768 25.632c0-49.712 39.776-89.632 89.584-89.632s89.584 39.904 89.584 89.632c0 49.76-39.776 89.632-89.584 89.632s-89.584-39.872-89.584-89.632z" />
<glyph unicode="&#xe01a;" d="M640 883.152v-110.928c0 17.040 7.12 27.040 19.904 41.2 12.832 12.864 38.384 18.56 55.456 18.56h1.392l0.016 68.304c0 16.992-5.648 32.672-18.464 45.456-12.8 12.768-17.104 14.256-34.144 14.256h-588.736c-17.104 0-42.656-5.728-55.472-18.512-12.784-14.208-19.904-24.208-19.904-41.2v-638.56c0-17.136 7.12-36.944 19.904-51.2 12.832-12.784 38.384-18.464 55.456-18.464h588.752c8.56 0 14.256 1.392 19.904 5.696 10-4.304 21.392-5.696 31.28-5.696h255.952c17.088 0 21.392 5.696 34.16 18.464 12.784 14.256 18.464 34.064 18.464 51.2l0.032 459.312c0 17.088-5.696 32.672-18.464 45.552-12.784 12.784-17.088 14.16-34.16 14.16l-254.56 51.248h-1.392c-17.088 0-42.624-5.696-55.456-18.56-12.784-14.16-19.904-24.16-19.904-41.2l-0.016-503.392h-563.2v614.304h563.2zM716.752 268.848v486.352l230.4-51.248-0.016-435.104h-230.384zM76.8 25.632c0-49.712 39.856-89.632 89.632-89.632 49.808 0 89.632 39.904 89.632 89.632 0 49.76-39.824 89.632-89.632 89.632-49.776-0.016-89.632-39.872-89.632-89.632zM768 25.632c0-49.712 39.776-89.632 89.584-89.632s89.584 39.904 89.584 89.632c0 49.76-39.776 89.632-89.584 89.632s-89.584-39.872-89.584-89.632z" />
<glyph unicode="&#xe01b;" d="M568.896 819.232h-18.432v-81.056c11.296-12.832 16.992 5.696 25.552-15.696v-49.712c0-7.12 10-11.392 14.208-11.392 25.6 0 91.056 68.224 113.744 85.264-44.016 39.856-90.96 58.32-135.072 72.592zM473.632 819.232h-24.16c-76.752-17.136-163.6-54.064-231.84-160.736v-7.12c4.304 2.88 14.256 5.696 17.088 5.696 7.072 0 7.072-2.832 8.56-5.696v-55.408c0-12.832 34.064-103.824 49.76-108.096 8.56-2.88 17.088 1.44 22.72-4.272 17.040-19.904 22.768-49.808 36.992-68.224 21.344-28.528 54.032-59.808 82.496-71.104 9.952-7.168 29.872 4.224 38.384-11.392v-89.632c0-18.512 34.112 4.272 34.112-29.904v-9.904c-4.224-18.512-25.552 2.832-34.112-18.512v-150.736c4.272-8.512 24.16-8.512 34.112-8.512 0 0 39.856-2.88 39.856 14.208 0 19.952-22.768 11.392-28.48 12.784 22.768 26.992 44.112 56.896 69.712 81.104 36.944 34.112 46.896 72.496 61.104 100.976 5.696 12.784 14.208 32.672 14.208 36.944 0 29.872-115.168 83.888-122.256 86.752h-78.272c-24.16 11.392-51.152 36.992-66.768 63.984v56.896l5.648 7.168h39.824l5.696-7.168v-55.408c1.44-4.304 14.208-11.392 18.464-11.392 5.696 0 2.88 7.072 7.12 11.392v99.488c0 15.6 35.552 36.992 39.824 39.824h55.472c4.272 0 21.344 4.272 21.344 14.16 0 21.392-29.872-5.648-39.776 5.728v54.064c0 21.296-28.528 14.16-34.16 17.040 14.208 25.6 28.432 36.992 28.432 54.064 0 7.072-2.832 9.904-5.648 11.296-10 2.88-22.768 0-31.328 7.168-9.952 7.072-32.72 18.464-34.112 35.552v56.928zM0.048 448.048c0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904-283.040 0-512-228.96-512-511.904zM64.032 448.048c0 247.392 200.528 447.936 448.032 447.936 247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.504 0.016-448.032 200.544-448.032 448.032z" />
<glyph unicode="&#xe01c;" d="M0.048 338.48c14.16-63.984 39.824-125.088 75.376-179.152 41.248 14.16 88.192 5.648 120.912-27.040 32.672-32.72 41.2-79.616 26.992-120.816 54.032-35.552 115.216-61.2 179.152-75.456 17.088 44.112 59.76 75.456 109.488 75.456 49.808 0 92.496-31.328 109.536-75.456 64.032 14.256 125.184 39.904 179.248 75.456-14.256 41.2-5.728 88.096 26.992 120.816 32.72 32.672 79.664 41.2 120.864 27.040 35.552 54.064 61.104 115.168 75.376 179.152-44.064 17.136-75.376 59.712-75.376 109.536s31.28 92.4 75.376 109.536c-14.256 63.984-39.824 125.088-75.376 179.152-41.2-14.16-88.144-5.648-120.864 27.040-32.72 32.72-41.248 79.616-26.992 120.816-54.096 35.536-115.248 61.184-179.28 75.44-17.040-44.112-59.712-75.456-109.536-75.456-49.712 0-92.4 31.328-109.488 75.456-63.936-14.256-125.136-39.904-179.152-75.456 14.208-41.2 5.696-88.096-26.992-120.816-32.72-32.672-79.664-41.2-120.912-27.040-35.52-54.080-61.184-115.184-75.344-179.168 44.064-17.136 75.376-59.712 75.376-109.536s-31.312-92.384-75.376-109.504zM153.6 448c0 197.68 160.784 358.4 358.352 358.4 197.728 0 358.4-160.736 358.4-358.4s-160.688-358.4-358.4-358.4c-197.568 0-358.352 160.736-358.352 358.4z" />
<glyph unicode="&#xe01d;" d="M204.848 655.616v149.312c-1.488 21.392-10 38.432-25.648 54.064-15.6 15.648-45.456 24.16-69.616 24.16h-35.552c-22.768 0-32.768-11.392-49.808-26.992-14.224-14.208-22.784-29.856-24.176-49.76h128v-531.904c0-22.72 8.56-42.672 25.552-58.272 17.088-15.696 46.944-24.16 69.712-24.16h476.384c22.72 0 32.72 11.344 49.808 26.992 14.16 14.256 22.688 29.904 24.16 49.808h-568.848v78.192c7.072-1.44 12.784-1.44 18.464-1.44h520.512c24.16 0 95.264 12.832 112.352 29.904 17.040 15.648 28.432 31.248 39.824 55.408l127.952 294.432c0 22.72-9.904 42.624-27.040 58.272-17.040 15.648-26.992 22.768-49.76 22.768h-723.808c-5.696 0-11.392 0-18.464-1.488v-75.376h742.304l-128-307.2-614.304 0.016v233.264zM614.4 76.816c0-35.552 28.48-63.984 64.032-63.984s63.984 28.432 63.984 63.984-28.432 63.984-63.984 63.984-64.032-28.432-64.032-63.984zM102.448 76.816c0-35.552 28.432-63.984 63.984-63.984s63.984 28.432 63.984 63.984-28.432 63.984-63.984 63.984-63.984-28.432-63.984-63.984z" />
<glyph unicode="&#xe01e;" d="M665.552 217.616h-255.904v76.8h255.904v-76.8zM358.448 217.616h-179.248v76.8h179.248v-76.8zM947.136 575.952h-870.336v-460.704h870.352l-0.016 460.704zM947.136 780.752h-870.336v-127.952h870.352l-0.016 127.952zM947.136 857.568c22.768 0 32.72-7.072 49.76-22.72 17.136-15.648 27.040-35.552 27.040-58.32v-652.736c0-22.768-8.512-45.552-25.552-61.152-15.696-15.6-25.648-24.16-49.808-24.16h-853.264c-22.768 0-52.592 8.56-69.712 24.16-17.040 15.568-25.552 38.352-25.552 61.12v652.736c0 22.768 8.512 41.296 25.552 56.896 15.648 15.6 46.944 24.16 69.712 24.16h851.824z" />
<glyph unicode="&#xe01f;" d="M819.2 166.448h-76.8v435.152h76.8v-435.152zM639.952 166.448h-76.752v332.752h76.752v-332.752zM460.8 166.448h-76.752v511.952h76.752v-511.952zM281.6 166.448h-76.8v204.752h76.8v-204.752zM947.136 806.4h-870.288v-716.8h870.304l-0.016 716.8zM971.312 883.152c17.136 0 21.344-1.44 34.16-14.208 12.784-12.784 18.512-28.48 18.512-45.504v-740.88c0-17.136-5.728-37.040-18.512-51.296-12.832-12.784-17.040-18.432-34.16-18.432l-895.856 0.032c-17.136 0-42.72 5.648-55.504 18.432-12.784 14.256-19.952 34.16-19.952 51.296l-0.016 740.832c0 17.040 7.168 27.040 19.952 41.296 12.784 12.784 38.384 18.432 55.504 18.432l895.872-0.016z" />
<glyph unicode="&#xe020;" d="M511.968 934.4l157.904-321.456 354.048-51.152-255.904-248.864 59.712-351.328-315.76 164.992-315.664-164.992 59.712 351.328-255.952 248.864 354.096 51.152z" />
<glyph unicode="&#xe021;" d="M512.048 936.96l-157.952-321.456-354.048-51.2 255.952-248.864-59.712-351.184 315.76 164.896 315.632-164.896-59.712 351.184 256 248.864-354.096 51.2-157.824 321.456zM512.048 794.752l117.952-236.080 265.952-38.432-191.968-183.456 45.552-258.832-237.472 122.304-237.568-122.304 45.552 258.832-192.048 183.456 266 38.432 118.048 236.080z" />
<glyph unicode="&#xe022;" d="M511.936 955.696l-422.288-418.064h844.704l-422.416 418.064zM89.648 358.432l422.288-418.112 422.416 418.112h-844.704z" />
<glyph unicode="&#xe023;" d="M1023.952 729.552c0 28.528-27.040 51.2-59.712 51.2h-34.16c-32.672 0-59.712-22.688-59.712-51.2v-793.552h153.6v793.552zM588.8 908.8c0 28.432-27.040 51.2-59.728 51.2h-34.112c-32.72 0-59.76-22.768-59.76-51.2v-972.784h153.6v972.784zM153.6 499.2c0 28.432-26.992 51.2-59.712 51.2h-34.128c-32.672 0-59.712-22.768-59.712-51.2v-563.2h153.552v563.2z" />
<glyph unicode="&#xe024;" d="M268.832 824.832c-157.856-157.856-177.76-401.088-55.504-573.104l-5.696-4.272-184.864-186.256c-29.872-28.528-29.872-75.376-1.44-103.824s75.376-28.48 103.776 1.392l186.288 184.944 4.352 5.648c172.032-122.304 415.248-102.4 573.056 55.456 176.368 174.896 180.592 457.92 8.56 628.608-170.704 172.048-453.648 167.744-628.528-8.592zM329.936 763.68c140.816 140.816 366.928 143.648 503.376 5.696 138-136.528 135.184-362.608-5.648-503.424-140.768-140.768-366.88-143.6-503.376-5.696-137.952 136.512-135.136 362.656 5.648 503.424z" />
<glyph unicode="&#xe025;" d="M411.088 628.672c-65.424-65.472-75.408-164.976-29.872-241.84-1.488-1.392-2.88-2.832-4.304-4.224l-69.664-69.712c-19.904-18.464-19.904-49.76 0-69.664s51.2-19.904 69.664 0l69.712 69.664c1.392 1.44 2.832 2.832 4.224 4.304 76.848-45.552 176.368-35.552 241.84 29.872 76.752 76.8 76.752 201.92-1.488 280.128-78.192 78.24-203.328 78.24-280.112 1.472zM455.104 584.56c52.64 52.64 139.424 52.64 192.016-1.44 54.064-52.592 54.064-139.376 1.44-192.016-52.64-54.032-139.376-52.592-193.456 0-52.576 54.080-54.016 140.832 0 193.456zM0.048 448.048c0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904-283.040 0-512-228.96-512-511.904zM64.032 448.048c0 247.392 200.528 447.936 448.032 447.936 247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.504 0.016-448.032 200.544-448.032 448.032z" />
<glyph unicode="&#xe026;" d="M611.568 492.080c0 51.2-29.904 122.304-112.4 122.304s-112.304-56.848-112.304-118.048c0-32.672 15.6-99.536 41.2-127.952 4.272-4.272 29.904-22.768 29.904-32.72 0-14.208-4.272-9.952-9.952-14.208-31.328-71.104-230.4-41.296-230.4-163.552 0-14.208 18.464-28.48 18.464-42.624h557.456v69.616c0 99.632-214.704 65.472-246.048 150.768 56.96 66.88 64.080 99.568 64.080 156.416zM947.136 703.952v-691.104l-870.336 0.016v691.088h870.336zM1023.952 960h-1023.904v-1024h948.528c24.16 0 34.112 8.56 49.808 24.16 17.040 15.744 25.552 38.432 25.552 61.2v938.64z" />
<glyph unicode="&#xe027;" d="M947.136 608.688v-595.84l-819.088 0.016v-76.848h824.8c21.296 0 35.552 7.168 49.808 21.344 14.208 14.208 21.296 34.16 21.296 52.64v822h-76.8v-223.312zM819.152 729.552v-588.752h-742.352v588.752h742.352zM896 960h-895.952v-896h824.848c21.296 0 29.824 7.168 44.064 21.392 14.256 14.16 27.040 38.384 27.040 58.272v816.336z" />
<glyph unicode="&#xe028;" d="M947.136 703.952h-870.336v-691.104h870.352l-0.016 691.104zM1023.952 960v-938.624c0-22.768-8.512-45.456-25.552-61.2-15.696-15.6-25.648-24.16-49.808-24.16h-948.544v1023.984h1023.904z" />
<glyph unicode="&#xe029;" d="M989.856 533.408l-416.736 379.696c-45.456 58.32-92.4 58.32-137.952 0v-237.472h-356.912c-42.624 0-78.192-42.672-78.192-96.752v-268.784c0-52.592 34.112-95.264 76.8-95.264h358.304v-226.096c45.552-56.848 92.496-69.712 137.952-12.784l416.72 381.072c45.472 58.336 45.472 118.064 0.016 176.384zM76.864 445.232v153.6h435.104v255.952l460.8-409.552-460.8-409.552v255.936h-435.104v153.616z" />
<glyph unicode="&#xe02a;" d="M426.624 925.824l-379.792-418.112c-58.24-44.064-58.24-91.008 0-136.48h237.568v-356.912c0-42.72 42.592-78.272 96.656-78.272h268.784c52.64 0 95.264 34.16 95.264 76.8v358.384h226.096c56.944 45.456 69.712 92.4 12.864 136.48l-381.168 418.112c-58.32 45.552-118.032 45.552-176.272 0zM514.704 12.848h-153.552v435.152h-256l409.552 460.784 409.648-460.8-256.032 0.016v-435.152h-153.616z" />
<glyph unicode="&#xe02b;" d="M230.4 588.752v-76.752h307.2v76.752h-307.2zM332.8 435.152v-127.952h460.752v127.952h-460.752zM947.136 793.552v-691.152h-870.336v691.152h870.336zM971.312 870.336h-895.888c-17.088 0-42.624-5.696-55.456-18.464-12.8-14.256-19.92-24.16-19.92-41.248v-715.264c0-17.136 7.12-37.040 19.904-51.296 12.832-12.784 38.384-18.432 55.456-18.432h895.904c17.088 0 21.392 5.648 34.16 18.432 12.784 14.256 18.464 34.16 18.464 51.296l0.016 715.264c0 17.088-5.696 32.72-18.464 45.504-12.784 12.832-17.088 14.208-34.176 14.208z" />
<glyph unicode="&#xe02c;" d="M947.136 89.6h-870.336v793.552h-1.376c-17.088 0-42.624-5.648-55.456-18.432-12.8-14.256-19.92-24.24-19.92-41.296v-740.88c0-17.136 7.12-37.040 19.904-51.296 12.832-12.784 38.384-18.432 55.456-18.432h895.904c17.088 0 21.392 5.648 34.16 18.432 12.784 14.256 18.464 34.16 18.464 51.296v7.024l-76.8 0.016zM870.352 371.2c0-42.624 34.16-76.8 76.8-76.8 42.72 0 76.8 34.16 76.8 76.8s-34.064 76.8-76.8 76.8c-42.64 0-76.8-34.16-76.8-76.8zM908.784 371.2c0 21.344 17.040 38.384 38.384 38.384s38.384-17.040 38.384-38.384-17.040-38.384-38.384-38.384-38.384 17.056-38.384 38.384zM520.512 642.848c12.832-24.16 38.384-41.248 68.272-41.248 31.28 0 56.848 18.464 69.712 44.064 130.816-28.432 199.072-137.952 233.232-221.84 9.904 11.392 25.552 19.904 41.2 22.768-36.944 82.4-119.44 214.704-268.784 248.864-8.512 34.064-38.384 59.712-75.376 59.712-36.944 0-68.272-27.040-75.376-61.2-170.688-49.76-251.744-258.784-278.736-351.264-32.72-9.904-55.504-38.336-55.504-73.888 0-42.672 34.16-76.8 76.848-76.8 42.592 0 76.752 34.112 76.752 76.8 0 29.872-17.040 55.408-42.672 68.224 31.328 106.704 99.616 264.56 230.432 305.808zM550.368 678.4c0 21.344 17.088 38.384 38.432 38.384 21.296 0 38.384-17.040 38.384-38.384s-17.088-38.384-38.384-38.384c-21.344 0.016-38.432 17.040-38.432 38.384zM217.632 268.848c0 21.296 17.088 38.336 38.432 38.336 21.296 0 38.384-17.040 38.384-38.336 0-21.392-17.088-38.432-38.384-38.432-21.344 0.016-38.432 17.040-38.432 38.432z" />
<glyph unicode="&#xe02d;" d="M947.136 752.32v-662.72h-870.336v662.72l386.816-386.816c27.040-27.040 69.712-27.040 96.752 0l386.768 386.816zM119.488 806.4h785.024l-359.824-361.264c-18.464-17.040-46.896-17.040-65.424 0l-359.776 361.264zM971.312 883.152h-895.888c-17.088 0-42.624-5.648-55.456-18.432-12.8-14.256-19.92-24.24-19.92-41.296v-740.88c0-17.136 7.12-37.040 19.904-51.296 12.832-12.784 38.384-18.432 55.456-18.432h895.904c17.088 0 21.392 5.648 34.16 18.432 12.784 14.256 18.464 34.16 18.464 51.296l0.016 740.88c0 17.040-5.696 32.72-18.464 45.504s-17.088 14.224-34.176 14.224z" />
<glyph unicode="&#xe02e;" d="M597.232-29.84l379.696 416.624c58.32 45.552 58.32 92.496 0 138h-237.488v356.944c0 42.72-42.688 78.272-95.264 78.272h-268.832c-54.032 0-96.656-34.16-96.656-76.848v-358.352h-224.704c-58.32-45.504-71.104-92.448-12.832-138l379.728-416.624c58.288-45.552 118.016-45.552 176.352-0.016zM508.992 883.152h153.6v-435.152h256.048l-409.648-460.784-409.504 460.784h256v435.152h153.504z" />
<glyph unicode="&#xe02f;" d="M34.16 362.768l416.672-379.696c45.504-58.32 92.448-58.32 137.952 0v237.472h356.96c42.624 0 78.192 42.72 78.192 96.704v267.392c0 53.984-34.064 96.704-76.8 96.704h-358.336v224.704c-45.504 58.272-92.448 71.104-137.952 12.784l-416.688-379.696c-45.504-58.32-45.504-118.032 0-176.368zM947.136 450.944v-153.6h-435.184v-255.952l-460.704 409.552 460.704 409.552v-255.952h435.2l-0.016-153.6z" />
<glyph unicode="&#xe030;" d="M943.632 883.184v-229.008l76.8-56.848v302.848c0 17.136-5.696 32.72-18.512 45.552-12.784 12.784-17.040 14.256-34.112 14.256h-896c-16.992 0-42.592-5.696-55.36-18.512-12.88-14.256-19.968-24.16-19.968-41.296v-894.464c0-17.040 7.072-36.944 19.952-51.2 12.784-12.784 38.384-18.464 55.36-18.464h896c17.088 0 21.344 5.696 34.112 18.464 12.832 14.256 18.512 34.16 18.512 51.2l0.016 292.944-76.8-56.848v-228.96h-870.352v870.336h870.352zM278.080 396.784h460.704v-128.016l288.72 179.2-288.72 179.184v-127.968h-358.304c-66.848 0-102.4-35.552-102.4-102.4z" />
<glyph unicode="&#xe031;" d="M922.288 332.832c2.88 8.512 4.272 17.040 5.696 25.6l-75.408 18.464c-1.392-8.512-2.88-17.088-5.696-24.16-52.544-206.24-263.024-331.376-469.264-278.736-204.8 54.032-329.872 264.48-275.904 469.28 52.688 206.224 263.12 331.36 469.312 277.344 115.168-28.48 204.752-108.096 251.696-209.104l-110.88-65.376c-2.88-14.256 4.224-28.432 18.432-31.28l199.104-51.2c14.208-2.88 28.48 4.272 31.328 18.512l51.152 199.072c2.832 14.256-4.224 28.432-18.464 31.28l-103.776-61.104c-56.896 116.56-163.552 208.976-300.064 244.528-247.488 64.048-499.232-85.344-563.216-332.768-63.968-247.472 85.312-499.184 332.816-563.104 247.424-64.080 499.104 85.312 563.136 332.752z" />
<glyph unicode="&#xe032;" d="M48.384 857.568c-26.992 0-48.336-21.36-48.336-46.96v-8.464c0-25.648 21.344-46.944 48.336-46.944h927.232c27.040 0 48.336 21.296 48.336 46.944v8.464c0 25.6-21.296 46.944-48.336 46.944l-927.232 0.016zM48.384 499.2c-26.992 0-48.336-21.344-48.336-46.944v-8.512c0-25.6 21.344-46.944 48.336-46.944h927.232c27.040 0 48.336 21.344 48.336 46.944v8.512c0 25.6-21.296 46.944-48.336 46.944h-927.232zM48.384 140.8c-26.992 0-48.336-21.28-48.336-46.928v-8.464c0-25.6 21.344-46.944 48.336-46.944l927.232-0.016c27.040 0 48.336 21.344 48.336 46.944v8.464c0 25.648-21.296 46.944-48.336 46.944l-927.232 0.016z" />
<glyph unicode="&#xe033;" d="M512.048 959.952c-283.024 0-512-228.96-512-511.904 0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904zM512.064 0.032c-247.488 0-448.032 200.528-448.032 448.032 0 247.376 200.528 447.936 448.032 447.936 247.408 0 447.936-200.528 447.936-447.936 0-247.488-200.528-448.032-447.936-448.032zM268.512 486.4v-76.784h487.008v76.784h-204.752z" />
<glyph unicode="&#xe034;" d="M307.2 780.56v-153.616h51.248v153.616h-51.248zM230.4 780.56v-153.616h25.648v153.616h-25.648zM435.2 780.56v-153.616h128.048v153.616h-128.048zM179.2 780.56v-153.616h25.648v153.616h-25.648zM819.152 780.56v-153.616h25.648v153.616h-25.648zM742.368 780.56v-153.616h25.616v153.616h-25.616zM614.4 780.56v-153.616h51.152v153.616h-51.152zM947.136 882.96v-358.352l-870.336-0.016v358.368h870.336zM971.312 959.792h-895.888c-17.088 0-42.624-5.728-55.456-18.512-12.8-14.208-19.92-24.208-19.92-41.2v-382.56c0-17.088 7.12-37.040 19.904-51.248 12.832-12.784 38.384-18.464 55.456-18.464h895.904c17.088 0 21.392 5.696 34.16 18.464 12.784 14.208 18.464 34.16 18.464 51.248l0.016 382.56c0 16.992-5.696 32.672-18.464 45.456-12.784 12.784-17.088 14.256-34.176 14.256zM707.648 157.968l-160.688 143.712c-18.464 22.752-36.992 22.752-55.52 0v-102.4l-143.6 0.016c-15.632 0-35.552-15.632-35.552-36.944v-79.664c0-21.36 14.16-36.992 31.28-36.992h147.84v-85.264c18.512-21.392 37.056-35.552 55.52-12.848l160.704 143.664c18.48 21.28 18.48 45.44 0.016 66.72z" />
<glyph unicode="&#xe035;" d="M571.664 837.952h193.632l-210.112-226.96c-26.736-26.72-23.472-80.064 6.64-113.488 29.968-30.064 70.096-33.296 100.048-6.624l210.24 226.848v-180.128h120.256v420.512h-420.704v-120.16zM452.256 386.448c-30.176 30.080-66.944 33.36-93.632 3.376l-206.736-220.32v186.976h-120.272v-420.48h420.672v120.080h-203.584l210.208 223.568c26.704 26.736 23.36 73.504-6.656 106.8z" />
<glyph unicode="&#xe036;" d="M66.272 303.072h193.632l-210.128-226.96c-26.736-26.72-23.472-80.064 6.656-113.472 29.968-30.080 70.080-33.312 100.032-6.624l210.24 226.848v-180.128h120.256v420.496h-420.688v-120.16zM967.616 933.84c-30.192 30.080-66.96 33.36-93.648 3.36l-206.736-220.304v186.976h-120.256v-420.48h420.672v120.064l-203.616-0.016 210.224 223.584c26.72 26.736 23.36 73.52-6.64 106.816z" />
<glyph unicode="&#xe037;" d="M251.488-54.704c-32.48 0-63.040 12.528-86.192 35.264l-127.744 112.304c-47.936 47.936-47.936 125.936 0 173.872l84.224 84.272c23.248 23.232 54.128 36 86.96 36 32.848 0 63.712-12.784 86.928-35.984-0.016 0.032-0.032 0.032-0.032 0.032 0.144 0 8.352-6.448 20.32-6.448 12.592 0 21.040 7.152 21.408 7.456l264.448 264.512c-0.016-0.016-0.032-0.032-0.048-0.032-0.112 0 6.464 8.256 6.464 20.32 0 7.664-2.688 13.824-4.928 17.6l-2.080 2.080c-47.936 47.936-47.936 125.936 0 173.872l84.272 84.272c23.216 23.216 54.080 36.016 86.928 36.016 32.48 0 63.040-12.512 86.192-35.264l127.76-112.304c23.248-23.232 36.032-54.112 36.032-86.944s-12.8-63.728-36.032-86.944l-647.92-647.936c-23.232-23.216-54.096-36.016-86.96-36.016zM80.624 137.2l127.632-112.208c23.136-23.12 63.392-23.104 86.512 0l647.936 647.936c11.552 11.552 17.92 26.928 17.92 43.248 0 16.016-6.128 31.136-17.28 42.608l-127.632 112.208c-23.152 23.12-63.392 23.104-86.512 0.016l-84.256-84.272c-11.552-11.552-17.936-26.912-17.936-43.248s6.368-31.696 17.936-43.248l8.048-8.768c7.76-11.312 17.056-29.952 17.072-54.576 0-37.024-21.472-60.8-23.92-63.376l-266.224-266.208c-3.216-3.056-27.008-24.496-63.984-24.496-36.992 0-60.752 21.424-63.328 23.872-12.176 12.176-27.536 18.528-43.872 18.528s-31.712-6.368-43.264-17.936l-84.24-84.24c-23.616-23.616-23.824-61.936-0.608-85.84z" />
<glyph unicode="&#xe038;" d="M1023.952 0.064h-1023.904v29.808c0 12.192 0.448 24.448 0.912 36.688 0.432 11.52 0.88 23.040 0.88 34.56 0 142.928 134.192 179.824 242.016 209.456 67.552 18.56 131.376 36.112 149.376 72.064 3.072 6.112 6.24 12.912 8.64 18.208-3.696 5.024-12.592 14.624-20.592 23.264-4.336 4.672-9.088 9.776-14.192 15.472-24.784 27.456-82.4 104.56-82.4 227.152 0 140.080 83.328 227.088 217.488 227.088 142.896 0 217.632-117.808 217.632-234.208 0-98.752-14.48-159.616-101.472-265.52 28.288-41.776 104.72-60.88 178.88-79.424 106.256-26.576 226.72-56.688 226.72-168.432v-146.176zM60.352 59.648h903.984v86.576c0 60.816-68.592 82.336-181.552 110.592-97.264 24.336-197.808 49.472-227.808 131.104l-6 16.336 11.28 13.248c90.944 106.832 99.952 153.52 99.952 242.112 0 60.4-33.024 174.608-158.032 174.608-137.376 0-157.872-104.944-157.872-167.488 0-101.92 46.88-164.896 67.056-187.248 4.896-5.44 9.488-10.368 13.632-14.848 22.16-23.872 38.144-41.12 38.144-66.432v-6.208l-2.464-5.696c0 0-7.296-16.784-14.144-30.4-29.904-59.648-106.144-80.624-186.864-102.816-119.744-32.912-198.208-61.28-198.208-151.984 0-12.24-0.464-24.544-0.928-36.8-0.064-1.568-0.112-3.104-0.176-4.656z" />
<glyph unicode="&#xe039;" d="M5.264 448.048c0-283.024 228.96-512 511.904-512 283.024 0 512 228.96 512 512 0 282.928-228.96 511.904-512 511.904-282.944 0-511.904-228.96-511.904-511.904zM69.248 448.048c0 247.376 200.528 447.936 447.936 447.936 247.488 0 448.032-200.528 448.032-447.936 0-247.472-200.528-448.032-448.032-448.032-247.408 0.016-447.936 200.544-447.936 448.032z" />
<glyph unicode="&#xe03a;" d="M1023.952 0.064h-1023.904v29.808c0 12.192 0.448 24.448 0.912 36.688 0.432 11.52 0.88 23.040 0.88 34.56 0 142.928 134.192 179.824 242.016 209.456 67.552 18.56 131.376 36.112 149.376 72.064 3.072 6.112 6.24 12.912 8.64 18.208-3.696 5.024-12.592 14.624-20.592 23.264-4.336 4.672-9.088 9.776-14.192 15.472-24.784 27.456-82.4 104.56-82.4 227.152 0 140.080 83.328 227.088 217.488 227.088 142.896 0 217.632-117.808 217.632-234.208 0-98.752-14.48-159.616-101.472-265.52 28.288-41.776 104.72-60.88 178.88-79.424 106.256-26.576 226.72-56.688 226.72-168.432v-146.176z" />
<glyph unicode="&#xe03b;" d="M251.488-54.704c-32.48 0-63.040 12.528-86.192 35.264l-127.744 112.304c-47.936 47.936-47.936 125.936 0 173.872l84.224 84.272c23.248 23.232 54.128 36 86.96 36 32.848 0 63.712-12.784 86.928-35.984-0.016 0.032-0.032 0.032-0.032 0.032 0.144 0 8.352-6.448 20.32-6.448 12.592 0 21.040 7.152 21.408 7.456l264.448 264.512c-0.016-0.016-0.032-0.032-0.048-0.032-0.112 0 6.464 8.256 6.464 20.32 0 7.664-2.688 13.824-4.928 17.6l-2.080 2.080c-47.936 47.936-47.936 125.936 0 173.872l84.272 84.272c23.216 23.216 54.080 36.016 86.928 36.016 32.48 0 63.040-12.512 86.192-35.264l127.76-112.304c23.248-23.232 36.032-54.112 36.032-86.944s-12.8-63.728-36.032-86.944l-647.92-647.936c-23.232-23.216-54.096-36.016-86.96-36.016z" />
<glyph unicode="&#xe03c;" d="M5.264 448.048c0-283.024 228.96-512 511.904-512 283.024 0 512 228.96 512 512 0 282.928-228.96 511.904-512 511.904-282.944 0-511.904-228.96-511.904-511.904z" />
<glyph unicode="&#xe03d;" d="M612.192 533.664c0 6.896-3.136 51.6-28 51.6-37.36 0-46.704-72.256-46.704-82.624 0-3.408 3.152-58.496 28.032-58.496 34.192 0.032 46.672 72.288 46.672 89.52zM814.384 533.664c0 6.896-3.152 51.6-28.032 51.6-37.28 0-46.608-72.256-46.608-82.624 0-3.408 3.072-58.496 27.952-58.496 34.192 0.032 46.688 72.288 46.688 89.52zM141.296 959.232c-68.224 0-123.504-55.488-123.504-123.92v-650.72c0-68.432 55.296-123.92 123.504-123.92h339.808l123.504-123.936v123.936h278.048c68.224 0 123.52 55.472 123.52 123.92v650.72c0 68.432-55.296 123.92-123.52 123.92h-741.36zM668.16 537.072c0-55.088-31.088-154.88-102.64-154.88-6.208 0-18.496 3.616-25.424 6.016-32.512 11.168-50.192 49.696-52.352 66.256 0 0-3.072 17.792-3.072 40.752 0 22.992 3.072 45.328 3.072 45.328 15.552 75.728 43.552 106.736 96.448 106.736 59.072 0.032 83.968-58.528 83.968-110.208zM486.496 657.6c0-3.392-43.552-141.168-43.552-213.424v-75.712c-2.592-12.080-4.16-24.144-21.824-24.144-46.608 0-88.88 151.472-92.016 161.84-6.208-6.896-62.24-161.84-96.448-161.84-24.864 0-43.552 113.648-46.608 123.936-9.344 55.072-26.048 157.52-26.048 164.416 0 20.672 1.152 38.736 26.048 38.736 6.208 0 21.6-6.064 23.712-17.168 11.648-62.032 16.688-120.512 29.168-185.968 1.856-2.928 1.504-7.008 4.56-10.432 3.152 10.288 66.928 168.784 94.96 168.784 22.544 0 30.4-44.592 33.536-61.824 6.208-20.656 13.088-55.216 22.416-82.752 0 13.776 12.48 203.12 65.392 203.12 18.592-0.032 26.704-6.928 26.704-27.568zM870.32 537.072c0-55.088-31.088-154.88-102.64-154.88-6.192 0-18.448 3.616-25.424 6.016-32.432 11.168-50.176 49.696-52.288 66.256 0 0-3.888 17.92-3.888 40.896s3.888 45.184 3.888 45.184c15.552 75.728 43.488 106.736 96.384 106.736 59.104 0.032 83.968-58.528 83.968-110.208z" />
<glyph unicode="&#xe600;" d="M944.946 804.152v-131.514c-92.58-32.661-159.103-121.022-159.103-224.631s66.523-191.985 159.103-224.631v-131.514h-865.988v131.514c92.58 32.661 159.103 121.022 159.103 224.631s-66.523 191.985-159.103 224.631v131.514h865.988zM991.765 883.159h-959.626c-17.776 0-32.187-14.032-32.187-31.35v-244.714c87.871 0 159.103-71.232 159.103-159.103s-71.232-159.087-159.103-159.087v-244.714c0-17.318 14.411-31.35 32.187-31.35h959.626c17.776 0 32.187 14.032 32.187 31.35v244.714c-87.871 0-159.103 71.232-159.103 159.103s71.232 159.103 159.103 159.103v244.698c0 17.318-14.411 31.35-32.187 31.35v0z" />
<glyph unicode="&#xe601;" d="M873.967 809.999c-200.139 200.139-523.906 200.107-724.045-0.032-200.075-200.060-200.107-523.827 0.032-723.966 200.091-200.091 523.922-200.123 723.997-0.047 200.139 200.123 200.107 523.954 0.016 724.045zM828.697 131.209c-174.936-174.936-458.552-174.92-633.504 0.032-174.999 174.983-174.936 458.536-0.016 633.472 174.999 174.999 458.552 175.046 633.551 0.047 174.951-174.951 174.967-458.568-0.032-633.551zM286.603 538.596l58.338-58.338-131.688-5.072c-16.101 0-31.192-17.050-32.187-36.153-0.032-18.108 11.077-31.176 28.158-32.14l131.688 5.009-54.277-54.277 36.248-36.248 126.679 126.679-126.742 126.742-36.216-36.201zM815.819 486.326l-128.685-4.077 56.331 56.331-36.232 36.232-126.679-126.679 126.758-126.758 36.169 36.169-61.34 61.34 130.692 4.045c16.101 0 29.217 15.106 30.196 34.162-0.032 18.171-10.113 30.212-27.21 29.232zM488.259 703.972h47.404v-511.945h-47.404v511.945z" />
<glyph unicode="&#xe602;" d="M511.992 959.937c-283.016 0-511.976-228.96-511.976-511.897 0-283.032 228.96-511.992 511.976-511.992 282.937 0 511.897 228.96 511.897 511.992 0 282.937-228.96 511.897-511.897 511.897zM63.979 448.055c0 247.369 200.534 447.934 448.029 447.934 109.866 0 210.441-39.614 288.357-105.252l-631.102-631.134c-65.654 77.932-105.284 178.538-105.284 288.452zM512.024 0.011c-109.913 0-210.52 39.614-288.468 105.284l631.134 631.134c65.638-77.932 105.268-178.491 105.268-288.373 0-247.479-200.549-448.044-447.934-448.044z" />
<glyph unicode="&#xe603;" d="M999.966 815.419l-120.121 120.121c-31.84 31.84-83.478 31.84-115.318 0l-678.648-678.632-85.832-320.339 320.339 85.832 0.948-0.948 678.648 678.648c31.84 31.84 31.84 83.478-0.016 115.318zM107.401 93.617l34.162 127.5 143.049-143.049-127.5-34.162-49.711 49.711zM827.891 617.176l-146.304 146.304 120.184 120.184 146.304-146.304-120.184-120.184z" />
<glyph unicode="&#xe604;" d="M688.988 466.963h169.086v-72.691h-169.086v72.691zM894.42 133.531h-820.148v420.346h434.568c15.802 33.185 36.346 63.21 61.63 86.914h-496.198v120.099h820.148v-66.37c26.864-12.642 50.568-28.444 72.691-47.407v109.037c0 22.123-9.481 39.506-25.284 55.309-15.802 14.222-25.284 22.123-47.407 22.123h-802.765c-22.123 0-50.568-7.901-66.37-22.123s-23.704-31.605-23.704-53.728v-616.296c0-22.123 7.901-42.667 23.704-56.889s44.247-22.123 66.37-22.123h804.346c22.123 0 31.605 7.901 47.407 22.123s23.704 36.346 23.704 56.889v71.111c-22.123-18.963-45.827-34.765-72.691-47.407v-31.605zM774.321 678.716c-137.481 0-248.099-110.617-248.099-248.099s110.617-248.099 248.099-248.099 248.099 110.617 248.099 248.099-112.198 248.099-248.099 248.099zM584.691 430.617c0 104.296 85.333 189.63 189.63 189.63s189.63-85.333 189.63-189.63-85.333-189.63-189.63-189.63-189.63 85.333-189.63 189.63zM224.395 466.963v-72.691h259.16c-1.58 12.642-3.16 23.704-3.16 36.346s1.58 23.704 3.16 36.346h-259.16z" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe000;" glyph-name="virtual" data-tags="virtual" d="M307.2 780.752v-153.6h51.248v153.6h-51.248zM230.4 780.752v-153.6h25.648v153.6h-25.648zM435.2 780.752v-153.6h128.048v153.6h-128.048zM179.2 780.752v-153.6h25.648v153.6h-25.648zM819.152 780.752v-153.6h25.648v153.6h-25.648zM742.384 780.752v-153.6h25.6v153.6h-25.6zM614.4 780.752v-153.6h51.152v153.6h-51.152zM947.136 883.152v-358.352h-870.336v358.352h870.336zM971.312 960h-895.888c-17.104 0-42.656-5.728-55.472-18.512-12.784-14.208-19.904-24.208-19.904-41.2v-382.56c0-17.088 7.12-37.040 19.904-51.248 12.832-12.784 38.384-18.464 55.456-18.464h895.904c17.088 0 21.392 5.696 34.16 18.464 12.784 14.208 18.464 34.16 18.464 51.248l0.016 382.56c0 16.992-5.696 32.672-18.464 45.456s-17.088 14.256-34.176 14.256zM308.624 122.336c0-9.952 5.728-18.464 14.256-25.6-31.28-11.344-54.064-41.2-54.064-78.224 0-45.456 35.552-82.496 81.104-82.496h375.344c45.552 0 81.104 37.040 81.104 82.496 0 37.040-22.768 68.272-55.456 78.224 9.904 10 15.648 19.904 15.648 32.672 0 91.008-72.496 164.976-162.128 164.976-52.592 0-101.024-27.040-129.424-68.224-15.6 8.512-32.672 12.784-51.152 12.784-64.016 0-115.232-52.592-115.232-116.608z" />
<glyph unicode="&#xe001;" glyph-name="downloadable" data-tags="downloadable" d="M547.504-49.936l143.696 160.688c22.768 18.464 22.768 36.992 0 55.504h-102.4v143.6c0 15.648-15.648 35.552-36.944 35.552h-79.664c-21.344 0-36.992-14.16-36.992-31.28v-147.856h-85.264c-21.392-18.512-35.552-37.040-12.864-55.504l143.696-160.688c21.28-18.496 45.44-18.496 66.736-0.016zM307.2 780.56v-153.6h51.248v153.6h-51.248zM230.4 780.56v-153.6h25.648v153.6h-25.648zM435.2 780.56v-153.6h128.048v153.6h-128.048zM179.2 780.56v-153.6h25.648v153.6h-25.648zM819.152 780.56v-153.6h25.648v153.6h-25.648zM742.384 780.56v-153.6h25.6v153.6h-25.6zM614.4 780.56v-153.6h51.152v153.6h-51.152zM947.136 882.96v-358.352l-870.336-0.016v358.368h870.336zM971.312 959.792h-895.888c-17.088 0-42.624-5.728-55.456-18.512-12.8-14.208-19.92-24.208-19.92-41.2v-382.56c0-17.088 7.12-37.040 19.904-51.248 12.832-12.784 38.384-18.464 55.456-18.464h895.904c17.088 0 21.392 5.696 34.16 18.464 12.784 14.208 18.464 34.16 18.464 51.248l0.016 382.56c0 16.992-5.696 32.672-18.464 45.456s-17.088 14.256-34.176 14.256z" />
<glyph unicode="&#xe002;" glyph-name="grouped" data-tags="grouped" d="M307.2 780.752v-153.6h51.248v153.6h-51.248zM230.4 780.752v-153.6h25.648v153.6h-25.648zM435.2 780.752v-153.6h128.048v153.6h-128.048zM179.2 780.752v-153.6h25.648v153.6h-25.648zM819.152 780.752v-153.6h25.648v153.6h-25.648zM742.384 780.752v-153.6h25.6v153.6h-25.6zM614.4 780.752v-153.6h51.152v153.6h-51.152zM947.136 883.152v-358.352h-870.336v358.352h870.336zM971.312 960h-895.888c-17.104 0-42.656-5.728-55.472-18.512-12.784-14.208-19.904-24.208-19.904-41.2v-382.56c0-17.088 7.12-37.040 19.904-51.248 12.832-12.784 38.384-18.464 55.456-18.464h410.992v-76.8h-358.352v-128l-52.624-0.016c-17.088 0-42.624-5.648-55.456-18.432-12.8-14.256-19.92-24.24-19.92-41.296v-177.76c0-17.040 7.12-36.992 19.904-51.2 12.832-12.784 38.384-18.512 55.456-18.512h179.152c17.088 0 21.392 5.728 34.16 18.512 12.784 14.208 18.464 34.16 18.464 51.2v177.76c0 17.040-5.696 32.72-18.464 45.504s-17.088 14.208-34.16 14.208h-75.376l0.016 76.864h307.2v-76.848h-52.592c-17.136 0-42.672-5.648-55.504-18.432-12.784-14.256-19.856-24.256-19.856-41.296v-177.76c0-17.040 7.072-36.992 19.856-51.2 12.832-12.784 38.384-18.512 55.504-18.512h179.152c17.040 0 21.392 5.728 34.16 18.512 12.784 14.208 18.432 34.16 18.432 51.2v177.76c0 17.040-5.648 32.72-18.432 45.504s-17.136 14.208-34.16 14.208h-75.376v76.864h307.2v-76.848h-52.624c-17.088 0-42.624-5.648-55.504-18.432-12.784-14.256-19.904-24.256-19.904-41.296v-177.76c0-17.040 7.12-36.992 19.904-51.2 12.864-12.784 38.432-18.512 55.504-18.512h179.152c17.088 0 21.392 5.728 34.16 18.512 12.784 14.208 18.464 34.16 18.464 51.2v177.76c0 17.040-5.696 32.72-18.464 45.504s-17.088 14.208-34.16 14.208h-75.328v128l-358.384 0.032v76.8h433.712c17.088 0 21.392 5.696 34.16 18.464 12.784 14.208 18.464 34.16 18.464 51.248l0.016 382.56c0 16.992-5.696 32.672-18.464 45.456s-17.088 14.256-34.176 14.256zM256.048 192.048v-204.848h-204.8v204.848h204.8zM972.752 192.048v-204.848h-204.752v204.848h204.752zM614.4 192.048v-204.848h-204.752v204.848h204.752z" />
<glyph unicode="&#xe003;" glyph-name="variable" data-tags="variable" d="M307.2 729.552v-409.504h51.248l-0.016 409.504h-51.232zM230.4 729.552v-409.504h25.648v409.504h-25.648zM563.248 729.552v-409.504h51.152v409.504h-51.152zM179.2 729.552v-409.504h25.648v409.504h-25.648zM665.552 729.552v-409.504h25.648v409.504h-25.648zM486.4 729.552v-409.504h25.552v409.504h-25.552zM435.2 729.552v-409.504h25.6v409.504h-25.6zM793.552 832v-614.4h-716.752v614.4h716.752zM817.76 908.8h-742.336c-17.088 0-42.624-5.696-55.456-18.512-12.8-14.256-19.92-24.16-19.92-41.296v-638.464c0-17.088 7.12-37.040 19.904-51.2 12.832-12.832 38.384-18.512 55.456-18.512h742.336c17.040 0 21.344 5.696 34.112 18.512 12.784 14.16 18.464 34.112 18.464 51.2l0.032 638.464c0 17.136-5.696 32.72-18.464 45.552-12.784 12.768-17.088 14.256-34.128 14.256zM230.4 64h-76.8v-7.072c0-17.088 7.168-36.944 19.952-51.2 12.784-12.832 38.384-18.512 55.456-18.512h742.304c17.088 0 21.392 5.696 34.16 18.512 12.784 14.256 18.464 34.112 18.464 51.2l0.032 638.56c0 17.040-5.696 32.672-18.464 45.456s-17.088 14.256-34.16 14.256h-24.16v-691.2h-716.784z" />
<glyph unicode="&#xe004;" glyph-name="contract" data-tags="contract" d="M511.984-63.952c282.992 0 512 228.96 512 511.904 0 283.024-229.008 512-512 512-283.024 0-511.952-228.96-511.952-512 0-282.944 228.912-511.904 511.952-511.904zM511.984 0.032c-247.472 0-447.936 200.528-447.936 447.936 0 247.472 200.448 448.032 447.936 448.032 247.424 0 447.984-200.528 447.984-448.032-0.016-247.408-200.544-447.936-447.984-447.936zM322.096 437.44v-51.2h82.496l-89.536-96.704c-11.392-11.392-10-34.112 2.832-48.336 12.784-12.832 29.872-14.208 42.624-2.832l89.584 96.656v-76.752h51.248v179.168h-179.248zM706.144 463.088v51.152h-86.752l89.584 95.264c11.392 11.392 9.952 31.328-2.832 45.504-12.864 12.832-28.528 14.208-39.904 1.44l-88.096-93.872 0.016 79.664h-51.248v-179.152h179.232z" />
<glyph unicode="&#xe005;" glyph-name="expand" data-tags="expand" d="M524.768 639.984v-51.2h82.496l-236.080-233.232v79.616h-51.152v-179.152h179.152v51.2h-86.72l240.304 230.416v-76.8h51.248v179.152h-179.248zM511.984-63.952c282.992 0 512 228.96 512 511.904 0 283.024-229.008 512-512 512-283.024 0-511.952-228.96-511.952-512 0-282.944 228.912-511.904 511.952-511.904zM511.984 0.032c-247.472 0-447.936 200.528-447.936 447.936 0 247.472 200.448 448.032 447.936 448.032 247.424 0 447.984-200.528 447.984-448.032-0.016-247.408-200.544-447.936-447.984-447.936z" />
<glyph unicode="&#xe006;" glyph-name="simple" data-tags="simple" d="M947.136 806.4h-870.288v-716.8h870.304l-0.016 716.8zM971.312 883.152c17.136 0 21.344-1.44 34.16-14.208 12.784-12.784 18.512-28.48 18.512-45.504v-740.88c0-17.136-5.728-37.040-18.512-51.296-12.832-12.784-17.040-18.432-34.16-18.432l-895.856 0.032c-17.136 0-42.72 5.648-55.504 18.432-12.784 14.256-19.952 34.16-19.952 51.296l-0.016 740.832c0 17.040 7.168 27.040 19.952 41.296 12.784 12.784 38.384 18.432 55.504 18.432l895.872-0.016zM307.2 703.952h51.184v-511.888h-51.184zM230.448 703.952h25.6v-511.888h-25.6zM716.8 703.952h51.136v-511.888h-51.136zM435.2 703.952h76.8v-511.888h-76.8zM179.248 703.952h25.552v-511.888h-25.552zM819.2 703.952h25.552v-511.888h-25.552zM639.952 703.952h25.648v-511.888h-25.648zM588.8 703.952h25.6v-511.888h-25.6z" />
<glyph unicode="&#xe007;" glyph-name="plus" data-tags="plus" d="M268.88 486.464v-76.848h204.752v-204.752h76.848l-0.016 204.768h204.752v76.848l-204.752-0.016v204.752h-76.848v-204.752h-204.736zM0.048 448.048c0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904-283.040 0-512-228.96-512-511.904zM64.032 448.048c0 247.392 200.528 447.936 448.032 447.936 247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.504 0.016-448.032 200.544-448.032 448.032z" />
<glyph unicode="&#xe008;" glyph-name="right" data-tags="right" d="M551.856 243.168l136.48 140.816 34.16 35.552 17.040 18.512-179.152 189.152-51.2-52.688 82.496-88.144h-246.016c-28.48 0-51.248-22.72-51.248-51.2s22.768-51.2 51.248-51.2h243.184l-86.8-89.632 49.808-51.168zM512.048-63.952c282.944 0 511.904 228.96 511.904 511.904 0 283.024-228.96 512-511.904 512-283.040 0-512-228.96-512-511.984 0-282.96 228.96-511.92 512-511.92zM512.048 0.032c-247.472 0-448.032 200.528-448.032 447.936 0 247.472 200.528 448.032 448.032 448.032 247.392 0 447.936-200.528 447.936-448.032-0.016-247.408-200.544-447.936-447.936-447.936z" />
<glyph unicode="&#xe009;" glyph-name="up" data-tags="up" d="M716.848 487.808l-140.816 136.528-35.552 34.064-18.512 17.136-189.168-179.168 52.688-51.296 88.144 82.496v-246c0-28.432 22.72-51.2 51.2-51.2s51.2 22.768 51.2 51.2v243.184l89.632-86.704 51.184 49.76zM1023.952 447.968c0 283.024-228.96 512-511.904 512-283.040-0.016-512-228.976-512-512 0-282.944 228.96-511.904 512-511.904 282.944-0.016 511.904 228.944 511.904 511.904zM959.968 447.968c0-247.392-200.528-447.936-447.936-447.936-247.472 0-448.032 200.528-448.032 447.936 0 247.472 200.528 448.032 448.032 448.032 247.408-0.032 447.936-200.56 447.936-448.032z" />
<glyph unicode="&#xe00a;" glyph-name="down" data-tags="down" d="M307.168 408.192l140.816-136.528 35.552-34.064 18.512-17.136 189.152 179.168-52.688 51.296-88.144-82.496v246c0 28.432-22.72 51.2-51.2 51.2s-51.2-22.768-51.2-51.2v-243.184l-89.632 86.704-51.168-49.76zM0.048 448.048c0-283.024 228.96-512 511.904-512 283.024 0 512 228.96 512 512 0 282.944-228.96 511.904-512 511.904-282.944 0-511.904-228.96-511.904-511.904zM64.032 448.048c0 247.392 200.528 447.936 447.936 447.936 247.472 0 448.032-200.528 448.032-447.936 0-247.472-200.528-448.032-448.032-448.032-247.408 0.016-447.936 200.544-447.936 448.032z" />
<glyph unicode="&#xe00b;" glyph-name="left" data-tags="left" d="M472.192 652.848l-136.528-140.816-34.064-35.552-17.136-18.512 179.152-189.152 51.296 52.688-82.496 88.144h246c28.432 0 51.2 22.72 51.2 51.2s-22.768 51.2-51.2 51.2h-243.184l86.704 89.632-49.744 51.168zM512.048 959.952c-283.040 0-512-228.96-512-511.904 0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904zM512.048 895.968c247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.472 0-448.032 200.528-448.032 448.032 0.016 247.408 200.544 447.936 448.032 447.936z" />
<glyph unicode="&#xe00c;" glyph-name="image" data-tags="image" d="M844.736 115.2l-255.904 255.952-179.248-179.152-76.752 76.8-153.6-153.6 665.504-0.016zM281.632 473.6c0-42.672 34.16-76.848 76.752-76.848 42.72 0 76.848 34.16 76.848 76.848 0 42.592-34.112 76.752-76.848 76.752-42.592 0-76.752-34.16-76.752-76.752zM947.168 703.952v-691.152l-870.336 0.016v691.152l870.336-0.016zM1023.984 959.952h-1023.952v-1023.904h948.528c24.208 0 34.16 8.464 49.76 24.16 17.136 15.648 25.648 38.432 25.648 61.104v938.64z" />
<glyph unicode="&#xe00d;" glyph-name="link" data-tags="link" d="M752.352 878.896c-52.688 51.2-137.952 51.2-190.544-1.392l-479.312-479.312c-52.576-52.592-52.576-137.856-1.392-190.544l17.040-17.040 66.832 68.224-44.064 44.064 536.16 536.192 44.064-44.064 68.224 66.832-17.008 17.040zM254.608 34.144l17.040-17.040c52.688-51.2 137.952-51.2 190.544 1.392l479.312 479.312c52.592 52.592 52.592 137.872 1.392 190.544l-17.040 17.040-66.832-68.224 44.064-44.064-536.16-536.176-44.064 44.064-68.256-66.848zM992.656 950c-12.784 12.832-32.72 12.832-45.504 1.44l-312.848-312.896c-11.392-12.784-11.392-32.672 0-45.456l22.768-22.768c12.784-11.392 32.672-11.392 45.456 0l312.912 312.832c11.392 12.784 11.392 32.72-1.44 45.504l-21.344 21.344zM366.928 325.696c-12.784 11.392-32.672 11.392-45.456 0l-312.912-312.832c-11.392-12.784-11.392-32.72 1.44-45.504l21.344-21.344c12.784-12.832 32.72-12.832 45.504-1.44l312.848 312.896c11.392 12.784 11.392 32.672 0 45.456l-22.768 22.768z" />
<glyph unicode="&#xe00e;" glyph-name="calendar" data-tags="calendar" d="M358.384 524.8l-76.752-76.8h76.752v-230.4l-76.752 0.016v-51.152h204.752v51.152h-76.8l-0.016 307.184h-51.184zM588.832 524.8c-28.528 0-51.2-22.768-51.2-51.152v-256.048c0-28.384 22.688-51.152 51.2-51.152h102.4c28.432 0 51.2 22.768 51.2 51.152l-0.016 256.048c0 28.384-22.768 51.152-51.2 51.152h-102.384zM588.832 473.648h102.4v-256.048h-102.4v256.048zM947.168 678.4v-665.552l-870.336 0.016v665.552l870.336-0.016zM1023.984 960h-1023.952v-1024h948.528c24.208 0 34.16 8.56 49.76 24.16 17.136 15.744 25.648 38.432 25.648 61.2v938.64zM755.2 857.568c21.296 0 38.384-17.088 38.384-38.384 0-21.344-17.088-38.432-38.384-38.432-21.344 0-38.432 17.088-38.432 38.432 0.016 21.296 17.088 38.384 38.432 38.384zM243.216 857.568c21.392 0 38.432-17.088 38.432-38.384 0-21.344-17.040-38.432-38.432-38.432-21.296 0-38.432 17.088-38.432 38.432 0 21.296 17.136 38.384 38.432 38.384z" />
<glyph unicode="&#xe00f;" glyph-name="processing" data-tags="processing" d="M0.080 448c0-49.808 39.776-89.584 91.008-89.584 49.712 0 89.584 39.776 89.584 89.584s-39.856 89.584-89.584 89.584c-51.232 0-91.008-39.776-91.008-89.584zM420.976 448c0-49.808 41.296-89.584 91.056-89.584 49.712 0 90.96 39.776 90.96 89.584s-41.248 89.584-90.96 89.584c-49.76 0-91.056-39.776-91.056-89.584zM843.344 448c0-49.808 39.824-89.584 89.632-89.584 51.2 0 90.96 39.776 90.96 89.584s-39.776 89.584-90.96 89.584c-49.808 0-89.632-39.776-89.632-89.584z" />
<glyph unicode="&#xe010;" glyph-name="view" data-tags="view" d="M305.824 428.8c0-108.096 92.448-196.24 206.144-196.24 113.84 0 206.288 88.144 206.288 196.24 0 46.944-18.512 91.056-49.808 125.136 204.8-46.944 355.536-172.080 355.536-172.080v91.056c0 0-230.4 190.544-509.136 190.544-277.328-0.016-514.8-190.544-514.8-190.544v-91.056c0 0 150.736 120.864 352.704 170.688-28.464-34.176-46.928-76.8-46.928-123.744z" />
<glyph unicode="&#xe011;" glyph-name="status-processing" data-tags="status-processing" d="M294.432 448.048c0-21.392 17.088-38.432 38.384-38.432 21.344 0 38.432 17.040 38.432 38.432 0 21.296-17.088 38.432-38.432 38.432-21.312-0.016-38.384-17.136-38.384-38.432zM473.632 448.048c0-21.392 17.040-38.432 38.432-38.432 21.296 0 38.432 17.040 38.432 38.432 0 21.296-17.136 38.432-38.432 38.432-21.408-0.016-38.432-17.136-38.432-38.432zM652.784 448.048c0-21.392 17.136-38.432 38.432-38.432s38.432 17.040 38.432 38.432c0 21.296-17.136 38.432-38.432 38.432s-38.432-17.136-38.432-38.432zM0.048 448.048c0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904-283.040 0-512-228.96-512-511.904zM64.032 448.048c0 247.392 200.528 447.936 448.032 447.936 247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.504 0.016-448.032 200.544-448.032 448.032z" />
<glyph unicode="&#xe012;" glyph-name="status-pending" data-tags="status-pending" d="M473.632 716.768v-332.752h281.6v76.8h-204.768v255.952h-76.832zM0.048 448.048c0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904-283.040 0-512-228.96-512-511.904zM64.032 448.048c0 247.392 200.528 447.936 448.032 447.936 247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.504 0.016-448.032 200.544-448.032 448.032z" />
<glyph unicode="&#xe013;" glyph-name="status-cancelled" data-tags="status-cancelled" d="M369.728 658.048l-53.984-53.984 142.208-145.088-143.6-146.48 53.984-55.456 143.6 146.48 143.696-146.48 54.032 55.456-143.6 146.48 142.208 145.088-54.112 53.984-142.208-145.040-142.224 145.040zM156.416 820.208c-199.040-199.104-203.312-524.736-5.632-729.536 199.152-206.24 523.344-206.24 722.448 0 197.664 204.8 193.408 530.432-5.76 729.536-197.568 197.712-513.328 197.712-711.056 0zM200.528 776.096c172.080 172.128 450.8 172.128 622.864 0 173.504-174.896 176.368-460.704 4.304-638.464-173.552-179.248-457.968-179.248-631.392 0-172.096 177.76-169.216 463.568 4.224 638.464z" />
<glyph unicode="&#xe014;" glyph-name="status-refunded" data-tags="status-refunded" d="M601.616 439.536l154.992 93.792-154.992 95.36v-65.472l-332.736 0.016v-169.248l51.152 46.944v71.104h281.6l-0.016-72.496zM448.032 435.184l-154.992-95.264 154.992-95.264v62.592h332.752v173.504l-51.152-48.384v-73.936l-281.6-0.016v76.768zM0.048 448.048c0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904-283.040 0-512-228.96-512-511.904zM64.032 448.048c0 247.392 200.528 447.936 448.032 447.936 247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.504 0.016-448.032 200.544-448.032 448.032z" />
<glyph unicode="&#xe015;" glyph-name="status-completed" data-tags="status-completed" d="M281.6 459.44l140.768-136.576 35.552-34.112 18.464-17.088 291.552 281.552-52.592 51.2-240.32-231.776-142.208 136.528-51.216-49.728zM0.048 448.048c0-283.024 228.96-512 511.904-512 283.024 0 512 228.96 512 512 0 282.944-228.96 511.904-512 511.904-282.944 0-511.904-228.96-511.904-511.904zM64.032 448.048c0 247.392 200.528 447.936 447.936 447.936 247.472 0 448.032-200.528 448.032-447.936 0-247.472-200.528-448.032-448.032-448.032-247.408 0.016-447.936 200.544-447.936 448.032z" />
<glyph unicode="&#xe016;" glyph-name="status-failed" data-tags="status-failed" d="M478.752 691.216v-358.352h76.848l-0.016 358.352h-76.832zM478.752 281.664v-76.8h76.848v76.8h-76.848zM5.264 448.048c0-283.024 228.96-512 511.904-512 283.024 0 512 228.96 512 512 0 282.944-228.96 511.904-512 511.904-282.944 0-511.904-228.96-511.904-511.904zM69.248 448.048c0 247.392 200.528 447.936 447.936 447.936 247.472 0 448.032-200.528 448.032-447.936 0-247.472-200.528-448.032-448.032-448.032-247.408 0.016-447.936 200.544-447.936 448.032z" />
<glyph unicode="&#xe017;" glyph-name="check" data-tags="check" d="M0.032 418.192l294.384-290.112 35.552-34.176 18.512-17.088 675.504 665.6-78.224 76.768-598.768-590.144-270.16 264.512z" />
<glyph unicode="&#xe018;" glyph-name="query" data-tags="query" d="M550.384 348.432c91.056 15.648 140.768 76.848 140.768 176.32 0 113.84-65.472 179.2-179.152 179.2-109.536 0-172.128-59.712-179.248-166.368h51.264c7.072 78.224 46.944 115.168 128 115.168 85.312 0 127.952-42.672 127.952-128 0-71.104-28.432-110.88-89.584-123.744v8.512l-76.8-25.552v-76.752h76.8l0.016 41.216zM473.6 256.016v-76.8h76.8v76.8h-76.8zM0.016 447.968c0-282.944 228.96-511.904 512-511.904 282.944 0 511.952 228.96 511.952 511.904 0 283.024-229.008 511.984-511.952 511.984-283.040 0-512-228.96-512-511.984zM64.048 447.968c0 247.472 200.48 448 447.968 448 247.392 0 447.936-200.528 447.936-448.032 0-247.392-200.528-447.936-447.936-447.936-247.488 0.032-447.968 200.56-447.968 447.968z" />
<glyph unicode="&#xe019;" glyph-name="truck-1" data-tags="truck-1" d="M664.16 192.048c8.56 0 14.256 1.392 19.904 5.696-9.952 2.784-18.512 7.072-24.16 12.784-12.784 14.256-19.904 34.064-19.904 51.2v510.512c0 17.040 7.12 27.040 19.904 41.2 12.832 12.864 38.384 18.56 55.456 18.56h1.392l0.016 68.288c0 16.992-5.648 32.672-18.464 45.456-12.8 12.768-17.104 14.256-34.144 14.256h-588.736c-17.104 0-42.656-5.728-55.472-18.512-12.784-14.208-19.904-24.208-19.904-41.2v-638.56c0-17.136 7.12-36.944 19.904-51.2 12.832-12.784 38.384-18.464 55.456-18.464h588.752zM716.752 268.848v486.352l230.4-51.248-0.016-435.104h-230.384zM971.312 780.752l-254.56 51.248h-1.376c-17.088 0-42.624-5.696-55.456-18.56-12.784-14.16-19.904-24.16-19.904-41.2v-510.528c0-17.136 7.12-36.944 19.904-51.2 5.648-5.696 14.208-10 24.16-12.784 10-4.304 21.392-5.696 31.28-5.696h255.952c17.088 0 21.392 5.696 34.16 18.464 12.784 14.256 18.464 34.064 18.464 51.2v459.344c0 17.088-5.696 32.672-18.464 45.552-12.768 12.768-17.072 14.16-34.16 14.16zM76.8 25.632c0-49.712 39.856-89.632 89.632-89.632 49.808 0 89.632 39.904 89.632 89.632 0 49.76-39.824 89.632-89.632 89.632-49.776-0.016-89.632-39.872-89.632-89.632zM768 25.632c0-49.712 39.776-89.632 89.584-89.632s89.584 39.904 89.584 89.632c0 49.76-39.776 89.632-89.584 89.632s-89.584-39.872-89.584-89.632z" />
<glyph unicode="&#xe01a;" glyph-name="truck-2" data-tags="truck-2" d="M640 883.152v-110.928c0 17.040 7.12 27.040 19.904 41.2 12.832 12.864 38.384 18.56 55.456 18.56h1.392l0.016 68.304c0 16.992-5.648 32.672-18.464 45.456-12.8 12.768-17.104 14.256-34.144 14.256h-588.736c-17.104 0-42.656-5.728-55.472-18.512-12.784-14.208-19.904-24.208-19.904-41.2v-638.56c0-17.136 7.12-36.944 19.904-51.2 12.832-12.784 38.384-18.464 55.456-18.464h588.752c8.56 0 14.256 1.392 19.904 5.696 10-4.304 21.392-5.696 31.28-5.696h255.952c17.088 0 21.392 5.696 34.16 18.464 12.784 14.256 18.464 34.064 18.464 51.2l0.032 459.312c0 17.088-5.696 32.672-18.464 45.552-12.784 12.784-17.088 14.16-34.16 14.16l-254.56 51.248h-1.392c-17.088 0-42.624-5.696-55.456-18.56-12.784-14.16-19.904-24.16-19.904-41.2l-0.016-503.392h-563.2v614.304h563.2zM716.752 268.848v486.352l230.4-51.248-0.016-435.104h-230.384zM76.8 25.632c0-49.712 39.856-89.632 89.632-89.632 49.808 0 89.632 39.904 89.632 89.632 0 49.76-39.824 89.632-89.632 89.632-49.776-0.016-89.632-39.872-89.632-89.632zM768 25.632c0-49.712 39.776-89.632 89.584-89.632s89.584 39.904 89.584 89.632c0 49.76-39.776 89.632-89.584 89.632s-89.584-39.872-89.584-89.632z" />
<glyph unicode="&#xe01b;" glyph-name="globe" data-tags="globe" d="M568.896 819.232h-18.432v-81.056c11.296-12.832 16.992 5.696 25.552-15.696v-49.712c0-7.12 10-11.392 14.208-11.392 25.6 0 91.056 68.224 113.744 85.264-44.016 39.856-90.96 58.32-135.072 72.592zM473.632 819.232h-24.16c-76.752-17.136-163.6-54.064-231.84-160.736v-7.12c4.304 2.88 14.256 5.696 17.088 5.696 7.072 0 7.072-2.832 8.56-5.696v-55.408c0-12.832 34.064-103.824 49.76-108.096 8.56-2.88 17.088 1.44 22.72-4.272 17.040-19.904 22.768-49.808 36.992-68.224 21.344-28.528 54.032-59.808 82.496-71.104 9.952-7.168 29.872 4.224 38.384-11.392v-89.632c0-18.512 34.112 4.272 34.112-29.904v-9.904c-4.224-18.512-25.552 2.832-34.112-18.512v-150.736c4.272-8.512 24.16-8.512 34.112-8.512 0 0 39.856-2.88 39.856 14.208 0 19.952-22.768 11.392-28.48 12.784 22.768 26.992 44.112 56.896 69.712 81.104 36.944 34.112 46.896 72.496 61.104 100.976 5.696 12.784 14.208 32.672 14.208 36.944 0 29.872-115.168 83.888-122.256 86.752h-78.272c-24.16 11.392-51.152 36.992-66.768 63.984v56.896l5.648 7.168h39.824l5.696-7.168v-55.408c1.44-4.304 14.208-11.392 18.464-11.392 5.696 0 2.88 7.072 7.12 11.392v99.488c0 15.6 35.552 36.992 39.824 39.824h55.472c4.272 0 21.344 4.272 21.344 14.16 0 21.392-29.872-5.648-39.776 5.728v54.064c0 21.296-28.528 14.16-34.16 17.040 14.208 25.6 28.432 36.992 28.432 54.064 0 7.072-2.832 9.904-5.648 11.296-10 2.88-22.768 0-31.328 7.168-9.952 7.072-32.72 18.464-34.112 35.552v56.928zM0.048 448.048c0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904-283.040 0-512-228.96-512-511.904zM64.032 448.048c0 247.392 200.528 447.936 448.032 447.936 247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.504 0.016-448.032 200.544-448.032 448.032z" />
<glyph unicode="&#xe01c;" glyph-name="gear" data-tags="gear" d="M0.048 338.48c14.16-63.984 39.824-125.088 75.376-179.152 41.248 14.16 88.192 5.648 120.912-27.040 32.672-32.72 41.2-79.616 26.992-120.816 54.032-35.552 115.216-61.2 179.152-75.456 17.088 44.112 59.76 75.456 109.488 75.456 49.808 0 92.496-31.328 109.536-75.456 64.032 14.256 125.184 39.904 179.248 75.456-14.256 41.2-5.728 88.096 26.992 120.816 32.72 32.672 79.664 41.2 120.864 27.040 35.552 54.064 61.104 115.168 75.376 179.152-44.064 17.136-75.376 59.712-75.376 109.536s31.28 92.4 75.376 109.536c-14.256 63.984-39.824 125.088-75.376 179.152-41.2-14.16-88.144-5.648-120.864 27.040-32.72 32.72-41.248 79.616-26.992 120.816-54.096 35.536-115.248 61.184-179.28 75.44-17.040-44.112-59.712-75.456-109.536-75.456-49.712 0-92.4 31.328-109.488 75.456-63.936-14.256-125.136-39.904-179.152-75.456 14.208-41.2 5.696-88.096-26.992-120.816-32.72-32.672-79.664-41.2-120.912-27.040-35.52-54.080-61.184-115.184-75.344-179.168 44.064-17.136 75.376-59.712 75.376-109.536s-31.312-92.384-75.376-109.504zM153.6 448c0 197.68 160.784 358.4 358.352 358.4 197.728 0 358.4-160.736 358.4-358.4s-160.688-358.4-358.4-358.4c-197.568 0-358.352 160.736-358.352 358.4z" />
<glyph unicode="&#xe01d;" glyph-name="cart" data-tags="cart" d="M204.848 655.616v149.312c-1.488 21.392-10 38.432-25.648 54.064-15.6 15.648-45.456 24.16-69.616 24.16h-35.552c-22.768 0-32.768-11.392-49.808-26.992-14.224-14.208-22.784-29.856-24.176-49.76h128v-531.904c0-22.72 8.56-42.672 25.552-58.272 17.088-15.696 46.944-24.16 69.712-24.16h476.384c22.72 0 32.72 11.344 49.808 26.992 14.16 14.256 22.688 29.904 24.16 49.808h-568.848v78.192c7.072-1.44 12.784-1.44 18.464-1.44h520.512c24.16 0 95.264 12.832 112.352 29.904 17.040 15.648 28.432 31.248 39.824 55.408l127.952 294.432c0 22.72-9.904 42.624-27.040 58.272-17.040 15.648-26.992 22.768-49.76 22.768h-723.808c-5.696 0-11.392 0-18.464-1.488v-75.376h742.304l-128-307.2-614.304 0.016v233.264zM614.4 76.816c0-35.552 28.48-63.984 64.032-63.984s63.984 28.432 63.984 63.984-28.432 63.984-63.984 63.984-64.032-28.432-64.032-63.984zM102.448 76.816c0-35.552 28.432-63.984 63.984-63.984s63.984 28.432 63.984 63.984-28.432 63.984-63.984 63.984-63.984-28.432-63.984-63.984z" />
<glyph unicode="&#xe01e;" glyph-name="card" data-tags="card" d="M665.552 217.616h-255.904v76.8h255.904v-76.8zM358.448 217.616h-179.248v76.8h179.248v-76.8zM947.136 575.952h-870.336v-460.704h870.352l-0.016 460.704zM947.136 780.752h-870.336v-127.952h870.352l-0.016 127.952zM947.136 857.568c22.768 0 32.72-7.072 49.76-22.72 17.136-15.648 27.040-35.552 27.040-58.32v-652.736c0-22.768-8.512-45.552-25.552-61.152-15.696-15.6-25.648-24.16-49.808-24.16h-853.264c-22.768 0-52.592 8.56-69.712 24.16-17.040 15.568-25.552 38.352-25.552 61.12v652.736c0 22.768 8.512 41.296 25.552 56.896 15.648 15.6 46.944 24.16 69.712 24.16h851.824z" />
<glyph unicode="&#xe01f;" glyph-name="stats" data-tags="stats" d="M819.2 166.448h-76.8v435.152h76.8v-435.152zM639.952 166.448h-76.752v332.752h76.752v-332.752zM460.8 166.448h-76.752v511.952h76.752v-511.952zM281.6 166.448h-76.8v204.752h76.8v-204.752zM947.136 806.4h-870.288v-716.8h870.304l-0.016 716.8zM971.312 883.152c17.136 0 21.344-1.44 34.16-14.208 12.784-12.784 18.512-28.48 18.512-45.504v-740.88c0-17.136-5.728-37.040-18.512-51.296-12.832-12.784-17.040-18.432-34.16-18.432l-895.856 0.032c-17.136 0-42.72 5.648-55.504 18.432-12.784 14.256-19.952 34.16-19.952 51.296l-0.016 740.832c0 17.040 7.168 27.040 19.952 41.296 12.784 12.784 38.384 18.432 55.504 18.432l895.872-0.016z" />
<glyph unicode="&#xe020;" glyph-name="star-full" data-tags="star-full" d="M511.968 934.4l157.904-321.456 354.048-51.152-255.904-248.864 59.712-351.328-315.76 164.992-315.664-164.992 59.712 351.328-255.952 248.864 354.096 51.152z" />
<glyph unicode="&#xe021;" glyph-name="star-empty" data-tags="star-empty" d="M512.048 936.96l-157.952-321.456-354.048-51.2 255.952-248.864-59.712-351.184 315.76 164.896 315.632-164.896-59.712 351.184 256 248.864-354.096 51.2-157.824 321.456zM512.048 794.752l117.952-236.080 265.952-38.432-191.968-183.456 45.552-258.832-237.472 122.304-237.568-122.304 45.552 258.832-192.048 183.456 266 38.432 118.048 236.080z" />
<glyph unicode="&#xe022;" glyph-name="up-down" data-tags="up-down" d="M511.936 955.696l-422.288-418.064h844.704l-422.416 418.064zM89.648 358.432l422.288-418.112 422.416 418.112h-844.704z" />
<glyph unicode="&#xe023;" glyph-name="reports" data-tags="reports" d="M1023.952 729.552c0 28.528-27.040 51.2-59.712 51.2h-34.16c-32.672 0-59.712-22.688-59.712-51.2v-793.552h153.6v793.552zM588.8 908.8c0 28.432-27.040 51.2-59.728 51.2h-34.112c-32.72 0-59.76-22.768-59.76-51.2v-972.784h153.6v972.784zM153.6 499.2c0 28.432-26.992 51.2-59.712 51.2h-34.128c-32.672 0-59.712-22.768-59.712-51.2v-563.2h153.552v563.2z" />
<glyph unicode="&#xe024;" glyph-name="search" data-tags="search" d="M268.832 824.832c-157.856-157.856-177.76-401.088-55.504-573.104l-5.696-4.272-184.864-186.256c-29.872-28.528-29.872-75.376-1.44-103.824s75.376-28.48 103.776 1.392l186.288 184.944 4.352 5.648c172.032-122.304 415.248-102.4 573.056 55.456 176.368 174.896 180.592 457.92 8.56 628.608-170.704 172.048-453.648 167.744-628.528-8.592zM329.936 763.68c140.816 140.816 366.928 143.648 503.376 5.696 138-136.528 135.184-362.608-5.648-503.424-140.768-140.768-366.88-143.6-503.376-5.696-137.952 136.512-135.136 362.656 5.648 503.424z" />
<glyph unicode="&#xe025;" glyph-name="search-2" data-tags="search-2" d="M411.088 628.672c-65.424-65.472-75.408-164.976-29.872-241.84-1.488-1.392-2.88-2.832-4.304-4.224l-69.664-69.712c-19.904-18.464-19.904-49.76 0-69.664s51.2-19.904 69.664 0l69.712 69.664c1.392 1.44 2.832 2.832 4.224 4.304 76.848-45.552 176.368-35.552 241.84 29.872 76.752 76.8 76.752 201.92-1.488 280.128-78.192 78.24-203.328 78.24-280.112 1.472zM455.104 584.56c52.64 52.64 139.424 52.64 192.016-1.44 54.064-52.592 54.064-139.376 1.44-192.016-52.64-54.032-139.376-52.592-193.456 0-52.576 54.080-54.016 140.832 0 193.456zM0.048 448.048c0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904-283.040 0-512-228.96-512-511.904zM64.032 448.048c0 247.392 200.528 447.936 448.032 447.936 247.392 0 447.936-200.528 447.936-447.936 0-247.472-200.528-448.032-447.936-448.032-247.504 0.016-448.032 200.544-448.032 448.032z" />
<glyph unicode="&#xe026;" glyph-name="user2" data-tags="user" d="M611.568 492.080c0 51.2-29.904 122.304-112.4 122.304s-112.304-56.848-112.304-118.048c0-32.672 15.6-99.536 41.2-127.952 4.272-4.272 29.904-22.768 29.904-32.72 0-14.208-4.272-9.952-9.952-14.208-31.328-71.104-230.4-41.296-230.4-163.552 0-14.208 18.464-28.48 18.464-42.624h557.456v69.616c0 99.632-214.704 65.472-246.048 150.768 56.96 66.88 64.080 99.568 64.080 156.416zM947.136 703.952v-691.104l-870.336 0.016v691.088h870.336zM1023.952 960h-1023.904v-1024h948.528c24.16 0 34.112 8.56 49.808 24.16 17.040 15.744 25.552 38.432 25.552 61.2v938.64z" />
<glyph unicode="&#xe027;" glyph-name="windows" data-tags="windows" d="M947.136 608.688v-595.84l-819.088 0.016v-76.848h824.8c21.296 0 35.552 7.168 49.808 21.344 14.208 14.208 21.296 34.16 21.296 52.64v822h-76.8v-223.312zM819.152 729.552v-588.752h-742.352v588.752h742.352zM896 960h-895.952v-896h824.848c21.296 0 29.824 7.168 44.064 21.392 14.256 14.16 27.040 38.384 27.040 58.272v816.336z" />
<glyph unicode="&#xe028;" glyph-name="note" data-tags="note" d="M947.136 703.952h-870.336v-691.104h870.352l-0.016 691.104zM1023.952 960v-938.624c0-22.768-8.512-45.456-25.552-61.2-15.696-15.6-25.648-24.16-49.808-24.16h-948.544v1023.984h1023.904z" />
<glyph unicode="&#xe029;" glyph-name="east" data-tags="east" d="M989.856 533.408l-416.736 379.696c-45.456 58.32-92.4 58.32-137.952 0v-237.472h-356.912c-42.624 0-78.192-42.672-78.192-96.752v-268.784c0-52.592 34.112-95.264 76.8-95.264h358.304v-226.096c45.552-56.848 92.496-69.712 137.952-12.784l416.72 381.072c45.472 58.336 45.472 118.064 0.016 176.384zM76.864 445.232v153.6h435.104v255.952l460.8-409.552-460.8-409.552v255.936h-435.104v153.616z" />
<glyph unicode="&#xe02a;" glyph-name="north" data-tags="north" d="M426.624 925.824l-379.792-418.112c-58.24-44.064-58.24-91.008 0-136.48h237.568v-356.912c0-42.72 42.592-78.272 96.656-78.272h268.784c52.64 0 95.264 34.16 95.264 76.8v358.384h226.096c56.944 45.456 69.712 92.4 12.864 136.48l-381.168 418.112c-58.32 45.552-118.032 45.552-176.272 0zM514.704 12.848h-153.552v435.152h-256l409.552 460.784 409.648-460.8-256.032 0.016v-435.152h-153.616z" />
<glyph unicode="&#xe02b;" glyph-name="attributes" data-tags="attributes" d="M230.4 588.752v-76.752h307.2v76.752h-307.2zM332.8 435.152v-127.952h460.752v127.952h-460.752zM947.136 793.552v-691.152h-870.336v691.152h870.336zM971.312 870.336h-895.888c-17.088 0-42.624-5.696-55.456-18.464-12.8-14.256-19.92-24.16-19.92-41.248v-715.264c0-17.136 7.12-37.040 19.904-51.296 12.832-12.784 38.384-18.432 55.456-18.432h895.904c17.088 0 21.392 5.648 34.16 18.432 12.784 14.256 18.464 34.16 18.464 51.296l0.016 715.264c0 17.088-5.696 32.72-18.464 45.504-12.784 12.832-17.088 14.208-34.176 14.208z" />
<glyph unicode="&#xe02c;" glyph-name="inventory" data-tags="inventory" d="M947.136 89.6h-870.336v793.552h-1.376c-17.088 0-42.624-5.648-55.456-18.432-12.8-14.256-19.92-24.24-19.92-41.296v-740.88c0-17.136 7.12-37.040 19.904-51.296 12.832-12.784 38.384-18.432 55.456-18.432h895.904c17.088 0 21.392 5.648 34.16 18.432 12.784 14.256 18.464 34.16 18.464 51.296v7.024l-76.8 0.016zM870.352 371.2c0-42.624 34.16-76.8 76.8-76.8 42.72 0 76.8 34.16 76.8 76.8s-34.064 76.8-76.8 76.8c-42.64 0-76.8-34.16-76.8-76.8zM908.784 371.2c0 21.344 17.040 38.384 38.384 38.384s38.384-17.040 38.384-38.384-17.040-38.384-38.384-38.384-38.384 17.056-38.384 38.384zM520.512 642.848c12.832-24.16 38.384-41.248 68.272-41.248 31.28 0 56.848 18.464 69.712 44.064 130.816-28.432 199.072-137.952 233.232-221.84 9.904 11.392 25.552 19.904 41.2 22.768-36.944 82.4-119.44 214.704-268.784 248.864-8.512 34.064-38.384 59.712-75.376 59.712-36.944 0-68.272-27.040-75.376-61.2-170.688-49.76-251.744-258.784-278.736-351.264-32.72-9.904-55.504-38.336-55.504-73.888 0-42.672 34.16-76.8 76.848-76.8 42.592 0 76.752 34.112 76.752 76.8 0 29.872-17.040 55.408-42.672 68.224 31.328 106.704 99.616 264.56 230.432 305.808zM550.368 678.4c0 21.344 17.088 38.384 38.432 38.384 21.296 0 38.384-17.040 38.384-38.384s-17.088-38.384-38.384-38.384c-21.344 0.016-38.432 17.040-38.432 38.384zM217.632 268.848c0 21.296 17.088 38.336 38.432 38.336 21.296 0 38.384-17.040 38.384-38.336 0-21.392-17.088-38.432-38.384-38.432-21.344 0.016-38.432 17.040-38.432 38.432z" />
<glyph unicode="&#xe02d;" glyph-name="mail" data-tags="mail" d="M947.136 752.32v-662.72h-870.336v662.72l386.816-386.816c27.040-27.040 69.712-27.040 96.752 0l386.768 386.816zM119.488 806.4h785.024l-359.824-361.264c-18.464-17.040-46.896-17.040-65.424 0l-359.776 361.264zM971.312 883.152h-895.888c-17.088 0-42.624-5.648-55.456-18.432-12.8-14.256-19.92-24.24-19.92-41.296v-740.88c0-17.136 7.12-37.040 19.904-51.296 12.832-12.784 38.384-18.432 55.456-18.432h895.904c17.088 0 21.392 5.648 34.16 18.432 12.784 14.256 18.464 34.16 18.464 51.296l0.016 740.88c0 17.040-5.696 32.72-18.464 45.504s-17.088 14.224-34.176 14.224z" />
<glyph unicode="&#xe02e;" glyph-name="south" data-tags="south" d="M597.232-29.84l379.696 416.624c58.32 45.552 58.32 92.496 0 138h-237.488v356.944c0 42.72-42.688 78.272-95.264 78.272h-268.832c-54.032 0-96.656-34.16-96.656-76.848v-358.352h-224.704c-58.32-45.504-71.104-92.448-12.832-138l379.728-416.624c58.288-45.552 118.016-45.552 176.352-0.016zM508.992 883.152h153.6v-435.152h256.048l-409.648-460.784-409.504 460.784h256v435.152h153.504z" />
<glyph unicode="&#xe02f;" glyph-name="west" data-tags="west" d="M34.16 362.768l416.672-379.696c45.504-58.32 92.448-58.32 137.952 0v237.472h356.96c42.624 0 78.192 42.72 78.192 96.704v267.392c0 53.984-34.064 96.704-76.8 96.704h-358.336v224.704c-45.504 58.272-92.448 71.104-137.952 12.784l-416.688-379.696c-45.504-58.32-45.504-118.032 0-176.368zM947.136 450.944v-153.6h-435.184v-255.952l-460.704 409.552 460.704 409.552v-255.952h435.2l-0.016-153.6z" />
<glyph unicode="&#xe030;" glyph-name="share" data-tags="share" d="M943.632 883.184v-229.008l76.8-56.848v302.848c0 17.136-5.696 32.72-18.512 45.552-12.784 12.784-17.040 14.256-34.112 14.256h-896c-16.992 0-42.592-5.696-55.36-18.512-12.88-14.256-19.968-24.16-19.968-41.296v-894.464c0-17.040 7.072-36.944 19.952-51.2 12.784-12.784 38.384-18.464 55.36-18.464h896c17.088 0 21.344 5.696 34.112 18.464 12.832 14.256 18.512 34.16 18.512 51.2l0.016 292.944-76.8-56.848v-228.96h-870.352v870.336h870.352zM278.080 396.784h460.704v-128.016l288.72 179.2-288.72 179.184v-127.968h-358.304c-66.848 0-102.4-35.552-102.4-102.4z" />
<glyph unicode="&#xe031;" glyph-name="refresh" data-tags="refresh" d="M922.288 332.832c2.88 8.512 4.272 17.040 5.696 25.6l-75.408 18.464c-1.392-8.512-2.88-17.088-5.696-24.16-52.544-206.24-263.024-331.376-469.264-278.736-204.8 54.032-329.872 264.48-275.904 469.28 52.688 206.224 263.12 331.36 469.312 277.344 115.168-28.48 204.752-108.096 251.696-209.104l-110.88-65.376c-2.88-14.256 4.224-28.432 18.432-31.28l199.104-51.2c14.208-2.88 28.48 4.272 31.328 18.512l51.152 199.072c2.832 14.256-4.224 28.432-18.464 31.28l-103.776-61.104c-56.896 116.56-163.552 208.976-300.064 244.528-247.488 64.048-499.232-85.344-563.216-332.768-63.968-247.472 85.312-499.184 332.816-563.104 247.424-64.080 499.104 85.312 563.136 332.752z" />
<glyph unicode="&#xe032;" glyph-name="navigation" data-tags="navigation" d="M48.384 857.568c-26.992 0-48.336-21.36-48.336-46.96v-8.464c0-25.648 21.344-46.944 48.336-46.944h927.232c27.040 0 48.336 21.296 48.336 46.944v8.464c0 25.6-21.296 46.944-48.336 46.944l-927.232 0.016zM48.384 499.2c-26.992 0-48.336-21.344-48.336-46.944v-8.512c0-25.6 21.344-46.944 48.336-46.944h927.232c27.040 0 48.336 21.344 48.336 46.944v8.512c0 25.6-21.296 46.944-48.336 46.944h-927.232zM48.384 140.8c-26.992 0-48.336-21.28-48.336-46.928v-8.464c0-25.6 21.344-46.944 48.336-46.944l927.232-0.016c27.040 0 48.336 21.344 48.336 46.944v8.464c0 25.648-21.296 46.944-48.336 46.944l-927.232 0.016z" />
<glyph unicode="&#xe033;" glyph-name="on-hold" data-tags="on-hold" d="M512.048 959.952c-283.024 0-512-228.96-512-511.904 0-283.024 228.96-512 512-512 282.944 0 511.904 228.96 511.904 512 0 282.944-228.96 511.904-511.904 511.904zM512.064 0.032c-247.488 0-448.032 200.528-448.032 448.032 0 247.376 200.528 447.936 448.032 447.936 247.408 0 447.936-200.528 447.936-447.936 0-247.488-200.528-448.032-447.936-448.032zM268.512 486.4v-76.784h487.008v76.784h-204.752z" />
<glyph unicode="&#xe034;" glyph-name="external" data-tags="external" d="M307.2 780.56v-153.616h51.248v153.616h-51.248zM230.4 780.56v-153.616h25.648v153.616h-25.648zM435.2 780.56v-153.616h128.048v153.616h-128.048zM179.2 780.56v-153.616h25.648v153.616h-25.648zM819.152 780.56v-153.616h25.648v153.616h-25.648zM742.368 780.56v-153.616h25.616v153.616h-25.616zM614.4 780.56v-153.616h51.152v153.616h-51.152zM947.136 882.96v-358.352l-870.336-0.016v358.368h870.336zM971.312 959.792h-895.888c-17.088 0-42.624-5.728-55.456-18.512-12.8-14.208-19.92-24.208-19.92-41.2v-382.56c0-17.088 7.12-37.040 19.904-51.248 12.832-12.784 38.384-18.464 55.456-18.464h895.904c17.088 0 21.392 5.696 34.16 18.464 12.784 14.208 18.464 34.16 18.464 51.248l0.016 382.56c0 16.992-5.696 32.672-18.464 45.456-12.784 12.784-17.088 14.256-34.176 14.256zM707.648 157.968l-160.688 143.712c-18.464 22.752-36.992 22.752-55.52 0v-102.4l-143.6 0.016c-15.632 0-35.552-15.632-35.552-36.944v-79.664c0-21.36 14.16-36.992 31.28-36.992h147.84v-85.264c18.512-21.392 37.056-35.552 55.52-12.848l160.704 143.664c18.48 21.28 18.48 45.44 0.016 66.72z" />
<glyph unicode="&#xe035;" glyph-name="expand-2" data-tags="expand-2" d="M571.664 837.952h193.632l-210.112-226.96c-26.736-26.72-23.472-80.064 6.64-113.488 29.968-30.064 70.096-33.296 100.048-6.624l210.24 226.848v-180.128h120.256v420.512h-420.704v-120.16zM452.256 386.448c-30.176 30.080-66.944 33.36-93.632 3.376l-206.736-220.32v186.976h-120.272v-420.48h420.672v120.080h-203.584l210.208 223.568c26.704 26.736 23.36 73.504-6.656 106.8z" />
<glyph unicode="&#xe036;" glyph-name="contract-2" data-tags="contract-2" d="M66.272 303.072h193.632l-210.128-226.96c-26.736-26.72-23.472-80.064 6.656-113.472 29.968-30.080 70.080-33.312 100.032-6.624l210.24 226.848v-180.128h120.256v420.496h-420.688v-120.16zM967.616 933.84c-30.192 30.080-66.96 33.36-93.648 3.36l-206.736-220.304v186.976h-120.256v-420.48h420.672v120.064l-203.616-0.016 210.224 223.584c26.72 26.736 23.36 73.52-6.64 106.816z" />
<glyph unicode="&#xe037;" glyph-name="phone" data-tags="phone" d="M251.488-54.704c-32.48 0-63.040 12.528-86.192 35.264l-127.744 112.304c-47.936 47.936-47.936 125.936 0 173.872l84.224 84.272c23.248 23.232 54.128 36 86.96 36 32.848 0 63.712-12.784 86.928-35.984-0.016 0.032-0.032 0.032-0.032 0.032 0.144 0 8.352-6.448 20.32-6.448 12.592 0 21.040 7.152 21.408 7.456l264.448 264.512c-0.016-0.016-0.032-0.032-0.048-0.032-0.112 0 6.464 8.256 6.464 20.32 0 7.664-2.688 13.824-4.928 17.6l-2.080 2.080c-47.936 47.936-47.936 125.936 0 173.872l84.272 84.272c23.216 23.216 54.080 36.016 86.928 36.016 32.48 0 63.040-12.512 86.192-35.264l127.76-112.304c23.248-23.232 36.032-54.112 36.032-86.944s-12.8-63.728-36.032-86.944l-647.92-647.936c-23.232-23.216-54.096-36.016-86.96-36.016zM80.624 137.2l127.632-112.208c23.136-23.12 63.392-23.104 86.512 0l647.936 647.936c11.552 11.552 17.92 26.928 17.92 43.248 0 16.016-6.128 31.136-17.28 42.608l-127.632 112.208c-23.152 23.12-63.392 23.104-86.512 0.016l-84.256-84.272c-11.552-11.552-17.936-26.912-17.936-43.248s6.368-31.696 17.936-43.248l8.048-8.768c7.76-11.312 17.056-29.952 17.072-54.576 0-37.024-21.472-60.8-23.92-63.376l-266.224-266.208c-3.216-3.056-27.008-24.496-63.984-24.496-36.992 0-60.752 21.424-63.328 23.872-12.176 12.176-27.536 18.528-43.872 18.528s-31.712-6.368-43.264-17.936l-84.24-84.24c-23.616-23.616-23.824-61.936-0.608-85.84z" />
<glyph unicode="&#xe038;" glyph-name="user" data-tags="user" d="M1023.952 0.064h-1023.904v29.808c0 12.192 0.448 24.448 0.912 36.688 0.432 11.52 0.88 23.040 0.88 34.56 0 142.928 134.192 179.824 242.016 209.456 67.552 18.56 131.376 36.112 149.376 72.064 3.072 6.112 6.24 12.912 8.64 18.208-3.696 5.024-12.592 14.624-20.592 23.264-4.336 4.672-9.088 9.776-14.192 15.472-24.784 27.456-82.4 104.56-82.4 227.152 0 140.080 83.328 227.088 217.488 227.088 142.896 0 217.632-117.808 217.632-234.208 0-98.752-14.48-159.616-101.472-265.52 28.288-41.776 104.72-60.88 178.88-79.424 106.256-26.576 226.72-56.688 226.72-168.432v-146.176zM60.352 59.648h903.984v86.576c0 60.816-68.592 82.336-181.552 110.592-97.264 24.336-197.808 49.472-227.808 131.104l-6 16.336 11.28 13.248c90.944 106.832 99.952 153.52 99.952 242.112 0 60.4-33.024 174.608-158.032 174.608-137.376 0-157.872-104.944-157.872-167.488 0-101.92 46.88-164.896 67.056-187.248 4.896-5.44 9.488-10.368 13.632-14.848 22.16-23.872 38.144-41.12 38.144-66.432v-6.208l-2.464-5.696c0 0-7.296-16.784-14.144-30.4-29.904-59.648-106.144-80.624-186.864-102.816-119.744-32.912-198.208-61.28-198.208-151.984 0-12.24-0.464-24.544-0.928-36.8-0.064-1.568-0.112-3.104-0.176-4.656z" />
<glyph unicode="&#xe039;" glyph-name="status" data-tags="status" d="M5.264 448.048c0-283.024 228.96-512 511.904-512 283.024 0 512 228.96 512 512 0 282.928-228.96 511.904-512 511.904-282.944 0-511.904-228.96-511.904-511.904zM69.248 448.048c0 247.376 200.528 447.936 447.936 447.936 247.488 0 448.032-200.528 448.032-447.936 0-247.472-200.528-448.032-448.032-448.032-247.408 0.016-447.936 200.544-447.936 448.032z" />
<glyph unicode="&#xe03a;" glyph-name="user-fill" data-tags="user-fill" d="M1023.952 0.064h-1023.904v29.808c0 12.192 0.448 24.448 0.912 36.688 0.432 11.52 0.88 23.040 0.88 34.56 0 142.928 134.192 179.824 242.016 209.456 67.552 18.56 131.376 36.112 149.376 72.064 3.072 6.112 6.24 12.912 8.64 18.208-3.696 5.024-12.592 14.624-20.592 23.264-4.336 4.672-9.088 9.776-14.192 15.472-24.784 27.456-82.4 104.56-82.4 227.152 0 140.080 83.328 227.088 217.488 227.088 142.896 0 217.632-117.808 217.632-234.208 0-98.752-14.48-159.616-101.472-265.52 28.288-41.776 104.72-60.88 178.88-79.424 106.256-26.576 226.72-56.688 226.72-168.432v-146.176z" />
<glyph unicode="&#xe03b;" glyph-name="phone-fill" data-tags="phone-fill" d="M251.488-54.704c-32.48 0-63.040 12.528-86.192 35.264l-127.744 112.304c-47.936 47.936-47.936 125.936 0 173.872l84.224 84.272c23.248 23.232 54.128 36 86.96 36 32.848 0 63.712-12.784 86.928-35.984-0.016 0.032-0.032 0.032-0.032 0.032 0.144 0 8.352-6.448 20.32-6.448 12.592 0 21.040 7.152 21.408 7.456l264.448 264.512c-0.016-0.016-0.032-0.032-0.048-0.032-0.112 0 6.464 8.256 6.464 20.32 0 7.664-2.688 13.824-4.928 17.6l-2.080 2.080c-47.936 47.936-47.936 125.936 0 173.872l84.272 84.272c23.216 23.216 54.080 36.016 86.928 36.016 32.48 0 63.040-12.512 86.192-35.264l127.76-112.304c23.248-23.232 36.032-54.112 36.032-86.944s-12.8-63.728-36.032-86.944l-647.92-647.936c-23.232-23.216-54.096-36.016-86.96-36.016z" />
<glyph unicode="&#xe03c;" glyph-name="status-fill" data-tags="status-fill" d="M5.264 448.048c0-283.024 228.96-512 511.904-512 283.024 0 512 228.96 512 512 0 282.928-228.96 511.904-512 511.904-282.944 0-511.904-228.96-511.904-511.904z" />
<glyph unicode="&#xe03d;" glyph-name="woo" data-tags="woo" d="M612.192 533.664c0 6.896-3.136 51.6-28 51.6-37.36 0-46.704-72.256-46.704-82.624 0-3.408 3.152-58.496 28.032-58.496 34.192 0.032 46.672 72.288 46.672 89.52zM814.384 533.664c0 6.896-3.152 51.6-28.032 51.6-37.28 0-46.608-72.256-46.608-82.624 0-3.408 3.072-58.496 27.952-58.496 34.192 0.032 46.688 72.288 46.688 89.52zM141.296 959.232c-68.224 0-123.504-55.488-123.504-123.92v-650.72c0-68.432 55.296-123.92 123.504-123.92h339.808l123.504-123.936v123.936h278.048c68.224 0 123.52 55.472 123.52 123.92v650.72c0 68.432-55.296 123.92-123.52 123.92h-741.36zM668.16 537.072c0-55.088-31.088-154.88-102.64-154.88-6.208 0-18.496 3.616-25.424 6.016-32.512 11.168-50.192 49.696-52.352 66.256 0 0-3.072 17.792-3.072 40.752 0 22.992 3.072 45.328 3.072 45.328 15.552 75.728 43.552 106.736 96.448 106.736 59.072 0.032 83.968-58.528 83.968-110.208zM486.496 657.6c0-3.392-43.552-141.168-43.552-213.424v-75.712c-2.592-12.080-4.16-24.144-21.824-24.144-46.608 0-88.88 151.472-92.016 161.84-6.208-6.896-62.24-161.84-96.448-161.84-24.864 0-43.552 113.648-46.608 123.936-9.344 55.072-26.048 157.52-26.048 164.416 0 20.672 1.152 38.736 26.048 38.736 6.208 0 21.6-6.064 23.712-17.168 11.648-62.032 16.688-120.512 29.168-185.968 1.856-2.928 1.504-7.008 4.56-10.432 3.152 10.288 66.928 168.784 94.96 168.784 22.544 0 30.4-44.592 33.536-61.824 6.208-20.656 13.088-55.216 22.416-82.752 0 13.776 12.48 203.12 65.392 203.12 18.592-0.032 26.704-6.928 26.704-27.568zM870.32 537.072c0-55.088-31.088-154.88-102.64-154.88-6.192 0-18.448 3.616-25.424 6.016-32.432 11.168-50.176 49.696-52.288 66.256 0 0-3.888 17.92-3.888 40.896s3.888 45.184 3.888 45.184c15.552 75.728 43.488 106.736 96.384 106.736 59.104 0.032 83.968-58.528 83.968-110.208z" />
<glyph unicode="&#xe600;" glyph-name="coupon" data-tags="coupon" d="M944.946 804.152v-131.514c-92.58-32.661-159.103-121.022-159.103-224.631s66.523-191.985 159.103-224.631v-131.514h-865.988v131.514c92.58 32.661 159.103 121.022 159.103 224.631s-66.523 191.985-159.103 224.631v131.514h865.988zM991.765 883.159h-959.626c-17.776 0-32.187-14.032-32.187-31.35v-244.714c87.871 0 159.103-71.232 159.103-159.103s-71.232-159.087-159.103-159.087v-244.714c0-17.318 14.411-31.35 32.187-31.35h959.626c17.776 0 32.187 14.032 32.187 31.35v244.714c-87.871 0-159.103 71.232-159.103 159.103s71.232 159.103 159.103 159.103v244.698c0 17.318-14.411 31.35-32.187 31.35v0z" />
<glyph unicode="&#xe601;" glyph-name="limit" data-tags="limit" d="M873.967 809.999c-200.139 200.139-523.906 200.107-724.045-0.032-200.075-200.060-200.107-523.827 0.032-723.966 200.091-200.091 523.922-200.123 723.997-0.047 200.139 200.123 200.107 523.954 0.016 724.045zM828.697 131.209c-174.936-174.936-458.552-174.92-633.504 0.032-174.999 174.983-174.936 458.536-0.016 633.472 174.999 174.999 458.552 175.046 633.551 0.047 174.951-174.951 174.967-458.568-0.032-633.551zM286.603 538.596l58.338-58.338-131.688-5.072c-16.101 0-31.192-17.050-32.187-36.153-0.032-18.108 11.077-31.176 28.158-32.14l131.688 5.009-54.277-54.277 36.248-36.248 126.679 126.679-126.742 126.742-36.216-36.201zM815.819 486.326l-128.685-4.077 56.331 56.331-36.232 36.232-126.679-126.679 126.758-126.758 36.169 36.169-61.34 61.34 130.692 4.045c16.101 0 29.217 15.106 30.196 34.162-0.032 18.171-10.113 30.212-27.21 29.232zM488.259 703.972h47.404v-511.945h-47.404v511.945z" />
<glyph unicode="&#xe602;" glyph-name="restricted" data-tags="restricted" d="M511.992 959.937c-283.016 0-511.976-228.96-511.976-511.897 0-283.032 228.96-511.992 511.976-511.992 282.937 0 511.897 228.96 511.897 511.992 0 282.937-228.96 511.897-511.897 511.897zM63.979 448.055c0 247.369 200.534 447.934 448.029 447.934 109.866 0 210.441-39.614 288.357-105.252l-631.102-631.134c-65.654 77.932-105.284 178.538-105.284 288.452zM512.024 0.011c-109.913 0-210.52 39.614-288.468 105.284l631.134 631.134c65.638-77.932 105.268-178.491 105.268-288.373 0-247.479-200.549-448.044-447.934-448.044z" />
<glyph unicode="&#xe603;" glyph-name="edit" data-tags="edit" d="M999.966 815.419l-120.121 120.121c-31.84 31.84-83.478 31.84-115.318 0l-678.648-678.632-85.832-320.339 320.339 85.832 0.948-0.948 678.648 678.648c31.84 31.84 31.84 83.478-0.016 115.318zM107.401 93.617l34.162 127.5 143.049-143.049-127.5-34.162-49.711 49.711zM827.891 617.176l-146.304 146.304 120.184 120.184 146.304-146.304-120.184-120.184z" />
<glyph unicode="&#xe604;" glyph-name="ccv" data-tags="ccv" d="M688.988 466.963h169.086v-72.691h-169.086v72.691zM894.42 133.531h-820.148v420.346h434.568c15.802 33.185 36.346 63.21 61.63 86.914h-496.198v120.099h820.148v-66.37c26.864-12.642 50.568-28.444 72.691-47.407v109.037c0 22.123-9.481 39.506-25.284 55.309-15.802 14.222-25.284 22.123-47.407 22.123h-802.765c-22.123 0-50.568-7.901-66.37-22.123s-23.704-31.605-23.704-53.728v-616.296c0-22.123 7.901-42.667 23.704-56.889s44.247-22.123 66.37-22.123h804.346c22.123 0 31.605 7.901 47.407 22.123s23.704 36.346 23.704 56.889v71.111c-22.123-18.963-45.827-34.765-72.691-47.407v-31.605zM774.321 678.716c-137.481 0-248.099-110.617-248.099-248.099s110.617-248.099 248.099-248.099 248.099 110.617 248.099 248.099-112.198 248.099-248.099 248.099zM584.691 430.617c0 104.296 85.333 189.63 189.63 189.63s189.63-85.333 189.63-189.63-85.333-189.63-189.63-189.63-189.63 85.333-189.63 189.63zM224.395 466.963v-72.691h259.16c-1.58 12.642-3.16 23.704-3.16 36.346s1.58 23.704 3.16 36.346h-259.16z" />
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 49 KiB

BIN
assets/fonts/WooCommerce.ttf Normal file → Executable file

Binary file not shown.

BIN
assets/fonts/WooCommerce.woff Normal file → Executable file

Binary file not shown.

View File

@ -71,7 +71,9 @@ jQuery( function ( $ ) {
$state.replaceWith( '<input type="text" class="js_field-state" name="' + input_name + '" id="' + input_id + '" value="' + value + '" placeholder="' + placeholder + '" />' );
}
// This event has a typo - deprecated in 2.5.0
$( document.body ).trigger( 'contry-change.woocommerce', [country, $( this ).closest( 'div' )] );
$( document.body ).trigger( 'country-change.woocommerce', [country, $( this ).closest( 'div' )] );
},
change_state: function() {
@ -521,20 +523,20 @@ jQuery( function ( $ ) {
if ( window.confirm( woocommerce_admin_meta_boxes.calc_line_taxes ) ) {
wc_meta_boxes_order_items.block();
var shipping_country = $( '#_shipping_country' ).val();
var billing_country = $( '#_billing_country' ).val();
var country = woocommerce_admin_meta_boxes.base_country;
var country = '';
var state = '';
var postcode = '';
var city = '';
if ( shipping_country ) {
country = shipping_country;
if ( 'shipping' === woocommerce_admin_meta_boxes.tax_based_on ) {
country = $( '#_shipping_country' ).val();
state = $( '#_shipping_state' ).val();
postcode = $( '#_shipping_postcode' ).val();
city = $( '#_shipping_city' ).val();
} else if ( billing_country ) {
country = billing_country;
}
if ( 'billing' === woocommerce_admin_meta_boxes.tax_based_on || ! country ) {
country = $( '#_billing_country' ).val();
state = $( '#_billing_state' ).val();
postcode = $( '#_billing_postcode' ).val();
city = $( '#_billing_city' ).val();

File diff suppressed because one or more lines are too long

View File

@ -109,7 +109,7 @@ jQuery( function( $ ) {
// Init TipTip
$( '#tiptip_holder' ).removeAttr( 'style' );
$( '#tiptip_arrow' ).removeAttr( 'style' );
$( '.woocommerce_variations .tips', wrapper ).tipTip({
$( '.woocommerce_variations .tips, .woocommerce_variations .help_tip, .woocommerce_variations .woocommerce-help-tip', wrapper ).tipTip({
'attribute': 'data-tip',
'fadeIn': 50,
'fadeOut': 50,

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,418 @@
/* global htmlSettingsTaxLocalizeScript, ajaxurl */
/**
* Used by woocommerce/includes/admin/settings/views/html-settings-tax.php
*/
(function($, data, wp, ajaxurl){
$(function() {
if ( ! String.prototype.trim ) {
String.prototype.trim = function () {
return this.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '' );
};
}
var rowTemplate = wp.template( 'wc-tax-table-row' ),
rowTemplateEmpty = wp.template( 'wc-tax-table-row-empty' ),
paginationTemplate = wp.template( 'wc-tax-table-pagination' ),
$table = $( '.wc_tax_rates' ),
$tbody = $( '#rates' ),
$save_button = $( 'input[name="save"]' ),
$pagination = $( '#rates-pagination' ),
$search_field = $( '#rates-search .wc-tax-rates-search-field' ),
$submit = $( '.submit .button-primary[type=submit]' ),
WCTaxTableModelConstructor = Backbone.Model.extend({
changes : {},
setRateAttribute : function( rateID, attribute, value ) {
var rates = _.indexBy( this.get( 'rates' ), 'tax_rate_id' ),
changes = {};
if ( rates[ rateID ][ attribute ] !== value ) {
changes[ rateID ] = {};
changes[ rateID ][ attribute ] = value;
rates[ rateID ][ attribute ] = value;
}
this.logChanges( changes );
},
logChanges : function( changedRows ) {
var changes = this.changes || {};
_.each( changedRows, function( row, id ) {
changes[ id ] = _.extend( changes[ id ] || { tax_rate_id : id }, row );
} );
this.changes = changes;
this.trigger( 'change:rates' );
},
getFilteredRates : function() {
var rates = this.get( 'rates' ),
search = $search_field.val().toLowerCase();
if ( search.length ) {
rates = _.filter( rates, function( rate ) {
var search_text = _.toArray( rate ).join( ' ' ).toLowerCase();
return ( -1 !== search_text.indexOf( search ) );
} );
}
rates = _.sortBy( rates, function( rate ) {
return parseInt( rate.tax_rate_order, 10 );
} );
return rates;
},
save : function() {
$.post( ajaxurl + '?action=woocommerce_tax_rates_save_changes', {
current_class : data.current_class,
wc_tax_nonce : data.wc_tax_nonce,
changes : this.changes
}, this.onSaveResponse, 'json' );
},
onSaveResponse : function( response, textStatus ) {
if ( 'success' === textStatus ) {
WCTaxTableModelInstance.set( 'rates', response.data.rates );
WCTaxTableModelInstance.trigger( 'change:rates' );
WCTaxTableModelInstance.changes = {};
WCTaxTableModelInstance.trigger( 'saved:rates' );
}
}
} ),
WCTaxTableViewConstructor = Backbone.View.extend({
rowTemplate : rowTemplate,
per_page : data.limit,
page : data.page,
initialize : function() {
this.qty_pages = Math.ceil( _.toArray( this.model.get( 'rates' ) ).length / this.per_page );
this.page = this.sanitizePage( data.page );
this.listenTo( this.model, 'change:rates', this.setUnloadConfirmation );
this.listenTo( this.model, 'saved:rates', this.clearUnloadConfirmation );
$tbody.on( 'change', { view : this }, this.updateModelOnChange );
$tbody.on( 'sortupdate', { view : this }, this.updateModelOnSort );
$search_field.on( 'keyup search', { view : this }, this.onSearchField );
$pagination.on( 'click', 'a', { view : this }, this.onPageChange );
$pagination.on( 'change', 'input', { view : this }, this.onPageChange );
$(window).on( 'beforeunload', { view : this }, this.unloadConfirmation );
$submit.on( 'click', { view : this }, this.onSubmit );
$save_button.attr('disabled','disabled');
// Can bind these directly to the buttons, as they won't get overwritten.
$table.find('.insert').on( 'click', { view : this }, this.onAddNewRow );
$table.find('.remove_tax_rates').on( 'click', { view : this }, this.onDeleteRow );
$table.find('.export').on( 'click', { view : this }, this.onExport );
},
render : function() {
var rates = this.model.getFilteredRates(),
qty_rates = _.size( rates ),
qty_pages = Math.ceil( qty_rates / this.per_page ),
first_index = this.per_page * ( this.page - 1),
last_index = this.per_page * this.page,
paged_rates = _.toArray( rates ).slice( first_index, last_index ),
view = this;
// Blank out the contents.
this.$el.empty();
if ( paged_rates.length ) {
// Populate $tbody with the current page of results.
$.each( paged_rates, function ( id, rowData ) {
view.$el.append( view.rowTemplate( rowData ) );
} );
} else {
view.$el.append( rowTemplateEmpty() );
}
// Initialize autocomplete for countries.
this.$el.find( 'td.country input' ).autocomplete({
source: data.countries,
minLength: 2
});
// Initialize autocomplete for states.
this.$el.find( 'td.state input' ).autocomplete({
source: data.states,
minLength: 3
});
// Postcode and city don't have `name` values by default. They're only created if the contents changes, to save on database queries (I think)
this.$el.find( 'td.postcode input, td.city input' ).change(function() {
$(this).attr( 'name', $(this).data( 'name' ) );
});
if ( qty_pages > 1 ) {
// We've now displayed our initial page, time to render the pagination box.
$pagination.html( paginationTemplate( {
qty_rates : qty_rates,
current_page : this.page,
qty_pages : qty_pages
} ) );
}
// Disable sorting if there is a search term filtering the items.
if ( $search_field.val() ) {
$tbody.sortable( 'disable' );
} else {
$tbody.sortable( 'enable' );
}
},
updateUrl : function() {
if ( ! window.history.replaceState ) {
return;
}
var url = data.base_url,
search = $search_field.val();
if ( 1 < this.page ) {
url += '&p=' + encodeURIComponent( this.page );
}
if ( search.length ) {
url += '&s=' + encodeURIComponent( search );
}
window.history.replaceState( {}, '', url );
},
onSubmit : function( event ) {
event.data.view.model.save();
event.preventDefault();
},
onAddNewRow : function( event ) {
var view = event.data.view,
model = view.model,
rates = _.indexBy( model.get('rates'), 'tax_rate_id' ),
changes = {},
size = _.size( rates ),
newRow = _.extend( {}, data.default_rate, {
tax_rate_id : 'new-' + size + '-' + Date.now(),
newRow : true
} ),
$current, current_id, current_order, rates_to_reorder, reordered_rates;
$current = $tbody.children( '.current' );
if ( $current.length ) {
current_id = $current.last().data( 'id' );
current_order = parseInt( rates[ current_id ].tax_rate_order, 10 );
newRow.tax_rate_order = 1 + current_order;
rates_to_reorder = _.filter( rates, function( rate ) {
if ( parseInt( rate.tax_rate_order, 10 ) > current_order ) {
return true;
}
return false;
} );
reordered_rates = _.map( rates_to_reorder, function( rate ) {
rate.tax_rate_order++;
changes[ rate.tax_rate_id ] = _.extend( changes[ rate.tax_rate_id ] || {}, { tax_rate_order : rate.tax_rate_order } );
return rate;
} );
} else {
newRow.tax_rate_order = 1 + _.max(
_.pluck( rates, 'tax_rate_order' ),
function ( val ) {
// Cast them all to integers, because strings compare funky. Sighhh.
return parseInt( val, 10 );
}
);
}
rates[ newRow.tax_rate_id ] = newRow;
changes[ newRow.tax_rate_id ] = newRow;
model.set( 'rates', rates );
model.logChanges( changes );
view.render();
},
onDeleteRow : function( event ) {
var view = event.data.view,
model = view.model,
rates = _.indexBy( model.get('rates'), 'tax_rate_id' ),
changes = {},
$current, current_id, current_order, rates_to_reorder, reordered_rates;
event.preventDefault();
if ( $current = $tbody.children( '.current' ) ) {
$current.each(function(){
current_id = $( this ).data('id');
current_order = parseInt( rates[ current_id ].tax_rate_order, 10 );
rates_to_reorder = _.filter( rates, function( rate ) {
if ( parseInt( rate.tax_rate_order, 10 ) > current_order ) {
return true;
}
return false;
} );
reordered_rates = _.map( rates_to_reorder, function( rate ) {
rate.tax_rate_order--;
changes[ rate.tax_rate_id ] = _.extend( changes[ rate.tax_rate_id ] || {}, { tax_rate_order : rate.tax_rate_order } );
return rate;
} );
delete rates[ current_id ];
changes[ current_id ] = _.extend( changes[ current_id ] || {}, { deleted : 'deleted' } );
});
model.set( 'rates', rates );
model.logChanges( changes );
view.render();
} else {
window.alert( data.strings.no_rows_selected );
}
},
onSearchField : function( event ){
event.data.view.updateUrl();
event.data.view.render();
},
onPageChange : function( event ) {
var $target = $( event.currentTarget );
event.preventDefault();
event.data.view.page = $target.data('goto') ? $target.data('goto') : $target.val();
event.data.view.render();
event.data.view.updateUrl();
},
onExport : function( event ) {
var csv_data = 'data:application/csv;charset=utf-8,' + data.strings.csv_data_cols.join(',') + '\n';
$.each( event.data.view.model.getFilteredRates(), function( id, rowData ) {
var row = '';
row += rowData.tax_rate_country + ',';
row += rowData.tax_rate_state + ',';
row += ( rowData.postcode ? rowData.postcode.join( '; ' ) : '' ) + ',';
row += ( rowData.city ? rowData.city.join( '; ' ) : '' ) + ',';
row += rowData.tax_rate + ',';
row += rowData.tax_rate_name + ',';
row += rowData.tax_rate_priority + ',';
row += rowData.tax_rate_compound + ',';
row += rowData.tax_rate_shipping + ',';
row += data.current_class;
csv_data += row + '\n';
});
$(this).attr( 'href', encodeURI( csv_data ) );
return true;
},
setUnloadConfirmation : function() {
this.needsUnloadConfirm = true;
$save_button.removeAttr('disabled');
},
clearUnloadConfirmation : function() {
this.needsUnloadConfirm = false;
$save_button.attr('disabled','disabled');
},
unloadConfirmation : function(event) {
if ( event.data.view.needsUnloadConfirm ) {
event.returnValue = data.strings.unload_confirmation_msg;
window.event.returnValue = data.strings.unload_confirmation_msg;
return data.strings.unload_confirmation_msg;
}
},
updateModelOnChange : function( event ) {
var model = event.data.view.model,
$target = $( event.target ),
id = $target.closest('tr').data('id'),
attribute = $target.data('attribute'),
val = $target.val();
if ( 'city' === attribute || 'postcode' === attribute ) {
val = val.split(';');
val = $.map( val, function( thing ) {
return thing.trim();
});
}
if ( 'tax_rate_compound' === attribute || 'tax_rate_shipping' === attribute ) {
if ( $target.is(':checked') ) {
val = 1;
} else {
val = 0;
}
}
model.setRateAttribute( id, attribute, val );
},
updateModelOnSort : function( event, ui ) {
var view = event.data.view,
model = view.model,
$tr = ui.item,
tax_rate_id = $tr.data( 'id' ),
rates = _.indexBy( model.get('rates'), 'tax_rate_id' ),
old_position = rates[ tax_rate_id ].tax_rate_order,
new_position = $tr.index() + ( ( view.page - 1 ) * view.per_page ),
which_way = ( new_position > old_position ) ? 'higher' : 'lower',
changes = {},
rates_to_reorder, reordered_rates;
rates_to_reorder = _.filter( rates, function( rate ) {
var order = parseInt( rate.tax_rate_order, 10 ),
limits = [ old_position, new_position ];
if ( parseInt( rate.tax_rate_id, 10 ) === parseInt( tax_rate_id, 10 ) ) {
return true;
} else if ( order > _.min( limits ) && order < _.max( limits ) ) {
return true;
} else if ( 'higher' === which_way && order === _.max( limits ) ) {
return true;
} else if ( 'lower' === which_way && order === _.min( limits ) ) {
return true;
}
return false;
} );
reordered_rates = _.map( rates_to_reorder, function( rate ) {
var order = parseInt( rate.tax_rate_order, 10 );
if ( parseInt( rate.tax_rate_id, 10 ) === parseInt( tax_rate_id, 10 ) ) {
rate.tax_rate_order = new_position;
} else if ( 'higher' === which_way ) {
rate.tax_rate_order = order - 1;
} else if ( 'lower' === which_way ) {
rate.tax_rate_order = order + 1;
}
changes[ rate.tax_rate_id ] = _.extend( changes[ rate.tax_rate_id ] || {}, { tax_rate_order : rate.tax_rate_order } );
return rate;
} );
if ( reordered_rates.length ) {
model.logChanges( changes );
view.render(); // temporary, probably should get yanked.
}
},
sanitizePage : function( page_num ) {
page_num = parseInt( page_num, 10 );
if ( page_num < 1 ) {
page_num = 1;
} else if ( page_num > this.qty_pages ) {
page_num = this.qty_pages;
}
return page_num;
}
} ),
WCTaxTableModelInstance = new WCTaxTableModelConstructor({
rates : data.rates
} ),
WCTaxTableInstance = new WCTaxTableViewConstructor({
model : WCTaxTableModelInstance,
// page : data.page, // I'd prefer to have these two specified down here in the instance,
// per_page : data.limit, // but it doesn't seem to recognize them in render if I do. :\
el : '#rates'
} );
WCTaxTableInstance.render();
});
})(jQuery, htmlSettingsTaxLocalizeScript, wp, ajaxurl);

File diff suppressed because one or more lines are too long

View File

@ -62,7 +62,9 @@ jQuery( function ( $ ) {
$state.replaceWith( '<input type="text" class="js_field-state" name="' + input_name + '" id="' + input_id + '" value="' + value + '" />' );
}
// This event has a typo - deprecated in 2.5.0
$( document.body ).trigger( 'contry-change.woocommerce', [country, $( this ).closest( 'div' )] );
$( document.body ).trigger( 'country-change.woocommerce', [country, $( this ).closest( 'div' )] );
},
change_state: function() {

View File

@ -1 +1 @@
jQuery(function(a){var b={states:null,init:function(){"undefined"!=typeof wc_users_params.countries&&(this.states=a.parseJSON(wc_users_params.countries.replace(/&quot;/g,'"'))),a(".js_field-country").select2().change(this.change_country),a(".js_field-country").trigger("change",[!0]),a(document.body).on("change","select.js_field-state",this.change_state)},change_country:function(c,d){if("undefined"==typeof d&&(d=!1),null!==b.states){var e=a(this),f=e.val(),g=e.parents(".form-table").find(":input.js_field-state"),h=g.parent(),i=g.attr("name"),j=g.attr("id"),k=e.data("woocommerce.stickState-"+f)?e.data("woocommerce.stickState-"+f):g.val();if(d&&e.data("woocommerce.stickState-"+f,k),h.show().find(".select2-container").remove(),a.isEmptyObject(b.states[f]))g.replaceWith('<input type="text" class="js_field-state" name="'+i+'" id="'+j+'" value="'+k+'" />');else{var l=a('<select name="'+i+'" id="'+j+'" class="js_field-state" style="width: 25em;"></select>'),m=b.states[f];l.append(a('<option value="">'+wc_users_params.i18n_select_state_text+"</option>")),a.each(m,function(b){l.append(a('<option value="'+b+'">'+m[b]+"</option>"))}),l.val(k),g.replaceWith(l),l.show().select2().hide().change()}a(document.body).trigger("contry-change.woocommerce",[f,a(this).closest("div")])}},change_state:function(){var b=a(this),c=b.val(),d=b.parents(".form-table").find(":input.js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)}};b.init()});
jQuery(function(a){var b={states:null,init:function(){"undefined"!=typeof wc_users_params.countries&&(this.states=a.parseJSON(wc_users_params.countries.replace(/&quot;/g,'"'))),a(".js_field-country").select2().change(this.change_country),a(".js_field-country").trigger("change",[!0]),a(document.body).on("change","select.js_field-state",this.change_state)},change_country:function(c,d){if("undefined"==typeof d&&(d=!1),null!==b.states){var e=a(this),f=e.val(),g=e.parents(".form-table").find(":input.js_field-state"),h=g.parent(),i=g.attr("name"),j=g.attr("id"),k=e.data("woocommerce.stickState-"+f)?e.data("woocommerce.stickState-"+f):g.val();if(d&&e.data("woocommerce.stickState-"+f,k),h.show().find(".select2-container").remove(),a.isEmptyObject(b.states[f]))g.replaceWith('<input type="text" class="js_field-state" name="'+i+'" id="'+j+'" value="'+k+'" />');else{var l=a('<select name="'+i+'" id="'+j+'" class="js_field-state" style="width: 25em;"></select>'),m=b.states[f];l.append(a('<option value="">'+wc_users_params.i18n_select_state_text+"</option>")),a.each(m,function(b){l.append(a('<option value="'+b+'">'+m[b]+"</option>"))}),l.val(k),g.replaceWith(l),l.show().select2().hide().change()}a(document.body).trigger("contry-change.woocommerce",[f,a(this).closest("div")]),a(document.body).trigger("country-change.woocommerce",[f,a(this).closest("div")])}},change_state:function(){var b=a(this),c=b.val(),d=b.parents(".form-table").find(":input.js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)}};b.init()});

View File

@ -88,7 +88,7 @@ jQuery( function ( $ ) {
'fadeOut': 50,
'delay': 200
};
$( '.tips, .help_tip' ).tipTip( tiptip_args );
$( '.tips, .help_tip, .woocommerce-help-tip' ).tipTip( tiptip_args );
// Add tiptip to parent element for widefat tables
$( '.parent-tips' ).each( function() {
@ -147,7 +147,7 @@ jQuery( function ( $ ) {
$this_row.addClass( 'selected_now' ).addClass( 'current' );
if ( $( 'tr.last_selected', $this_table ).size() > 0 ) {
if ( $this_row.index() > $( 'tr.last_selected, $this_table' ).index() ) {
if ( $this_row.index() > $( 'tr.last_selected', $this_table ).index() ) {
$( 'tr', $this_table ).slice( $( 'tr.last_selected', $this_table ).index(), $this_row.index() ).addClass( 'current' );
} else {
$( 'tr', $this_table ).slice( $this_row.index(), $( 'tr.last_selected', $this_table ).index() + 1 ).addClass( 'current' );
@ -221,4 +221,18 @@ jQuery( function ( $ ) {
// Attribute term table
$( 'table.attributes-table tbody tr:nth-child(odd)' ).addClass( 'alternate' );
// Add js validation for product quick edit panel.
$( '#woocommerce-fields .regular_price[type=text], #woocommerce-fields .sale_price[type=text]' ).keyup( function() {
var value = $( this ).val();
var regex = new RegExp( '[^\-0-9\%\\' + woocommerce_admin.mon_decimal_point + ']+', 'gi' );
var newvalue = value.replace( regex, '' );
if ( value !== newvalue ) {
$( this ).val( newvalue );
$( document.body ).triggerHandler( 'wc_add_error_tip', [ $( this ), 'i18n_mon_decimal_error' ] );
} else {
$( document.body ).triggerHandler( 'wc_remove_error_tip', [ $( this ), 'i18n_mon_decimal_error' ] );
}
});
});

File diff suppressed because one or more lines are too long

View File

@ -140,6 +140,9 @@
$( this ).blur();
}
// added to get around variation image flicker issue
$( '.product.has-default-attributes > .images' ).fadeTo( 200, 1 );
// Custom event for when variation selection has been changed
$form.trigger( 'woocommerce_variation_has_changed' );
} )

File diff suppressed because one or more lines are too long

View File

@ -98,7 +98,7 @@ jQuery( function( $ ) {
}
}
if ( 'postcode' === key ) {
if ( 'postcode' === key || 'city' === key ) {
if ( locale['default'][ key ].label ) {
field.find( 'label' ).html( locale['default'][ key ].label );
}

View File

@ -1 +1 @@
jQuery(function(a){function b(a,b){b?(a.find("label").append(' <abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>'),a.addClass("validate-required")):(a.find("label abbr").remove(),a.removeClass("validate-required"))}if("undefined"==typeof wc_address_i18n_params)return!1;var c=wc_address_i18n_params.locale.replace(/&quot;/g,'"'),d=a.parseJSON(c);a(document.body).bind("country_to_state_changing",function(c,e,f){var g,h=f;g="undefined"!=typeof d[e]?d[e]:d["default"];var i=h.find("#billing_postcode_field, #shipping_postcode_field"),j=h.find("#billing_city_field, #shipping_city_field"),k=h.find("#billing_state_field, #shipping_state_field");i.attr("data-o_class")||(i.attr("data-o_class",i.attr("class")),j.attr("data-o_class",j.attr("class")),k.attr("data-o_class",k.attr("class"))),g.postcode_before_city?(i.add(j).add(k).removeClass("form-row-first form-row-last").addClass("form-row-first"),j.removeClass("form-row-wide form-row-first").addClass("form-row-last"),i.insertBefore(j)):(i.attr("class",i.attr("data-o_class")),j.attr("class",j.attr("data-o_class")),k.attr("class",k.attr("data-o_class")),i.insertAfter(k));var l=a.parseJSON(wc_address_i18n_params.locale_fields);a.each(l,function(a,c){var e=h.find(c);g[a]?(g[a].label&&e.find("label").html(g[a].label),g[a].placeholder&&e.find("input").attr("placeholder",g[a].placeholder),b(e,!1),"undefined"==typeof g[a].required&&d["default"][a].required===!0?b(e,!0):g[a].required===!0&&b(e,!0),"state"!==a&&(g[a].hidden===!0?e.hide().find("input").val(""):e.show())):d["default"][a]&&("state"!==a&&("undefined"==typeof d["default"][a].hidden||d["default"][a].hidden===!1?e.show():d["default"][a].hidden===!0&&e.hide().find("input").val("")),"postcode"===a&&(d["default"][a].label&&e.find("label").html(d["default"][a].label),d["default"][a].placeholder&&e.find("input").attr("placeholder",d["default"][a].placeholder)),d["default"][a].required===!0&&0===e.find("label abbr").size()&&b(e,!0))})})});
jQuery(function(a){function b(a,b){b?(a.find("label").append(' <abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>'),a.addClass("validate-required")):(a.find("label abbr").remove(),a.removeClass("validate-required"))}if("undefined"==typeof wc_address_i18n_params)return!1;var c=wc_address_i18n_params.locale.replace(/&quot;/g,'"'),d=a.parseJSON(c);a(document.body).bind("country_to_state_changing",function(c,e,f){var g,h=f;g="undefined"!=typeof d[e]?d[e]:d["default"];var i=h.find("#billing_postcode_field, #shipping_postcode_field"),j=h.find("#billing_city_field, #shipping_city_field"),k=h.find("#billing_state_field, #shipping_state_field");i.attr("data-o_class")||(i.attr("data-o_class",i.attr("class")),j.attr("data-o_class",j.attr("class")),k.attr("data-o_class",k.attr("class"))),g.postcode_before_city?(i.add(j).add(k).removeClass("form-row-first form-row-last").addClass("form-row-first"),j.removeClass("form-row-wide form-row-first").addClass("form-row-last"),i.insertBefore(j)):(i.attr("class",i.attr("data-o_class")),j.attr("class",j.attr("data-o_class")),k.attr("class",k.attr("data-o_class")),i.insertAfter(k));var l=a.parseJSON(wc_address_i18n_params.locale_fields);a.each(l,function(a,c){var e=h.find(c);g[a]?(g[a].label&&e.find("label").html(g[a].label),g[a].placeholder&&e.find("input").attr("placeholder",g[a].placeholder),b(e,!1),"undefined"==typeof g[a].required&&d["default"][a].required===!0?b(e,!0):g[a].required===!0&&b(e,!0),"state"!==a&&(g[a].hidden===!0?e.hide().find("input").val(""):e.show())):d["default"][a]&&("state"!==a&&("undefined"==typeof d["default"][a].hidden||d["default"][a].hidden===!1?e.show():d["default"][a].hidden===!0&&e.hide().find("input").val("")),("postcode"===a||"city"===a)&&(d["default"][a].label&&e.find("label").html(d["default"][a].label),d["default"][a].placeholder&&e.find("input").attr("placeholder",d["default"][a].placeholder)),d["default"][a].required===!0&&0===e.find("label abbr").size()&&b(e,!0))})})});

View File

@ -10,13 +10,27 @@ jQuery( function( $ ) {
var $supports_html5_storage;
try {
$supports_html5_storage = ( 'sessionStorage' in window && window.sessionStorage !== null );
window.sessionStorage.setItem( 'wc', 'test' );
window.sessionStorage.removeItem( 'wc' );
} catch( err ) {
$supports_html5_storage = false;
}
/* Cart session creation time to base expiration on */
function set_cart_creation_timestamp() {
if ( $supports_html5_storage ) {
sessionStorage.setItem( 'wc_cart_created', ( new Date() ).getTime() );
}
}
/** Set the cart hash in both session and local storage */
function set_cart_hash( cart_hash ) {
if ( $supports_html5_storage ) {
localStorage.setItem( 'wc_cart_hash', cart_hash );
sessionStorage.setItem( 'wc_cart_hash', cart_hash );
}
}
var $fragment_refresh = {
url: wc_cart_fragments_params.wc_ajax_url.toString().replace( '%%endpoint%%', 'get_refreshed_fragments' ),
type: 'POST',
@ -29,7 +43,11 @@ jQuery( function( $ ) {
if ( $supports_html5_storage ) {
sessionStorage.setItem( wc_cart_fragments_params.fragment_name, JSON.stringify( data.fragments ) );
sessionStorage.setItem( 'wc_cart_hash', data.cart_hash );
set_cart_hash( data.cart_hash );
if ( data.cart_hash ) {
set_cart_creation_timestamp();
}
}
$( document.body ).trigger( 'wc_fragments_refreshed' );
@ -37,18 +55,45 @@ jQuery( function( $ ) {
}
};
/* Named callback for refreshing cart fragment */
function refresh_cart_fragment() {
$.ajax( $fragment_refresh );
}
/* Cart Handling */
if ( $supports_html5_storage ) {
var cart_timeout = null,
day_in_ms = ( 24 * 60 * 60 * 1000 );
$( document.body ).bind( 'added_to_cart', function( event, fragments, cart_hash ) {
var prev_cart_hash = sessionStorage.getItem( 'wc_cart_hash' );
if ( prev_cart_hash === null || prev_cart_hash === undefined || prev_cart_hash === '' ) {
set_cart_creation_timestamp();
}
sessionStorage.setItem( wc_cart_fragments_params.fragment_name, JSON.stringify( fragments ) );
sessionStorage.setItem( 'wc_cart_hash', cart_hash );
set_cart_hash( cart_hash );
});
$( document.body ).bind( 'wc_fragments_refreshed', function() {
clearTimeout( cart_timeout );
cart_timeout = setTimeout( refresh_cart_fragment, day_in_ms );
} );
// Refresh when storage changes in another tab
$( window ).on( 'storage onstorage', function ( e ) {
if ( 'wc_cart_hash' === e.originalEvent.key && localStorage.getItem( 'wc_cart_hash' ) !== sessionStorage.getItem( 'wc_cart_hash' ) ) {
$.ajax( $fragment_refresh );
}
});
try {
var wc_fragments = $.parseJSON( sessionStorage.getItem( wc_cart_fragments_params.fragment_name ) ),
cart_hash = sessionStorage.getItem( 'wc_cart_hash' ),
cookie_hash = $.cookie( 'woocommerce_cart_hash' );
cookie_hash = $.cookie( 'woocommerce_cart_hash'),
cart_created = sessionStorage.getItem( 'wc_cart_created' );
if ( cart_hash === null || cart_hash === undefined || cart_hash === '' ) {
cart_hash = '';
@ -58,6 +103,19 @@ jQuery( function( $ ) {
cookie_hash = '';
}
if ( cart_hash && ( cart_created === null || cart_created === undefined || cart_created === '' ) ) {
throw 'No cart_created';
}
if ( cart_created ) {
var cart_expiration = ( ( 1 * cart_created ) + day_in_ms ),
timestamp_now = ( new Date() ).getTime();
if ( cart_expiration < timestamp_now ) {
throw 'Fragment expired';
}
cart_timeout = setTimeout( refresh_cart_fragment, ( cart_expiration - timestamp_now ) );
}
if ( wc_fragments && wc_fragments['div.widget_shopping_cart_content'] && cart_hash === cookie_hash ) {
$.each( wc_fragments, function( key, value ) {
@ -70,11 +128,11 @@ jQuery( function( $ ) {
}
} catch( err ) {
$.ajax( $fragment_refresh );
refresh_cart_fragment();
}
} else {
$.ajax( $fragment_refresh );
refresh_cart_fragment();
}
/* Cart Hiding */

View File

@ -1 +1 @@
jQuery(function(a){if("undefined"==typeof wc_cart_fragments_params)return!1;var b;try{b="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc")}catch(c){b=!1}var d={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",success:function(c){c&&c.fragments&&(a.each(c.fragments,function(b,c){a(b).replaceWith(c)}),b&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(c.fragments)),sessionStorage.setItem("wc_cart_hash",c.cart_hash)),a(document.body).trigger("wc_fragments_refreshed"))}};if(b){a(document.body).bind("added_to_cart",function(a,b,c){sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(b)),sessionStorage.setItem("wc_cart_hash",c)});try{var e=a.parseJSON(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),f=sessionStorage.getItem("wc_cart_hash"),g=a.cookie("woocommerce_cart_hash");if((null===f||void 0===f||""===f)&&(f=""),(null===g||void 0===g||""===g)&&(g=""),!e||!e["div.widget_shopping_cart_content"]||f!==g)throw"No fragment";a.each(e,function(b,c){a(b).replaceWith(c)}),a(document.body).trigger("wc_fragments_loaded")}catch(c){a.ajax(d)}}else a.ajax(d);a.cookie("woocommerce_items_in_cart")>0?a(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():a(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),a(document.body).bind("adding_to_cart",function(){a(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()})});
jQuery(function(a){function b(){e&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function c(a){e&&(localStorage.setItem("wc_cart_hash",a),sessionStorage.setItem("wc_cart_hash",a))}function d(){a.ajax(g)}if("undefined"==typeof wc_cart_fragments_params)return!1;var e;try{e="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc")}catch(f){e=!1}var g={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",success:function(d){d&&d.fragments&&(a.each(d.fragments,function(b,c){a(b).replaceWith(c)}),e&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(d.fragments)),c(d.cart_hash),d.cart_hash&&b()),a(document.body).trigger("wc_fragments_refreshed"))}};if(e){var h=null,i=864e5;a(document.body).bind("added_to_cart",function(a,d,e){var f=sessionStorage.getItem("wc_cart_hash");(null===f||void 0===f||""===f)&&b(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(d)),c(e)}),a(document.body).bind("wc_fragments_refreshed",function(){clearTimeout(h),h=setTimeout(d,i)}),a(window).on("storage onstorage",function(b){"wc_cart_hash"===b.originalEvent.key&&localStorage.getItem("wc_cart_hash")!==sessionStorage.getItem("wc_cart_hash")&&a.ajax(g)});try{var j=a.parseJSON(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),k=sessionStorage.getItem("wc_cart_hash"),l=a.cookie("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if((null===k||void 0===k||""===k)&&(k=""),(null===l||void 0===l||""===l)&&(l=""),k&&(null===m||void 0===m||""===m))throw"No cart_created";if(m){var n=1*m+i,o=(new Date).getTime();if(o>n)throw"Fragment expired";h=setTimeout(d,n-o)}if(!j||!j["div.widget_shopping_cart_content"]||k!==l)throw"No fragment";a.each(j,function(b,c){a(b).replaceWith(c)}),a(document.body).trigger("wc_fragments_loaded")}catch(f){d()}}else d();a.cookie("woocommerce_items_in_cart")>0?a(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():a(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),a(document.body).bind("adding_to_cart",function(){a(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()})});

View File

@ -19,7 +19,7 @@ jQuery( function( $ ) {
$( document.body ).bind( 'init_checkout', this.init_checkout );
// Payment methods
this.$order_review.on( 'click', 'input[name=payment_method]', this.payment_method_selected );
this.$checkout_form.on( 'click', 'input[name=payment_method]', this.payment_method_selected );
// Form submission
this.$checkout_form.on( 'submit', this.submit );
@ -27,6 +27,9 @@ jQuery( function( $ ) {
// Inline validation
this.$checkout_form.on( 'blur change', '.input-text, select', this.validate_field );
// Manual trigger
this.$checkout_form.on( 'update', this.trigger_update_checkout );
// Inputs/selects which update totals
this.$checkout_form.on( 'change', 'select.shipping_method, input[name^=shipping_method], #ship-to-different-address input, .update_totals_on_change select, .update_totals_on_change input[type=radio]', this.trigger_update_checkout );
this.$checkout_form.on( 'change', '.address-field select', this.input_changed );
@ -37,7 +40,7 @@ jQuery( function( $ ) {
this.$checkout_form.on( 'change', '#ship-to-different-address input', this.ship_to_different_address );
// Trigger events
this.$order_review.find( 'input[name=payment_method]:checked' ).trigger( 'click' );
this.$checkout_form.find( 'input[name=payment_method]:checked' ).trigger( 'click' );
this.$checkout_form.find( '#ship-to-different-address input' ).change();
// Update on page load

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,106 @@
/* global wp, pwsL10n */
jQuery( function( $ ) {
/**
* Password Strength Meter class
*/
var wc_password_strength_meter = {
/**
* Initialize strength meter actions
*/
init: function() {
$( document.body )
.on( 'keyup', 'form.register #reg_password, form.checkout #account_password', this.strengthMeter )
.on( 'change', 'form.checkout #createaccount', this.checkoutNeedsRegistration );
$( 'form.checkout #createaccount' ).change();
},
/**
* Strength Meter
*/
strengthMeter: function() {
var wrapper = $( 'form.register, form.checkout' ),
submit = $( 'input[type="submit"]', wrapper ),
field = $( '#reg_password, #account_password', wrapper ),
strength = 1;
wc_password_strength_meter.includeMeter( wrapper, field );
strength = wc_password_strength_meter.checkPasswordStrength( field );
if ( 3 === strength || 4 === strength ) {
submit.removeAttr( 'disabled' );
} else {
submit.attr( 'disabled', 'disabled' );
}
},
/**
* Include meter HTML
*
* @param {Object} wrapper
* @param {Object} field
*/
includeMeter: function( wrapper, field ) {
var meter = wrapper.find( '.woocommerce-password-strength' );
if ( 0 === meter.length ) {
field.after( '<div class="woocommerce-password-strength" aria-live="polite"></div>' );
} else if ( '' === field.val() ) {
meter.remove();
}
},
/**
* Check password strength
*
* @param {Object} field
*
* @return {Int}
*/
checkPasswordStrength: function( field ) {
var meter = $( '.woocommerce-password-strength' );
var strength = wp.passwordStrength.meter( field.val(), wp.passwordStrength.userInputBlacklist() );
// Reset classes
meter.removeClass( 'short bad good strong' );
switch ( strength ) {
case 2 :
meter.addClass( 'bad' ).html( pwsL10n.bad );
break;
case 3 :
meter.addClass( 'good' ).html( pwsL10n.good );
break;
case 4 :
meter.addClass( 'strong' ).html( pwsL10n.strong );
break;
case 5 :
meter.addClass( 'short' ).html( pwsL10n.mismatch );
break;
default :
meter.addClass( 'short' ).html( pwsL10n['short'] );
}
return strength;
},
/**
* Check if user wants register on checkout.
*/
checkoutNeedsRegistration: function() {
var submit = $( 'form.checkout input[type="submit"]' );
if ( $( this ).is( ':checked' ) ) {
submit.attr( 'disabled', 'disabled' );
} else {
submit.removeAttr( 'disabled' );
}
}
};
wc_password_strength_meter.init();
});

View File

@ -0,0 +1 @@
jQuery(function(a){var b={init:function(){a(document.body).on("keyup","form.register #reg_password, form.checkout #account_password",this.strengthMeter).on("change","form.checkout #createaccount",this.checkoutNeedsRegistration),a("form.checkout #createaccount").change()},strengthMeter:function(){var c=a("form.register, form.checkout"),d=a('input[type="submit"]',c),e=a("#reg_password, #account_password",c),f=1;b.includeMeter(c,e),f=b.checkPasswordStrength(e),3===f||4===f?d.removeAttr("disabled"):d.attr("disabled","disabled")},includeMeter:function(a,b){var c=a.find(".woocommerce-password-strength");0===c.length?b.after('<div class="woocommerce-password-strength" aria-live="polite"></div>'):""===b.val()&&c.remove()},checkPasswordStrength:function(b){var c=a(".woocommerce-password-strength"),d=wp.passwordStrength.meter(b.val(),wp.passwordStrength.userInputBlacklist());switch(c.removeClass("short bad good strong"),d){case 2:c.addClass("bad").html(pwsL10n.bad);break;case 3:c.addClass("good").html(pwsL10n.good);break;case 4:c.addClass("strong").html(pwsL10n.strong);break;case 5:c.addClass("short").html(pwsL10n.mismatch);break;default:c.addClass("short").html(pwsL10n["short"])}return d},checkoutNeedsRegistration:function(){var b=a('form.checkout input[type="submit"]');a(this).is(":checked")?b.attr("disabled","disabled"):b.removeAttr("disabled")}};b.init()});

View File

@ -48,12 +48,14 @@ jQuery( function( $ ) {
$( 'body' )
.on( 'click', '#respond p.stars a', function() {
var $star = $( this ),
$rating = $( this ).closest( '#respond' ).find( '#rating' );
var $star = $( this ),
$rating = $( this ).closest( '#respond' ).find( '#rating' ),
$container = $( this ).closest( '.stars' );
$rating.val( $star.text() );
$star.siblings( 'a' ).removeClass( 'active' );
$star.addClass( 'active' );
$container.addClass( 'selected' );
return false;
})

View File

@ -1 +1 @@
jQuery(function(a){return"undefined"==typeof wc_single_product_params?!1:(a(".wc-tabs-wrapper, .woocommerce-tabs").on("init",function(){a(".wc-tab, .woocommerce-tabs .panel:not(.panel .panel)").hide();var b=window.location.hash,c=window.location.href,d=a(this).find(".wc-tabs, ul.tabs").first();b.toLowerCase().indexOf("comment-")>=0||"#reviews"===b?d.find("li.reviews_tab a").click():c.indexOf("comment-page-")>0||c.indexOf("cpage=")>0?d.find("li.reviews_tab a").click():d.find("li:first a").click()}).on("click",".wc-tabs li a, ul.tabs li a",function(){var b=a(this),c=b.closest(".wc-tabs-wrapper, .woocommerce-tabs"),d=c.find(".wc-tabs, ul.tabs");return d.find("li").removeClass("active"),c.find(".wc-tab, .panel:not(.panel .panel)").hide(),b.closest("li").addClass("active"),c.find(b.attr("href")).show(),!1}).trigger("init"),a("a.woocommerce-review-link").click(function(){return a(".reviews_tab a").click(),!0}),a("#rating").hide().before('<p class="stars"><span><a class="star-1" href="#">1</a><a class="star-2" href="#">2</a><a class="star-3" href="#">3</a><a class="star-4" href="#">4</a><a class="star-5" href="#">5</a></span></p>'),void a("body").on("click","#respond p.stars a",function(){var b=a(this),c=a(this).closest("#respond").find("#rating");return c.val(b.text()),b.siblings("a").removeClass("active"),b.addClass("active"),!1}).on("click","#respond #submit",function(){var b=a(this).closest("#respond").find("#rating"),c=b.val();return b.size()>0&&!c&&"yes"===wc_single_product_params.review_rating_required?(window.alert(wc_single_product_params.i18n_required_rating_text),!1):void 0}))});
jQuery(function(a){return"undefined"==typeof wc_single_product_params?!1:(a(".wc-tabs-wrapper, .woocommerce-tabs").on("init",function(){a(".wc-tab, .woocommerce-tabs .panel:not(.panel .panel)").hide();var b=window.location.hash,c=window.location.href,d=a(this).find(".wc-tabs, ul.tabs").first();b.toLowerCase().indexOf("comment-")>=0||"#reviews"===b?d.find("li.reviews_tab a").click():c.indexOf("comment-page-")>0||c.indexOf("cpage=")>0?d.find("li.reviews_tab a").click():d.find("li:first a").click()}).on("click",".wc-tabs li a, ul.tabs li a",function(){var b=a(this),c=b.closest(".wc-tabs-wrapper, .woocommerce-tabs"),d=c.find(".wc-tabs, ul.tabs");return d.find("li").removeClass("active"),c.find(".wc-tab, .panel:not(.panel .panel)").hide(),b.closest("li").addClass("active"),c.find(b.attr("href")).show(),!1}).trigger("init"),a("a.woocommerce-review-link").click(function(){return a(".reviews_tab a").click(),!0}),a("#rating").hide().before('<p class="stars"><span><a class="star-1" href="#">1</a><a class="star-2" href="#">2</a><a class="star-3" href="#">3</a><a class="star-4" href="#">4</a><a class="star-5" href="#">5</a></span></p>'),void a("body").on("click","#respond p.stars a",function(){var b=a(this),c=a(this).closest("#respond").find("#rating"),d=a(this).closest(".stars");return c.val(b.text()),b.siblings("a").removeClass("active"),b.addClass("active"),d.addClass("selected"),!1}).on("click","#respond #submit",function(){var b=a(this).closest("#respond").find("#rating"),c=b.val();return b.size()>0&&!c&&"yes"===wc_single_product_params.review_rating_required?(window.alert(wc_single_product_params.i18n_required_rating_text),!1):void 0}))});

File diff suppressed because one or more lines are too long

View File

@ -6,4 +6,4 @@ WooCommerce will delete all custom translations placed in this directory.
Put your custom WooCommerce translations in your WordPress language directory, located at: WP_LANG_DIR . "/woocommerce/{$textdomain}-{$locale}.mo";
## Contributing your translating to WooCommerce
If you want to help translate WooCommerce, please visit our [translation page](https://www.transifex.com/projects/p/woocommerce/).
If you want to help translate WooCommerce, please visit our [translation page](https://translate.wordpress.org/projects/wp-plugins/woocommerce).

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -5,41 +5,41 @@
* @author WooThemes
* @category i18n
* @package WooCommerce/i18n
* @version 2.2.3
* @version 2.2.9
*/
global $states;
$states['MX'] = array(
'Distrito Federal' => __( 'Distrito Federal', 'woocommerce' ),
'Jalisco' => __( 'Jalisco', 'woocommerce' ),
'Nuevo Leon' => __( 'Nuevo León', 'woocommerce' ),
'Aguascalientes' => __( 'Aguascalientes', 'woocommerce' ),
'Baja California' => __( 'Baja California', 'woocommerce' ),
'Distrito Federal' => __( 'Distrito Federal', 'woocommerce' ),
'Jalisco' => __( 'Jalisco', 'woocommerce' ),
'Nuevo Leon' => __( 'Nuevo León', 'woocommerce' ),
'Aguascalientes' => __( 'Aguascalientes', 'woocommerce' ),
'Baja California' => __( 'Baja California', 'woocommerce' ),
'Baja California Sur' => __( 'Baja California Sur', 'woocommerce' ),
'Campeche' => __( 'Campeche', 'woocommerce' ),
'Chiapas' => __( 'Chiapas', 'woocommerce' ),
'Chihuahua' => __( 'Chihuahua', 'woocommerce' ),
'Coahuila' => __( 'Coahuila', 'woocommerce' ),
'Colima' => __( 'Colima', 'woocommerce' ),
'Durango' => __( 'Durango', 'woocommerce' ),
'Guanajuato' => __( 'Guanajuato', 'woocommerce' ),
'Guerrero' => __( 'Guerrero', 'woocommerce' ),
'Hidalgo' => __( 'Hidalgo', 'woocommerce' ),
'Estado de Mexico' => __( 'Edo. de México', 'woocommerce' ),
'Michoacan' => __( 'Michoacán', 'woocommerce' ),
'Morelos' => __( 'Morelos', 'woocommerce' ),
'Nayarit' => __( 'Nayarit', 'woocommerce' ),
'Oaxaca' => __( 'Oaxaca', 'woocommerce' ),
'Puebla' => __( 'Puebla', 'woocommerce' ),
'Queretaro' => __( 'Querétaro', 'woocommerce' ),
'Quintana Roo' => __( 'Quintana Roo', 'woocommerce' ),
'San Luis Potosi' => __( 'San Luis Potosí', 'woocommerce' ),
'Sinaloa' => __( 'Sinaloa', 'woocommerce' ),
'Sonora' => __( 'Sonora', 'woocommerce' ),
'Tabasco' => __( 'Tabasco', 'woocommerce' ),
'Tamaulipas' => __( 'Tamaulipas', 'woocommerce' ),
'Tlaxcala' => __( 'Tlaxcala', 'woocommerce' ),
'Veracruz' => __( 'Veracruz', 'woocommerce' ),
'Yucatan' => __( 'Yucatán', 'woocommerce' ),
'Zacatecas' => __( 'Zacatecas', 'woocommerce' )
'Campeche' => __( 'Campeche', 'woocommerce' ),
'Chiapas' => __( 'Chiapas', 'woocommerce' ),
'Chihuahua' => __( 'Chihuahua', 'woocommerce' ),
'Coahuila' => __( 'Coahuila', 'woocommerce' ),
'Colima' => __( 'Colima', 'woocommerce' ),
'Durango' => __( 'Durango', 'woocommerce' ),
'Guanajuato' => __( 'Guanajuato', 'woocommerce' ),
'Guerrero' => __( 'Guerrero', 'woocommerce' ),
'Hidalgo' => __( 'Hidalgo', 'woocommerce' ),
'Estado de Mexico' => __( 'Edo. de México', 'woocommerce' ),
'Michoacan' => __( 'Michoacán', 'woocommerce' ),
'Morelos' => __( 'Morelos', 'woocommerce' ),
'Nayarit' => __( 'Nayarit', 'woocommerce' ),
'Oaxaca' => __( 'Oaxaca', 'woocommerce' ),
'Puebla' => __( 'Puebla', 'woocommerce' ),
'Queretaro' => __( 'Querétaro', 'woocommerce' ),
'Quintana Roo' => __( 'Quintana Roo', 'woocommerce' ),
'San Luis Potosi' => __( 'San Luis Potosí', 'woocommerce' ),
'Sinaloa' => __( 'Sinaloa', 'woocommerce' ),
'Sonora' => __( 'Sonora', 'woocommerce' ),
'Tabasco' => __( 'Tabasco', 'woocommerce' ),
'Tamaulipas' => __( 'Tamaulipas', 'woocommerce' ),
'Tlaxcala' => __( 'Tlaxcala', 'woocommerce' ),
'Veracruz' => __( 'Veracruz', 'woocommerce' ),
'Yucatan' => __( 'Yucatán', 'woocommerce' ),
'Zacatecas' => __( 'Zacatecas', 'woocommerce' )
);

View File

@ -2456,11 +2456,12 @@ abstract class WC_Abstract_Order {
if ( $_product && $_product->exists() && $_product->managing_stock() ) {
$qty = apply_filters( 'woocommerce_order_item_quantity', $item['qty'], $this, $item );
$new_stock = $_product->reduce_stock( $qty );
$item_name = $_product->get_sku() ? $_product->get_sku(): $item['product_id'];
if ( isset( $item['variation_id'] ) && $item['variation_id'] ) {
$this->add_order_note( sprintf( __( 'Item #%s variation #%s stock reduced from %s to %s.', 'woocommerce' ), $item['product_id'], $item['variation_id'], $new_stock + $qty, $new_stock) );
$this->add_order_note( sprintf( __( 'Item %s variation #%s stock reduced from %s to %s.', 'woocommerce' ), $item_name, $item['variation_id'], $new_stock + $qty, $new_stock) );
} else {
$this->add_order_note( sprintf( __( 'Item #%s stock reduced from %s to %s.', 'woocommerce' ), $item['product_id'], $new_stock + $qty, $new_stock) );
$this->add_order_note( sprintf( __( 'Item %s stock reduced from %s to %s.', 'woocommerce' ), $item_name, $new_stock + $qty, $new_stock) );
}
$this->send_stock_notifications( $_product, $new_stock, $item['qty'] );
}

View File

@ -1310,7 +1310,19 @@ class WC_Product {
* @return array
*/
public function get_attributes() {
return apply_filters( 'woocommerce_get_product_attributes', (array) maybe_unserialize( $this->product_attributes ) );
$attributes = array_filter( (array) maybe_unserialize( $this->product_attributes ) );
$taxonomies = wp_list_pluck( wc_get_attribute_taxonomies(), 'attribute_name' );
// Check for any attributes which have been removed globally
foreach ( $attributes as $key => $attribute ) {
if ( $attribute['is_taxonomy'] ) {
if ( ! in_array( substr( $attribute['name'], 3 ), $taxonomies ) ) {
unset( $attributes[ $key ] );
}
}
}
return apply_filters( 'woocommerce_get_product_attributes', $attributes );
}
/**

View File

@ -185,7 +185,7 @@ abstract class WC_Settings_API {
$this->settings[ $key ] = isset( $form_fields[ $key ]['default'] ) ? $form_fields[ $key ]['default'] : '';
}
if ( ! is_null( $empty_value ) && empty( $this->settings[ $key ] ) ) {
if ( ! is_null( $empty_value ) && empty( $this->settings[ $key ] ) && '' === $this->settings[ $key ] ) {
$this->settings[ $key ] = $empty_value;
}
@ -260,7 +260,7 @@ abstract class WC_Settings_API {
$tip = '';
}
return $tip ? '<img class="help_tip" data-tip="' . wc_sanitize_tooltip( $tip ) . '" src="' . WC()->plugin_url() . '/assets/images/help.png" height="16" width="16" />' : '';
return $tip ? wc_help_tip( $tip, true ) : '';
}
/**
@ -726,43 +726,41 @@ abstract class WC_Settings_API {
}
/**
* Validate Settings Field Data.
*
* Validate the data on the "Settings" form.
*
* @since 1.0.0
* @uses method_exists()
* @param array $form_fields (default: array())
*/
public function validate_settings_fields( $form_fields = array() ) {
if ( empty( $form_fields ) ) {
$form_fields = $this->get_form_fields();
}
$this->sanitized_fields = array();
foreach ( $form_fields as $k => $v ) {
foreach ( $form_fields as $key => $field ) {
if ( empty( $v['type'] ) ) {
$v['type'] = 'text'; // Default to "text" field type.
}
// Default to "text" field type.
$type = empty( $field['type'] ) ? 'text' : $field['type'];
// Look for a validate_FIELDID_field method for special handling
if ( method_exists( $this, 'validate_' . $k . '_field' ) ) {
$field = $this->{'validate_' . $k . '_field'}( $k );
$this->sanitized_fields[ $k ] = $field;
if ( method_exists( $this, 'validate_' . $key . '_field' ) ) {
$field = $this->{'validate_' . $key . '_field'}( $key );
// Exclude certain types from saving
} elseif ( in_array( $type, array( 'title' ) ) ) {
continue;
// Look for a validate_FIELDTYPE_field method
} elseif ( method_exists( $this, 'validate_' . $v['type'] . '_field' ) ) {
$field = $this->{'validate_' . $v['type'] . '_field'}( $k );
$this->sanitized_fields[ $k ] = $field;
} elseif ( method_exists( $this, 'validate_' . $type . '_field' ) ) {
$field = $this->{'validate_' . $type . '_field'}( $key );
// Default to text
// Fallback to text
} else {
$field = $this->{'validate_text_field'}( $k );
$this->sanitized_fields[ $k ] = $field;
$field = $this->validate_text_field( $key );
}
$this->sanitized_fields[ $key ] = $field;
}
}
@ -846,16 +844,10 @@ abstract class WC_Settings_API {
* @return string
*/
public function validate_password_field( $key ) {
$text = $this->get_option( $key );
$field = $this->get_field_key( $key );
$value = trim( stripslashes( $_POST[ $field ] ) );
if ( isset( $_POST[ $field ] ) ) {
$text = wp_kses_post( $value );
}
return $text === $value ? $text : '';
$value = wp_kses_post( trim( stripslashes( $_POST[ $field ] ) ) );
return $value;
}
/**

View File

@ -9,7 +9,7 @@
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
exit;
}
if ( ! class_exists( 'WC_Admin_Assets' ) ) :
@ -29,32 +29,37 @@ class WC_Admin_Assets {
}
/**
* Enqueue styles
* Enqueue styles.
*/
public function admin_styles() {
global $wp_scripts;
$screen = get_current_screen();
$jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
// Register admin styles
wp_register_style( 'woocommerce_admin_menu_styles', WC()->plugin_url() . '/assets/css/menu.css', array(), WC_VERSION );
wp_register_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION );
wp_register_style( 'jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
wp_register_style( 'woocommerce_admin_dashboard_styles', WC()->plugin_url() . '/assets/css/dashboard.css', array(), WC_VERSION );
wp_register_style( 'woocommerce_admin_print_reports_styles', WC()->plugin_url() . '/assets/css/reports-print.css', array(), WC_VERSION, 'print' );
// Sitewide menu CSS
wp_enqueue_style( 'woocommerce_admin_menu_styles', WC()->plugin_url() . '/assets/css/menu.css', array(), WC_VERSION );
$screen = get_current_screen();
wp_enqueue_style( 'woocommerce_admin_menu_styles' );
// Admin styles for WC pages only
if ( in_array( $screen->id, wc_get_screen_ids() ) ) {
$jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
// Admin styles for WC pages only
wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION );
wp_enqueue_style( 'jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
wp_enqueue_style( 'woocommerce_admin_styles' );
wp_enqueue_style( 'jquery-ui-style' );
wp_enqueue_style( 'wp-color-picker' );
}
if ( in_array( $screen->id, array( 'dashboard' ) ) ) {
wp_enqueue_style( 'woocommerce_admin_dashboard_styles', WC()->plugin_url() . '/assets/css/dashboard.css', array(), WC_VERSION );
wp_enqueue_style( 'woocommerce_admin_dashboard_styles' );
}
if ( in_array( $screen->id, array( 'woocommerce_page_wc-reports', 'toplevel_page_wc-reports' ) ) ) {
wp_enqueue_style( 'woocommerce_admin_print_reports_styles', WC()->plugin_url() . '/assets/css/reports-print.css', array(), WC_VERSION, 'print' );
wp_enqueue_style( 'woocommerce_admin_print_reports_styles' );
}
/**
@ -69,7 +74,7 @@ class WC_Admin_Assets {
/**
* Enqueue scripts
* Enqueue scripts.
*/
public function admin_scripts() {
global $wp_query, $post, $current_user;
@ -84,13 +89,19 @@ class WC_Admin_Assets {
wp_register_script( 'woocommerce_admin', WC()->plugin_url() . '/assets/js/admin/woocommerce_admin' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'jquery-tiptip' ), WC_VERSION );
wp_register_script( 'jquery-blockui', WC()->plugin_url() . '/assets/js/jquery-blockui/jquery.blockUI' . $suffix . '.js', array( 'jquery' ), '2.70', true );
wp_register_script( 'jquery-tiptip', WC()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip' . $suffix . '.js', array( 'jquery' ), WC_VERSION, true );
wp_register_script( 'accounting', WC()->plugin_url() . '/assets/js/admin/accounting' . $suffix . '.js', array( 'jquery' ), '0.4.2' );
wp_register_script( 'round', WC()->plugin_url() . '/assets/js/admin/round' . $suffix . '.js', array( 'jquery' ), WC_VERSION );
wp_register_script( 'accounting', WC()->plugin_url() . '/assets/js/accounting/accounting' . $suffix . '.js', array( 'jquery' ), '0.4.2' );
wp_register_script( 'round', WC()->plugin_url() . '/assets/js/round/round' . $suffix . '.js', array( 'jquery' ), WC_VERSION );
wp_register_script( 'wc-admin-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'accounting', 'round', 'wc-enhanced-select', 'plupload-all', 'stupidtable', 'jquery-tiptip' ), WC_VERSION );
wp_register_script( 'zeroclipboard', WC()->plugin_url() . '/assets/js/zeroclipboard/jquery.zeroclipboard' . $suffix . '.js', array( 'jquery' ), WC_VERSION );
wp_register_script( 'qrcode', WC()->plugin_url() . '/assets/js/jquery-qrcode/jquery.qrcode' . $suffix . '.js', array( 'jquery' ), WC_VERSION );
wp_register_script( 'stupidtable', WC()->plugin_url() . '/assets/js/stupidtable/stupidtable' . $suffix . '.js', array( 'jquery' ), WC_VERSION );
wp_register_script( 'serializejson', WC()->plugin_url() . '/assets/js/jquery-serializejson/jquery.serializejson' . $suffix . '.js', array( 'jquery' ), '2.6.1' );
wp_register_script( 'flot', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot' . $suffix . '.js', array( 'jquery' ), WC_VERSION );
wp_register_script( 'flot-resize', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot.resize' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION );
wp_register_script( 'flot-time', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot.time' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION );
wp_register_script( 'flot-pie', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot.pie' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION );
wp_register_script( 'flot-stack', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot.stack' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION );
wp_register_script( 'wc-settings-tax', WC()->plugin_url() . '/assets/js/admin/settings-views-html-settings-tax' . $suffix . '.js', array( 'jquery', 'wp-util', 'underscore', 'backbone' ), WC_VERSION );
// Chosen is @deprecated (2.3) in favour of select2, but is registered for backwards compat
wp_register_script( 'ajax-chosen', WC()->plugin_url() . '/assets/js/chosen/ajax-chosen.jquery' . $suffix . '.js', array( 'jquery', 'chosen' ), WC_VERSION );
@ -124,9 +135,8 @@ class WC_Admin_Assets {
// WooCommerce admin pages
if ( in_array( $screen->id, wc_get_screen_ids() ) ) {
wp_enqueue_script( 'woocommerce_admin' );
wp_enqueue_script( 'iris' );
wp_enqueue_script( 'woocommerce_admin' );
wp_enqueue_script( 'wc-enhanced-select' );
wp_enqueue_script( 'jquery-ui-sortable' );
wp_enqueue_script( 'jquery-ui-autocomplete' );
@ -153,14 +163,18 @@ class WC_Admin_Assets {
// Products
if ( in_array( $screen->id, array( 'edit-product' ) ) ) {
wp_enqueue_script( 'woocommerce_quick-edit', WC()->plugin_url() . '/assets/js/admin/quick-edit' . $suffix . '.js', array( 'jquery' ), WC_VERSION );
wp_register_script( 'woocommerce_quick-edit', WC()->plugin_url() . '/assets/js/admin/quick-edit' . $suffix . '.js', array( 'jquery' ), WC_VERSION );
wp_enqueue_script( 'woocommerce_quick-edit' );
}
// Meta boxes
if ( in_array( $screen->id, array( 'product', 'edit-product' ) ) ) {
wp_enqueue_media();
wp_enqueue_script( 'wc-admin-product-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION );
wp_enqueue_script( 'wc-admin-variation-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product-variation' . $suffix . '.js', array( 'wc-admin-meta-boxes', 'serializejson' ), WC_VERSION );
wp_register_script( 'wc-admin-product-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION );
wp_register_script( 'wc-admin-variation-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product-variation' . $suffix . '.js', array( 'wc-admin-meta-boxes', 'serializejson' ), WC_VERSION );
wp_enqueue_script( 'wc-admin-product-meta-boxes' );
wp_enqueue_script( 'wc-admin-variation-meta-boxes' );
$params = array(
'post_id' => isset( $post->ID ) ? $post->ID : '',
@ -196,8 +210,11 @@ class WC_Admin_Assets {
wp_localize_script( 'wc-admin-variation-meta-boxes', 'woocommerce_admin_meta_boxes_variations', $params );
}
if ( in_array( str_replace( 'edit-', '', $screen->id ), wc_get_order_types( 'order-meta-boxes' ) ) ) {
wp_enqueue_script( 'wc-admin-order-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-order' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION );
wp_enqueue_script( 'wc-admin-order-meta-boxes-modal', WC()->plugin_url() . '/assets/js/admin/order-backbone-modal' . $suffix . '.js', array( 'underscore', 'backbone', 'wp-util', 'wc-admin-order-meta-boxes' ), WC_VERSION );
wp_register_script( 'wc-admin-order-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-order' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION );
wp_register_script( 'wc-admin-order-meta-boxes-modal', WC()->plugin_url() . '/assets/js/admin/order-backbone-modal' . $suffix . '.js', array( 'underscore', 'backbone', 'wp-util', 'wc-admin-order-meta-boxes' ), WC_VERSION );
wp_enqueue_script( 'wc-admin-order-meta-boxes' );
wp_enqueue_script( 'wc-admin-order-meta-boxes-modal' );
$params = array(
'countries' => json_encode( array_merge( WC()->countries->get_allowed_country_states(), WC()->countries->get_shipping_country_states() ) ),
@ -207,7 +224,8 @@ class WC_Admin_Assets {
wp_localize_script( 'wc-admin-order-meta-boxes', 'woocommerce_admin_meta_boxes_order', $params );
}
if ( in_array( $screen->id, array( 'shop_coupon', 'edit-shop_coupon' ) ) ) {
wp_enqueue_script( 'wc-admin-coupon-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-coupon' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION );
wp_register_script( 'wc-admin-coupon-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-coupon' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION );
wp_enqueue_script( 'wc-admin-coupon-meta-boxes' );
}
if ( in_array( str_replace( 'edit-', '', $screen->id ), array_merge( array( 'shop_coupon', 'product' ), wc_get_order_types( 'order-meta-boxes' ) ) ) ) {
$params = array(
@ -233,6 +251,7 @@ class WC_Admin_Assets {
'load_shipping' => __( 'Load the customer\'s shipping information? This will remove any currently entered shipping information.', 'woocommerce' ),
'featured_label' => __( 'Featured', 'woocommerce' ),
'prices_include_tax' => esc_attr( get_option( 'woocommerce_prices_include_tax' ) ),
'tax_based_on' => esc_attr( get_option( 'woocommerce_tax_based_on' ) ),
'round_at_subtotal' => esc_attr( get_option( 'woocommerce_tax_round_at_subtotal' ) ),
'no_customer_selected' => __( 'No customer selected', 'woocommerce' ),
'plugin_url' => WC()->plugin_url(),
@ -284,22 +303,26 @@ class WC_Admin_Assets {
// Product sorting - only when sorting by menu order on the products page
if ( current_user_can( 'edit_others_pages' ) && $screen->id == 'edit-product' && isset( $wp_query->query['orderby'] ) && $wp_query->query['orderby'] == 'menu_order title' ) {
wp_enqueue_script( 'woocommerce_product_ordering', WC()->plugin_url() . '/assets/js/admin/product-ordering' . $suffix . '.js', array( 'jquery-ui-sortable' ), WC_VERSION, true );
wp_register_script( 'woocommerce_product_ordering', WC()->plugin_url() . '/assets/js/admin/product-ordering' . $suffix . '.js', array( 'jquery-ui-sortable' ), WC_VERSION, true );
wp_enqueue_script( 'woocommerce_product_ordering' );
}
// Reports Pages
if ( in_array( $screen->id, apply_filters( 'woocommerce_reports_screen_ids', array( $wc_screen_id . '_page_wc-reports', 'toplevel_page_wc-reports', 'dashboard' ) ) ) ) {
wp_enqueue_script( 'wc-reports', WC()->plugin_url() . '/assets/js/admin/reports' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker' ), WC_VERSION );
wp_enqueue_script( 'flot', WC()->plugin_url() . '/assets/js/admin/jquery.flot' . $suffix . '.js', array( 'jquery' ), WC_VERSION );
wp_enqueue_script( 'flot-resize', WC()->plugin_url() . '/assets/js/admin/jquery.flot.resize' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION );
wp_enqueue_script( 'flot-time', WC()->plugin_url() . '/assets/js/admin/jquery.flot.time' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION );
wp_enqueue_script( 'flot-pie', WC()->plugin_url() . '/assets/js/admin/jquery.flot.pie' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION );
wp_enqueue_script( 'flot-stack', WC()->plugin_url() . '/assets/js/admin/jquery.flot.stack' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION );
wp_register_script( 'wc-reports', WC()->plugin_url() . '/assets/js/admin/reports' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker' ), WC_VERSION );
wp_enqueue_script( 'wc-reports' );
wp_enqueue_script( 'flot' );
wp_enqueue_script( 'flot-resize' );
wp_enqueue_script( 'flot-time' );
wp_enqueue_script( 'flot-pie' );
wp_enqueue_script( 'flot-stack' );
}
// API settings
if ( $wc_screen_id . '_page_wc-settings' === $screen->id && isset( $_GET['section'] ) && 'keys' == $_GET['section'] ) {
wp_enqueue_script( 'wc-api-keys', WC()->plugin_url() . '/assets/js/admin/api-keys' . $suffix . '.js', array( 'jquery', 'woocommerce_admin', 'underscore', 'backbone', 'wp-util', 'qrcode', 'zeroclipboard' ), WC_VERSION, true );
wp_register_script( 'wc-api-keys', WC()->plugin_url() . '/assets/js/admin/api-keys' . $suffix . '.js', array( 'jquery', 'woocommerce_admin', 'underscore', 'backbone', 'wp-util', 'qrcode', 'zeroclipboard' ), WC_VERSION, true );
wp_enqueue_script( 'wc-api-keys' );
wp_localize_script(
'wc-api-keys',
'woocommerce_admin_api_keys',
@ -316,7 +339,8 @@ class WC_Admin_Assets {
}
if ( in_array( $screen->id, array( 'user-edit', 'profile' ) ) ) {
wp_enqueue_script( 'wc-users', WC()->plugin_url() . '/assets/js/admin/users' . $suffix . '.js', array( 'jquery', 'wc-enhanced-select' ), WC_VERSION, true );
wp_register_script( 'wc-users', WC()->plugin_url() . '/assets/js/admin/users' . $suffix . '.js', array( 'jquery', 'wc-enhanced-select' ), WC_VERSION, true );
wp_enqueue_script( 'wc-users' );
wp_localize_script(
'wc-users',
'wc_users_params',

View File

@ -163,7 +163,7 @@ class WC_Admin_Dashboard {
<?php printf( _n( "<strong>%s product</strong> out of stock", "<strong>%s products</strong> out of stock", $outofstock_count, 'woocommerce' ), $outofstock_count ); ?>
</a>
</li>
<?php do_action( 'woocommerce_after_dashboard_status_widget', $reports ); ?>
</ul>
<?php
@ -195,9 +195,9 @@ class WC_Admin_Dashboard {
$rating = intval( get_comment_meta( $comment->comment_ID, 'rating', true ) );
echo '<div class="star-rating" title="' . esc_attr( $rating ) . '">
<span style="width:'. ( $rating * 20 ) . '%">' . $rating . ' ' . __( 'out of 5', 'woocommerce' ) . '</span></div>';
<span style="width:' . ( $rating * 20 ) . '%">' . $rating . ' ' . __( 'out of 5', 'woocommerce' ) . '</span></div>';
echo '<h4 class="meta"><a href="' . get_permalink( $comment->ID ) . '#comment-' . absint( $comment->comment_ID ) .'">' . esc_html__( apply_filters( 'woocommerce_admin_dashboard_recent_reviews', $comment->post_title, $comment ) ) . '</a> ' . __( 'reviewed by', 'woocommerce' ) . ' ' . esc_html( $comment->comment_author ) .'</h4>';
echo '<h4 class="meta"><a href="' . get_permalink( $comment->ID ) . '#comment-' . absint( $comment->comment_ID ) .'">' . esc_html( apply_filters( 'woocommerce_admin_dashboard_recent_reviews', $comment->post_title, $comment ) ) . '</a> ' . __( 'reviewed by', 'woocommerce' ) . ' ' . esc_html( $comment->comment_author ) .'</h4>';
echo '<blockquote>' . wp_kses_data( $comment->comment_excerpt ) . ' [...]</blockquote></li>';
}

View File

@ -203,7 +203,17 @@ class WC_Admin_Help {
'content' =>
'<h2>' . __( 'Found a bug?', 'woocommerce' ) . '</h2>' .
'<p>' . sprintf( __( 'If you find a bug within WooCommerce core you can create a ticket via <a href="%s">Github issues</a>. Ensure you read the <a href="%s">contribution guide</a> prior to submitting your report. To help us solve your issue, please be as descriptive as possible and include your <a href="%s">system status report</a>.', 'woocommerce' ), 'https://github.com/woothemes/woocommerce/issues?state=open', 'https://github.com/woothemes/woocommerce/blob/master/CONTRIBUTING.md', admin_url( 'admin.php?page=wc-status' ) ) . '</p>' .
'<p><a href="' . 'https://github.com/woothemes/woocommerce/issues?state=open' . '" class="button button-primary">' . __( 'Report a bug', 'woocommerce' ) . '</a> <a href="' . admin_url('admin.php?page=wc-status') . '" class="button">' . __( 'System Status', 'woocommerce' ) . '</a></p>'
'<p><a href="' . 'https://github.com/woothemes/woocommerce/issues?state=open' . '" class="button button-primary">' . __( 'Report a bug', 'woocommerce' ) . '</a> <a href="' . admin_url( 'admin.php?page=wc-status' ) . '" class="button">' . __( 'System Status', 'woocommerce' ) . '</a></p>'
) );
$screen->add_help_tab( array(
'id' => 'woocommerce_onboard_tab',
'title' => __( 'Onboarding Wizard', 'woocommerce' ),
'content' =>
'<h2>' . __( 'Onboarding Wizard', 'woocommerce' ) . '</h2>' .
'<p>' . __( 'If you need to access the onboarding wizard again, please click on the button below.', 'woocommerce' ) . '</p>' .
'<p><a href="' . admin_url( 'index.php?page=wc-setup' ) . '" class="button button-primary">' . __( 'Onboarding Wizard', 'woocommerce' ) . '</a></p>'
) );

View File

@ -112,7 +112,7 @@ class WC_Admin_Meta_Boxes {
add_meta_box( 'woocommerce-order-data', sprintf( __( '%s Data', 'woocommerce' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Data::output', $type, 'normal', 'high' );
add_meta_box( 'woocommerce-order-items', sprintf( __( '%s Items', 'woocommerce' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Items::output', $type, 'normal', 'high' );
add_meta_box( 'woocommerce-order-notes', sprintf( __( '%s Notes', 'woocommerce' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Notes::output', $type, 'side', 'default' );
add_meta_box( 'woocommerce-order-downloads', __( 'Downloadable Product Permissions', 'woocommerce' ) . ' <span class="tips" data-tip="' . esc_attr__( 'Note: Permissions for order items will automatically be granted when the order status changes to processing/completed.', 'woocommerce' ) . '">[?]</span>', 'WC_Meta_Box_Order_Downloads::output', $type, 'normal', 'default' );
add_meta_box( 'woocommerce-order-downloads', __( 'Downloadable Product Permissions', 'woocommerce' ) . wc_help_tip( __( 'Note: Permissions for order items will automatically be granted when the order status changes to processing/completed.', 'woocommerce' ) ), 'WC_Meta_Box_Order_Downloads::output', $type, 'normal', 'default' );
add_meta_box( 'woocommerce-order-actions', sprintf( __( '%s Actions', 'woocommerce' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Actions::output', $type, 'side', 'high' );
remove_meta_box( 'submitdiv', $type, 'side' );
}
@ -137,9 +137,9 @@ class WC_Admin_Meta_Boxes {
remove_meta_box( 'pageparentdiv', 'product', 'side' );
remove_meta_box( 'commentstatusdiv', 'product', 'normal' );
remove_meta_box( 'commentstatusdiv', 'product', 'side' );
remove_meta_box( 'woothemes-settings', 'shop_coupon' , 'normal' );
remove_meta_box( 'commentstatusdiv', 'shop_coupon' , 'normal' );
remove_meta_box( 'slugdiv', 'shop_coupon' , 'normal' );
remove_meta_box( 'woothemes-settings', 'shop_coupon', 'normal' );
remove_meta_box( 'commentstatusdiv', 'shop_coupon', 'normal' );
remove_meta_box( 'slugdiv', 'shop_coupon', 'normal' );
foreach ( wc_get_order_types( 'order-meta-boxes' ) as $type ) {
remove_meta_box( 'commentsdiv', $type, 'normal' );

View File

@ -22,11 +22,10 @@ class WC_Admin_Notices {
* @var array
*/
private $core_notices = array(
'install' => 'install_notice',
'update' => 'update_notice',
'template_files' => 'template_file_check_notice',
'theme_support' => 'theme_check_notice',
'translation_upgrade' => 'translation_upgrade_notice'
'install' => 'install_notice',
'update' => 'update_notice',
'template_files' => 'template_file_check_notice',
'theme_support' => 'theme_check_notice'
);
/**
@ -36,7 +35,6 @@ class WC_Admin_Notices {
add_action( 'switch_theme', array( $this, 'reset_admin_notices' ) );
add_action( 'woocommerce_installed', array( $this, 'reset_admin_notices' ) );
add_action( 'wp_loaded', array( $this, 'hide_notices' ) );
add_action( 'woocommerce_hide_translation_upgrade_notice', array( $this, 'hide_translation_upgrade_notice' ) );
if ( current_user_can( 'manage_woocommerce' ) ) {
add_action( 'admin_print_styles', array( $this, 'add_notices' ) );
@ -106,13 +104,6 @@ class WC_Admin_Notices {
}
}
/**
* Hide translation upgrade message
*/
public function hide_translation_upgrade_notice() {
update_option( 'woocommerce_language_pack_version', array( WC_VERSION, get_locale() ) );
}
/**
* Add notices + styles if needed.
*/
@ -154,22 +145,6 @@ class WC_Admin_Notices {
}
}
/**
* Show the translation upgrade notice
*/
public function translation_upgrade_notice() {
$screen = get_current_screen();
$locale = get_locale();
if ( 'en_US' === $locale ) {
self::hide_translation_upgrade_notice();
}
if ( 'update-core' !== $screen->id && 'en_US' !== $locale ) {
include( 'views/html-notice-translation-upgrade.php' );
}
}
/**
* Show a notice highlighting bad template files
*/

View File

@ -33,7 +33,7 @@ class WC_Admin_Permalink_Settings {
*/
public function settings_init() {
// Add a section to the permalinks page
add_settings_section( 'woocommerce-permalink', __( 'Product permalink base', 'woocommerce' ), array( $this, 'settings' ), 'permalink' );
add_settings_section( 'woocommerce-permalink', __( 'Product Permalinks', 'woocommerce' ), array( $this, 'settings' ), 'permalink' );
// Add our settings
add_settings_field(
@ -93,9 +93,9 @@ class WC_Admin_Permalink_Settings {
* Show the settings.
*/
public function settings() {
echo wpautop( __( 'These settings control the permalinks used for products. These settings only apply when <strong>not using "default" permalinks above</strong>.', 'woocommerce' ) );
echo wpautop( __( 'These settings control the permalinks used specifically for products.', 'woocommerce' ) );
$permalinks = get_option( 'woocommerce_permalinks' );
$permalinks = get_option( 'woocommerce_permalinks' );
$product_permalink = $permalinks['product_base'];
// Get shop page
@ -105,28 +105,23 @@ class WC_Admin_Permalink_Settings {
$structures = array(
0 => '',
1 => '/' . trailingslashit( $product_base ),
2 => '/' . trailingslashit( $base_slug ),
3 => '/' . trailingslashit( $base_slug ) . trailingslashit( '%product_cat%' )
1 => '/' . trailingslashit( $base_slug ),
2 => '/' . trailingslashit( $base_slug ) . trailingslashit( '%product_cat%' )
);
?>
<table class="form-table">
<table class="form-table wc-permalink-structure">
<tbody>
<tr>
<th><label><input name="product_permalink" type="radio" value="<?php echo esc_attr( $structures[0] ); ?>" class="wctog" <?php checked( $structures[0], $product_permalink ); ?> /> <?php _e( 'Default', 'woocommerce' ); ?></label></th>
<td><code><?php echo esc_html( home_url() ); ?>/?product=sample-product</code></td>
</tr>
<tr>
<th><label><input name="product_permalink" type="radio" value="<?php echo esc_attr( $structures[1] ); ?>" class="wctog" <?php checked( $structures[1], $product_permalink ); ?> /> <?php _e( 'Product', 'woocommerce' ); ?></label></th>
<td><code><?php echo esc_html( home_url() ); ?>/<?php echo esc_html( $product_base ); ?>/sample-product/</code></td>
<td><code class="default-example"><?php echo esc_html( home_url() ); ?>/?product=sample-product</code> <code class="non-default-example"><?php echo esc_html( home_url() ); ?>/<?php echo esc_html( $product_base ); ?>/sample-product/</code></td>
</tr>
<?php if ( $shop_page_id ) : ?>
<tr>
<th><label><input name="product_permalink" type="radio" value="<?php echo esc_attr( $structures[2] ); ?>" class="wctog" <?php checked( $structures[2], $product_permalink ); ?> /> <?php _e( 'Shop base', 'woocommerce' ); ?></label></th>
<th><label><input name="product_permalink" type="radio" value="<?php echo esc_attr( $structures[1] ); ?>" class="wctog" <?php checked( $structures[1], $product_permalink ); ?> /> <?php _e( 'Shop base', 'woocommerce' ); ?></label></th>
<td><code><?php echo esc_html( home_url() ); ?>/<?php echo esc_html( $base_slug ); ?>/sample-product/</code></td>
</tr>
<tr>
<th><label><input name="product_permalink" type="radio" value="<?php echo esc_attr( $structures[3] ); ?>" class="wctog" <?php checked( $structures[3], $product_permalink ); ?> /> <?php _e( 'Shop base with category', 'woocommerce' ); ?></label></th>
<th><label><input name="product_permalink" type="radio" value="<?php echo esc_attr( $structures[2] ); ?>" class="wctog" <?php checked( $structures[2], $product_permalink ); ?> /> <?php _e( 'Shop base with category', 'woocommerce' ); ?></label></th>
<td><code><?php echo esc_html( home_url() ); ?>/<?php echo esc_html( $base_slug ); ?>/product-category/sample-product/</code></td>
</tr>
<?php endif; ?>
@ -144,7 +139,18 @@ class WC_Admin_Permalink_Settings {
jQuery('input.wctog').change(function() {
jQuery('#woocommerce_permalink_structure').val( jQuery( this ).val() );
});
jQuery('.permalink-structure input').change(function() {
jQuery('.wc-permalink-structure').find('code.non-default-example, code.default-example').hide();
if ( jQuery(this).val() ) {
jQuery('.wc-permalink-structure code.non-default-example').show();
jQuery('.wc-permalink-structure input').removeAttr('disabled');
} else {
jQuery('.wc-permalink-structure code.default-example').show();
jQuery('.wc-permalink-structure input:eq(0)').click();
jQuery('.wc-permalink-structure input').attr('disabled', 'disabled');
}
});
jQuery('.permalink-structure input:checked').change();
jQuery('#woocommerce_permalink_structure').focus( function(){
jQuery('#woocommerce_custom_selection').click();
} );
@ -168,8 +174,7 @@ class WC_Admin_Permalink_Settings {
$woocommerce_product_category_slug = wc_clean( $_POST['woocommerce_product_category_slug'] );
$woocommerce_product_tag_slug = wc_clean( $_POST['woocommerce_product_tag_slug'] );
$woocommerce_product_attribute_slug = wc_clean( $_POST['woocommerce_product_attribute_slug'] );
$permalinks = get_option( 'woocommerce_permalinks' );
$permalinks = get_option( 'woocommerce_permalinks' );
if ( ! $permalinks ) {
$permalinks = array();
@ -182,7 +187,7 @@ class WC_Admin_Permalink_Settings {
// Product base
$product_permalink = wc_clean( $_POST['product_permalink'] );
if ( $product_permalink == 'custom' ) {
if ( 'custom' === $product_permalink ) {
// Get permalink without slashes
$product_permalink = trim( wc_clean( $_POST['product_permalink_structure'] ), '/' );

View File

@ -76,6 +76,7 @@ class WC_Admin_Post_Types {
add_action( 'wp_trash_post', array( $this, 'trash_post' ) );
add_action( 'untrash_post', array( $this, 'untrash_post' ) );
add_action( 'before_delete_post', array( $this, 'delete_order_items' ) );
add_action( 'before_delete_post', array( $this, 'delete_order_downloadable_permissions' ) );
// Edit post screens
add_filter( 'enter_title_here', array( $this, 'enter_title_here' ), 1, 2 );
@ -100,6 +101,12 @@ class WC_Admin_Post_Types {
// Disable DFW feature pointer
add_action( 'admin_footer', array( $this, 'disable_dfw_feature_pointer' ) );
// If first time editing, disable columns by default.
if ( false === get_user_option( 'manageedit-shop_ordercolumnshidden' ) ) {
$user = wp_get_current_user();
update_user_option( $user->ID, 'manageedit-shop_ordercolumnshidden', array( 0 => 'billing_address' ), true );
}
}
/**
@ -209,7 +216,6 @@ class WC_Admin_Post_Types {
$columns = array();
$columns['cb'] = '<input type="checkbox" />';
$columns['thumb'] = '<span class="wc-image tips" data-tip="' . esc_attr__( 'Image', 'woocommerce' ) . '">' . __( 'Image', 'woocommerce' ) . '</span>';
$columns['thumb'] = '<span class="wc-image tips" data-tip="' . esc_attr__( 'Image', 'woocommerce' ) . '">' . __( 'Image', 'woocommerce' ) . '</span>';
$columns['name'] = __( 'Name', 'woocommerce' );
if ( wc_product_sku_enabled() ) {
@ -261,6 +267,7 @@ class WC_Admin_Post_Types {
$columns['order_status'] = '<span class="status_head tips" data-tip="' . esc_attr__( 'Status', 'woocommerce' ) . '">' . esc_attr__( 'Status', 'woocommerce' ) . '</span>';
$columns['order_title'] = __( 'Order', 'woocommerce' );
$columns['order_items'] = __( 'Purchased', 'woocommerce' );
$columns['billing_address'] = __( 'Billing', 'woocommerce' );
$columns['shipping_address'] = __( 'Ship to', 'woocommerce' );
$columns['customer_message'] = '<span class="notes_head tips" data-tip="' . esc_attr__( 'Customer Message', 'woocommerce' ) . '">' . esc_attr__( 'Customer Message', 'woocommerce' ) . '</span>';
$columns['order_notes'] = '<span class="order-notes_head tips" data-tip="' . esc_attr__( 'Order Notes', 'woocommerce' ) . '">' . esc_attr__( 'Order Notes', 'woocommerce' ) . '</span>';
@ -291,7 +298,7 @@ class WC_Admin_Post_Types {
$edit_link = get_edit_post_link( $post->ID );
$title = _draft_or_post_title();
echo '<strong><a class="row-title" href="' . esc_url( $edit_link ) .'">' . $title .'</a>';
echo '<strong><a class="row-title" href="' . esc_url( $edit_link ) . '">' . esc_html( $title ) . '</a>';
_post_states( $post );
@ -480,10 +487,12 @@ class WC_Admin_Post_Types {
$edit_link = get_edit_post_link( $post->ID );
$title = _draft_or_post_title();
echo '<strong><a href="' . esc_attr( $edit_link ) . '" class="row-title">' . esc_html( $title ). '</a></strong>';
echo '<strong><a class="row-title" href="' . esc_url( $edit_link ) . '">' . esc_html( $title ) . '</a>';
_post_states( $post );
echo '</strong>';
$this->_render_shop_coupon_row_actions( $post, $title );
break;
case 'type' :
@ -647,7 +656,7 @@ class WC_Admin_Post_Types {
<?php echo apply_filters( 'woocommerce_order_item_name', $item['name'], $item, false ); ?>
<?php endif; ?>
<?php if ( ! empty( $item_meta_html ) ) : ?>
<a class="tips" href="#" data-tip="<?php echo esc_attr( $item_meta_html ); ?>">[?]</a>
<?php echo wc_help_tip( $item_meta_html ); ?>
<?php endif; ?>
</td>
</tr>
@ -658,6 +667,19 @@ class WC_Admin_Post_Types {
} else echo '&ndash;';
break;
case 'billing_address' :
if ( $address = $the_order->get_formatted_billing_address() ) {
echo esc_html( preg_replace( '#<br\s*/?>#i', ', ', $address ) );
} else {
echo '&ndash;';
}
if ( $the_order->billing_phone ) {
echo '<small class="meta">' . __( 'Tel:', 'woocommerce' ) . ' ' . esc_html( $the_order->billing_phone ) . '</small>';
}
break;
case 'shipping_address' :
if ( $address = $the_order->get_formatted_shipping_address() ) {
@ -708,16 +730,6 @@ class WC_Admin_Post_Types {
break;
case 'order_title' :
$customer_tip = array();
if ( $address = $the_order->get_formatted_billing_address() ) {
$customer_tip[] = __( 'Billing:', 'woocommerce' ) . ' ' . $address . '<br/><br/>';
}
if ( $the_order->billing_phone ) {
$customer_tip[] = __( 'Tel:', 'woocommerce' ) . ' ' . $the_order->billing_phone;
}
if ( $the_order->user_id ) {
$user_info = get_userdata( $the_order->user_id );
}
@ -1598,7 +1610,7 @@ class WC_Admin_Post_Types {
* Filters for post types
*/
public function restrict_manage_posts() {
global $typenow, $wp_query;
global $typenow;
if ( in_array( $typenow, wc_get_order_types( 'order-meta-boxes' ) ) ) {
$this->shop_order_filters();
@ -1710,7 +1722,7 @@ class WC_Admin_Post_Types {
if ( ! empty( $_GET['_customer_user'] ) ) {
$user_id = absint( $_GET['_customer_user'] );
$user = get_user_by( 'id', $user_id );
$user_string = esc_html( $user->display_name ) . ' (#' . absint( $user->ID ) . ' &ndash; ' . esc_html( $user->user_email );
$user_string = esc_html( $user->display_name ) . ' (#' . absint( $user->ID ) . ' &ndash; ' . esc_html( $user->user_email ) . ')';
}
?>
<input type="hidden" class="wc-customer-search" name="_customer_user" data-placeholder="<?php esc_attr_e( 'Search for a customer&hellip;', 'woocommerce' ); ?>" data-selected="<?php echo htmlspecialchars( $user_string ); ?>" value="<?php echo $user_id; ?>" data-allow_clear="true" />
@ -1853,15 +1865,17 @@ class WC_Admin_Post_Types {
if ( is_numeric( $term ) ) {
$search_ids[] = $term;
}
// Attempt to get a SKU
$sku_to_id = $wpdb->get_col( $wpdb->prepare( "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key='_sku' AND meta_value LIKE '%%%s%%';", wc_clean( $term ) ) );
$sku_to_id = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_parent FROM {$wpdb->posts} LEFT JOIN {$wpdb->postmeta} ON {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id WHERE meta_key='_sku' AND meta_value LIKE %s;", '%' . $wpdb->esc_like( wc_clean( $term ) ) . '%' ) );
$sku_to_id = array_merge( wp_list_pluck( $sku_to_id, 'ID' ), wp_list_pluck( $sku_to_id, 'post_parent' ) );
if ( $sku_to_id && sizeof( $sku_to_id ) > 0 ) {
$search_ids = array_merge( $search_ids, $sku_to_id );
}
}
$search_ids = array_filter( array_map( 'absint', $search_ids ) );
$search_ids = array_filter( array_unique( array_map( 'absint', $search_ids ) ) );
if ( sizeof( $search_ids ) > 0 ) {
$where = str_replace( 'AND (((', "AND ( ({$wpdb->posts}.ID IN (" . implode( ',', $search_ids ) . ")) OR ((", $where );
@ -2029,6 +2043,24 @@ class WC_Admin_Post_Types {
}
}
/**
* Remove downloadable permissions on permanent order deletion
*/
public function delete_order_downloadable_permissions( $postid ) {
global $wpdb;
if ( in_array( get_post_type( $postid ), wc_get_order_types() ) ) {
do_action( 'woocommerce_delete_order_downloadable_permissions', $postid );
$wpdb->query( $wpdb->prepare( "
DELETE FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions
WHERE order_id = %d
", $postid ) );
do_action( 'woocommerce_deleted_order_downloadable_permissions', $postid );
}
}
/**
* Change title boxes in admin.
* @param string $text
@ -2055,7 +2087,7 @@ class WC_Admin_Post_Types {
public function edit_form_after_title( $post ) {
if ( 'shop_coupon' === $post->post_type ) {
?>
<textarea id="woocommerce-coupon-description" name="excerpt" cols="5" rows="2" placeholder="<?php esc_attr_e( 'Description (optional)', 'woocommerce' ); ?>"><?php echo esc_textarea( $post->post_excerpt ); ?></textarea>
<textarea id="woocommerce-coupon-description" name="excerpt" cols="5" rows="2" placeholder="<?php esc_attr_e( 'Description (optional)', 'woocommerce' ); ?>"><?php echo $post->post_excerpt; // This is already escaped in core ?></textarea>
<?php
}
}

View File

@ -634,7 +634,7 @@ class WC_Admin_Settings {
if ( $tooltip_html && in_array( $value['type'], array( 'checkbox' ) ) ) {
$tooltip_html = '<p class="description">' . $tooltip_html . '</p>';
} elseif ( $tooltip_html ) {
$tooltip_html = '<img class="help_tip" data-tip="' . esc_attr( $tooltip_html ) . '" src="' . WC()->plugin_url() . '/assets/images/help.png" height="16" width="16" />';
$tooltip_html = wc_help_tip( $tooltip_html );
}
return array(

View File

@ -131,7 +131,7 @@ class WC_Admin_Setup_Wizard {
public function get_next_step_link() {
$keys = array_keys( $this->steps );
return add_query_arg( 'step', $keys[ array_search( $this->step, array_keys( $this->steps ) ) + 1 ], remove_query_arg( 'translation_updated' ) );
return add_query_arg( 'step', $keys[ array_search( $this->step, array_keys( $this->steps ) ) + 1 ] );
}
/**
@ -201,27 +201,13 @@ class WC_Admin_Setup_Wizard {
* Introduction step
*/
public function wc_setup_introduction() {
$locale = get_locale();
if ( isset( $_GET['translation_updated'] ) ) {
WC_Language_Pack_Upgrader::language_update_messages();
} elseif( 'en_US' !== $locale && WC_Language_Pack_Upgrader::has_available_update( $locale ) ) {
?>
<div class="woocommerce-message woocommerce-language-pack">
<p><?php printf( esc_html__( 'WooCommerce is available in %s. Would you like to use this translation?', 'woocommerce' ), $locale ); ?></p>
<p class="submit">
<a href="<?php echo esc_url( wp_nonce_url( admin_url( 'index.php?page=wc-setup&action=translation_upgrade' ), 'setup_language' ) ); ?>" class="button-primary"><?php _e( 'Install Translation', 'woocommerce' ); ?></a>
</p>
</div>
<?php
}
?>
<h1><?php _e( 'Welcome to the world of WooCommerce!', 'woocommerce' ); ?></h1>
<p><?php _e( 'Thank you for choosing WooCommerce to power your online store! This quick setup wizard will help you configure the basic settings. <strong>Its completely optional and shouldnt take longer than five minutes.</strong>', 'woocommerce' ); ?></p>
<p><?php _e( 'No time right now? If you dont want to go through the wizard, you can skip and return to the WordPress dashboard. Come back anytime if you change your mind!', 'woocommerce' ); ?></p>
<p class="wc-setup-actions step">
<a href="<?php echo esc_url( $this->get_next_step_link() ); ?>" class="button-primary button button-large button-next"><?php _e( 'Let\'s Go!', 'woocommerce' ); ?></a>
<a href="<?php echo esc_url( wp_get_referer() ? wp_get_referer() : admin_url( 'plugins.php' ) ); ?>" class="button button-large"><?php _e( 'Not right now', 'woocommerce' ); ?></a>
<a href="<?php echo esc_url( admin_url() ); ?>" class="button button-large"><?php _e( 'Not right now', 'woocommerce' ); ?></a>
</p>
<?php
}
@ -318,7 +304,7 @@ class WC_Admin_Setup_Wizard {
<tr>
<th scope="row"><label for="currency_code"><?php _e( 'Which currency will your store use?', 'woocommerce' ); ?></label></th>
<td>
<select id="currency_code" name="currency_code" required style="width:100%;" data-placeholder="<?php esc_attr_e( 'Choose a currency&hellip;', 'woocommerce' ); ?>" class="wc-enhanced-select">
<select id="currency_code" name="currency_code" style="width:100%;" data-placeholder="<?php esc_attr_e( 'Choose a currency&hellip;', 'woocommerce' ); ?>" class="wc-enhanced-select">
<option value=""><?php _e( 'Choose a currency&hellip;', 'woocommerce' ); ?></option>
<?php
foreach ( get_woocommerce_currencies() as $code => $name ) {

View File

@ -96,10 +96,7 @@ class WC_Admin_Status {
break;
case 'clear_sessions' :
$wpdb->query( "
DELETE FROM {$wpdb->options}
WHERE option_name LIKE '_wc_session_%' OR option_name LIKE '_wc_session_expires_%'
" );
$wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_sessions" );
wp_cache_flush();
@ -141,11 +138,6 @@ class WC_Admin_Status {
}
}
// Manual translation update messages
if ( isset( $_GET['translation_updated'] ) ) {
WC_Language_Pack_Upgrader::language_update_messages();
}
// Display message if settings settings have been saved
if ( isset( $_REQUEST['settings-updated'] ) ) {
echo '<div class="updated"><p>' . __( 'Your changes have been saved.', 'woocommerce' ) . '</p></div>';
@ -202,14 +194,6 @@ class WC_Admin_Status {
)
);
if ( get_locale() !== 'en_US' ) {
$tools['translation_upgrade'] = array(
'name' => __( 'Translation Upgrade', 'woocommerce' ),
'button' => __( 'Force Translation Upgrade', 'woocommerce' ),
'desc' => __( '<strong class="red">Note:</strong> This option will force the translation upgrade for your language if a translation is available.', 'woocommerce' ),
);
}
return apply_filters( 'woocommerce_debug_tools', $tools );
}

File diff suppressed because one or more lines are too long

View File

@ -56,12 +56,7 @@ class WC_Admin {
switch ( $_GET['page'] ) {
case 'wc-setup' :
include_once( 'class-wc-admin-setup-wizard.php' );
break;
case 'wc-about' :
case 'wc-credits' :
case 'wc-translators' :
include_once( 'class-wc-admin-welcome.php' );
break;
break;
}
}
@ -99,13 +94,13 @@ class WC_Admin {
* Transient must be present, the user must have access rights, and we must ignore the network/bulk plugin updaters.
*/
public function admin_redirects() {
if ( ! get_transient( '_wc_activation_redirect' ) || is_network_admin() || isset( $_GET['activate-multi'] ) || ! current_user_can( 'manage_woocommerce' ) ) {
if ( ! get_transient( '_wc_activation_redirect' ) ) {
return;
}
delete_transient( '_wc_activation_redirect' );
if ( ! empty( $_GET['page'] ) && in_array( $_GET['page'], array( 'wc-setup', 'wc-about' ) ) ) {
if ( ( ! empty( $_GET['page'] ) && in_array( $_GET['page'], array( 'wc-setup' ) ) ) || is_network_admin() || isset( $_GET['activate-multi'] ) || ! current_user_can( 'manage_woocommerce' ) ) {
return;
}
@ -113,11 +108,6 @@ class WC_Admin {
if ( WC_Admin_Notices::has_notice( 'install' ) ) {
wp_safe_redirect( admin_url( 'index.php?page=wc-setup' ) );
exit;
// Otherwise, the welcome page
} else {
wp_safe_redirect( admin_url( 'index.php?page=wc-about' ) );
exit;
}
}
@ -198,11 +188,6 @@ class WC_Admin {
}
$wc_pages = array_flip( $wc_pages );
// Add the dashboard pages
$wc_pages[] = 'dashboard_page_wc-about';
$wc_pages[] = 'dashboard_page_wc-credits';
$wc_pages[] = 'dashboard_page_wc-translators';
// Check to make sure we're on a WooCommerce admin page
if ( isset( $current_screen->id ) && apply_filters( 'woocommerce_display_admin_footer_text', in_array( $current_screen->id, $wc_pages ) ) ) {
// Change the footer text

View File

@ -109,7 +109,7 @@ class WC_Meta_Box_Coupon_Data {
}
echo esc_attr( json_encode( $json_ids ) );
?>" value="<?php echo implode( ',', array_keys( $json_ids ) ); ?>" /> <img class="help_tip" data-tip='<?php _e( 'Products which need to be in the cart to use this coupon or, for "Product Discounts", which products are discounted.', 'woocommerce' ); ?>' src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" /></p>
?>" value="<?php echo implode( ',', array_keys( $json_ids ) ); ?>" /> <?php echo wc_help_tip( __( 'Products which need to be in the cart to use this coupon or, for "Product Discounts", which products are discounted.', 'woocommerce' ) ); ?></p>
<?php
// Exclude Product ids
@ -127,7 +127,7 @@ class WC_Meta_Box_Coupon_Data {
}
echo esc_attr( json_encode( $json_ids ) );
?>" value="<?php echo implode( ',', array_keys( $json_ids ) ); ?>" /> <img class="help_tip" data-tip='<?php _e( 'Products which must not be in the cart to use this coupon or, for "Product Discounts", which products are not discounted.', 'woocommerce' ); ?>' src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" /></p>
?>" value="<?php echo implode( ',', array_keys( $json_ids ) ); ?>" /> <?php echo wc_help_tip( __( 'Products which must not be in the cart to use this coupon or, for "Product Discounts", which products are not discounted.', 'woocommerce' ) ); ?></p>
<?php
echo '</div><div class="options_group">';
@ -144,7 +144,7 @@ class WC_Meta_Box_Coupon_Data {
echo '<option value="' . esc_attr( $cat->term_id ) . '"' . selected( in_array( $cat->term_id, $category_ids ), true, false ) . '>' . esc_html( $cat->name ) . '</option>';
}
?>
</select> <img class="help_tip" data-tip='<?php _e( 'A product must be in this category for the coupon to remain valid or, for "Product Discounts", products in these categories will be discounted.', 'woocommerce' ); ?>' src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" /></p>
</select> <?php echo wc_help_tip( __( 'A product must be in this category for the coupon to remain valid or, for "Product Discounts", products in these categories will be discounted.', 'woocommerce' ) ); ?></p>
<?php
// Exclude Categories
@ -159,7 +159,7 @@ class WC_Meta_Box_Coupon_Data {
echo '<option value="' . esc_attr( $cat->term_id ) . '"' . selected( in_array( $cat->term_id, $category_ids ), true, false ) . '>' . esc_html( $cat->name ) . '</option>';
}
?>
</select> <img class="help_tip" data-tip='<?php _e( 'Product must not be in this category for the coupon to remain valid or, for "Product Discounts", products in these categories will not be discounted.', 'woocommerce' ) ?>' src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" /></p>
</select> <?php echo wc_help_tip( __( 'Product must not be in this category for the coupon to remain valid or, for "Product Discounts", products in these categories will not be discounted.', 'woocommerce' ) ); ?></p>
<?php
echo '</div><div class="options_group">';

View File

@ -120,6 +120,7 @@ class WC_Meta_Box_Order_Actions {
foreach ( $mails as $mail ) {
if ( $mail->id == $email_to_send ) {
$mail->trigger( $order->id );
$order->add_order_note( sprintf( __( '%s email notification manually sent.', 'woocommerce' ), $mail->title ), false, true );
}
}
}

View File

@ -450,17 +450,16 @@ class WC_Meta_Box_Order_Data {
$date = strtotime( $_POST['order_date'] . ' ' . (int) $_POST['order_date_hour'] . ':' . (int) $_POST['order_date_minute'] . ':00' );
}
$date = date_i18n( 'Y-m-d H:i:s', $date );
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_date = %s, post_date_gmt = %s WHERE ID = %s", $date, get_gmt_from_date( $date ), $post_id ) );
// Order data saved, now get it so we can manipulate status
$order = wc_get_order( $post_id );
// Order status
$order->update_status( $_POST['order_status'], '', true );
// Finally, set the date
$date = date_i18n( 'Y-m-d H:i:s', $date );
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_date = %s, post_date_gmt = %s WHERE ID = %s", $date, get_gmt_from_date( $date ), $post_id ) );
wc_delete_shop_order_transients( $post_id );
}
}

View File

@ -45,7 +45,7 @@ class WC_Meta_Box_Order_Notes {
$note_classes = get_comment_meta( $note->comment_ID, 'is_customer_note', true ) ? array( 'customer-note', 'note' ) : array( 'note' );
$note_classes = apply_filters( 'woocommerce_order_note_class', $note_classes, $note );
?>
<li rel="<?php echo absint( $note->comment_ID ) ; ?>" class="<?php echo esc_attr( implode( ' ', $note_classes ) ); ?>">
<div class="note_content">
@ -67,7 +67,7 @@ class WC_Meta_Box_Order_Notes {
echo '</ul>';
?>
<div class="add_note">
<h4><?php _e( 'Add note', 'woocommerce' ); ?> <img class="help_tip" data-tip='<?php esc_attr_e( 'Add a note for your reference, or add a customer note (the user will be notified).', 'woocommerce' ); ?>' src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" /></h4>
<h4><?php _e( 'Add note', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Add a note for your reference, or add a customer note (the user will be notified).', 'woocommerce' ) ); ?></h4>
<p>
<textarea type="text" name="order_note" id="add_order_note" class="input-text" cols="20" rows="5"></textarea>
</p>

View File

@ -172,8 +172,7 @@ class WC_Meta_Box_Product_Data {
<label for="_sale_price_dates_from">' . __( 'Sale Price Dates', 'woocommerce' ) . '</label>
<input type="text" class="short" name="_sale_price_dates_from" id="_sale_price_dates_from" value="' . esc_attr( $sale_price_dates_from ) . '" placeholder="' . _x( 'From&hellip;', 'placeholder', 'woocommerce' ) . ' YYYY-MM-DD" maxlength="10" pattern="[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])" />
<input type="text" class="short" name="_sale_price_dates_to" id="_sale_price_dates_to" value="' . esc_attr( $sale_price_dates_to ) . '" placeholder="' . _x( 'To&hellip;', 'placeholder', 'woocommerce' ) . ' YYYY-MM-DD" maxlength="10" pattern="[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])" />
<a href="#" class="cancel_sale_schedule">'. __( 'Cancel', 'woocommerce' ) .'</a>
<img class="help_tip" style="margin-top: 21px;" data-tip="' . esc_attr__( 'The sale will end at the beginning of the set date.', 'woocommerce' ) . '" src="' . esc_url( WC()->plugin_url() ) . '/assets/images/help.png" height="16" width="16" />
<a href="#" class="cancel_sale_schedule">'. __( 'Cancel', 'woocommerce' ) . '</a>' . wc_help_tip( __( 'The sale will end at the beginning of the set date.', 'woocommerce' ) ) . '
</p>';
do_action( 'woocommerce_product_options_pricing' );
@ -189,8 +188,8 @@ class WC_Meta_Box_Product_Data {
<thead>
<tr>
<th class="sort">&nbsp;</th>
<th><?php _e( 'Name', 'woocommerce' ); ?> <span class="tips" data-tip="<?php esc_attr_e( 'This is the name of the download shown to the customer.', 'woocommerce' ); ?>">[?]</span></th>
<th colspan="2"><?php _e( 'File URL', 'woocommerce' ); ?> <span class="tips" data-tip="<?php esc_attr_e( 'This is the URL or absolute path to the file which customers will get access to. URLs entered here should already be encoded.', 'woocommerce' ); ?>">[?]</span></th>
<th><?php _e( 'Name', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the name of the download shown to the customer.', 'woocommerce' ) ); ?></th>
<th colspan="2"><?php _e( 'File URL', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the URL or absolute path to the file which customers will get access to. URLs entered here should already be encoded.', 'woocommerce' ) ); ?></th>
<th>&nbsp;</th>
</tr>
</thead>
@ -377,7 +376,7 @@ class WC_Meta_Box_Product_Data {
<input placeholder="<?php esc_attr_e( 'Width', 'woocommerce' ); ?>" class="input-text wc_input_decimal" size="6" type="text" name="_width" value="<?php echo esc_attr( wc_format_localized_decimal( get_post_meta( $thepostid, '_width', true ) ) ); ?>" />
<input placeholder="<?php esc_attr_e( 'Height', 'woocommerce' ); ?>" class="input-text wc_input_decimal last" size="6" type="text" name="_height" value="<?php echo esc_attr( wc_format_localized_decimal( get_post_meta( $thepostid, '_height', true ) ) ); ?>" />
</span>
<img class="help_tip" data-tip="<?php esc_attr_e( 'LxWxH in decimal form', 'woocommerce' ); ?>" src="<?php echo esc_url( WC()->plugin_url() ); ?>/assets/images/help.png" height="16" width="16" />
<?php echo wc_help_tip( __( 'LxWxH in decimal form', 'woocommerce' ) ); ?>
</p><?php
}
@ -404,7 +403,7 @@ class WC_Meta_Box_Product_Data {
'selected' => $current_shipping_class,
'class' => 'select short'
);
?><p class="form-field dimensions_field"><label for="product_shipping_class"><?php _e( 'Shipping class', 'woocommerce' ); ?></label> <?php wp_dropdown_categories( $args ); ?> <img class="help_tip" data-tip="<?php esc_attr_e( 'Shipping classes are used by certain shipping methods to group similar products.', 'woocommerce' ); ?>" src="<?php echo esc_url( WC()->plugin_url() ); ?>/assets/images/help.png" height="16" width="16" /></p><?php
?><p class="form-field dimensions_field"><label for="product_shipping_class"><?php _e( 'Shipping class', 'woocommerce' ); ?></label> <?php wp_dropdown_categories( $args ); ?> <?php echo wc_help_tip( __( 'Shipping classes are used by certain shipping methods to group similar products.', 'woocommerce' ) ); ?></p><?php
do_action( 'woocommerce_product_options_shipping' );
@ -499,7 +498,7 @@ class WC_Meta_Box_Product_Data {
}
echo esc_attr( json_encode( $json_ids ) );
?>" value="<?php echo implode( ',', array_keys( $json_ids ) ); ?>" /> <img class="help_tip" data-tip='<?php _e( 'Up-sells are products which you recommend instead of the currently viewed product, for example, products that are more profitable or better quality or more expensive.', 'woocommerce' ) ?>' src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
?>" value="<?php echo implode( ',', array_keys( $json_ids ) ); ?>" /> <?php echo wc_help_tip( __( 'Up-sells are products which you recommend instead of the currently viewed product, for example, products that are more profitable or better quality or more expensive.', 'woocommerce' ) ); ?>
</p>
<p class="form-field">
@ -516,7 +515,7 @@ class WC_Meta_Box_Product_Data {
}
echo esc_attr( json_encode( $json_ids ) );
?>" value="<?php echo implode( ',', array_keys( $json_ids ) ); ?>" /> <img class="help_tip" data-tip='<?php esc_attr_e( 'Cross-sells are products which you promote in the cart, based on the current product.', 'woocommerce' ) ?>' src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
?>" value="<?php echo implode( ',', array_keys( $json_ids ) ); ?>" /> <?php echo wc_help_tip( __( 'Cross-sells are products which you promote in the cart, based on the current product.', 'woocommerce' ) ); ?>
</p>
</div>
@ -535,7 +534,7 @@ class WC_Meta_Box_Product_Data {
echo esc_attr( $parent_title );
}
?>" value="<?php echo $parent_id ? $parent_id : ''; ?>" /> <img class="help_tip" data-tip='<?php _e( 'Set this option to make this product part of a grouped product.', 'woocommerce' ) ?>' src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
?>" value="<?php echo $parent_id ? $parent_id : ''; ?>" /> <?php echo wc_help_tip( __( 'Set this option to make this product part of a grouped product.', 'woocommerce' ) ); ?>
</p>
<?php
@ -631,7 +630,7 @@ class WC_Meta_Box_Product_Data {
<div class="toolbar toolbar-variations-defaults">
<div class="variations-defaults">
<strong><?php _e( 'Default Form Values', 'woocommerce' ); ?>: <span class="tips" data-tip="<?php esc_attr_e( 'These are the attributes that will be pre-selected on the frontend.', 'woocommerce' ); ?>">[?]</span></strong>
<strong><?php _e( 'Default Form Values', 'woocommerce' ); ?>: <?php echo wc_help_tip( __( 'These are the attributes that will be pre-selected on the frontend.', 'woocommerce' ) ); ?></strong>
<?php
$default_attributes = maybe_unserialize( get_post_meta( $post->ID, '_default_attributes', true ) );
@ -653,7 +652,7 @@ class WC_Meta_Box_Product_Data {
$post_terms = wp_get_post_terms( $post->ID, $attribute['name'] );
foreach ( $post_terms as $term ) {
echo '<option ' . selected( $variation_selected_value, $term->slug, false ) . ' value="' . esc_attr( $term->slug ) . '">' . apply_filters( 'woocommerce_variation_option_name', esc_html( $term->name ) ) . '</option>';
echo '<option ' . selected( $variation_selected_value, $term->slug, false ) . ' value="' . esc_attr( $term->slug ) . '">' . esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) ) . '</option>';
}
} else {
@ -1177,7 +1176,7 @@ class WC_Meta_Box_Product_Data {
// Validate the file extension
if ( in_array( $file_is, array( 'absolute', 'relative' ) ) ) {
$file_type = wp_check_filetype( strtok( $file_url, '?' ) );
$file_type = wp_check_filetype( strtok( $file_url, '?' ), $allowed_file_types );
$parsed_url = parse_url( $file_url, PHP_URL_PATH );
$extension = pathinfo( $parsed_url, PATHINFO_EXTENSION );
@ -1327,6 +1326,8 @@ class WC_Meta_Box_Product_Data {
$wpdb->update( $wpdb->posts, array( 'post_status' => $post_status, 'post_title' => $variation_post_title, 'menu_order' => $variable_menu_order[ $i ] ), array( 'ID' => $variation_id ) );
clean_post_cache( $variation_id );
do_action( 'woocommerce_update_product_variation', $variation_id );
}
@ -1463,7 +1464,7 @@ class WC_Meta_Box_Product_Data {
// Validate the file extension
if ( in_array( $file_is, array( 'absolute', 'relative' ) ) ) {
$file_type = wp_check_filetype( strtok( $file_url, '?' ) );
$file_type = wp_check_filetype( strtok( $file_url, '?' ), $allowed_file_types );
$parsed_url = parse_url( $file_url, PHP_URL_PATH );
$extension = pathinfo( $parsed_url, PATHINFO_EXTENSION );

View File

@ -17,10 +17,10 @@ if ( ! defined( 'ABSPATH' ) ) {
<td class="name">
<div class="view">
<?php echo ! empty( $item['name'] ) ? esc_html( $item['name'] ) : __( 'Shipping', 'woocommerce' ); ?>
<?php echo ! empty( $item['name'] ) ? wc_clean( $item['name'] ) : __( 'Shipping', 'woocommerce' ); ?>
</div>
<div class="edit" style="display: none;">
<input type="text" placeholder="<?php esc_attr_e( 'Shipping Name', 'woocommerce' ); ?>" name="shipping_method_title[<?php echo $item_id; ?>]" value="<?php echo ( isset( $item['name'] ) ) ? esc_attr( $item['name'] ) : ''; ?>" />
<input type="text" placeholder="<?php esc_attr_e( 'Shipping Name', 'woocommerce' ); ?>" name="shipping_method_title[<?php echo $item_id; ?>]" value="<?php echo ( isset( $item['name'] ) ) ? wc_clean( $item['name'] ) : ''; ?>" />
<select name="shipping_method[<?php echo $item_id; ?>]">
<optgroup label="<?php esc_attr_e( 'Shipping Method', 'woocommerce' ); ?>">
<option value=""><?php _e( 'N/A', 'woocommerce' ); ?></option>

View File

@ -38,7 +38,7 @@ extract( $variation_data );
$post_terms = wp_get_post_terms( $parent_data['id'], $attribute['name'] );
foreach ( $post_terms as $term ) {
echo '<option ' . selected( $variation_selected_value, $term->slug, false ) . ' value="' . esc_attr( $term->slug ) . '">' . apply_filters( 'woocommerce_variation_option_name', esc_html( $term->name ) ) . '</option>';
echo '<option ' . selected( $variation_selected_value, $term->slug, false ) . ' value="' . esc_attr( $term->slug ) . '">' . esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) ) . '</option>';
}
} else {
@ -65,7 +65,7 @@ extract( $variation_data );
</p>
<?php if ( wc_product_sku_enabled() ) : ?>
<p class="sku form-row form-row-last">
<label><?php _e( 'SKU', 'woocommerce' ); ?>: <a class="tips" data-tip="<?php esc_attr_e( 'Enter a SKU for this variation or leave blank to use the parent product SKU.', 'woocommerce' ); ?>" href="#">[?]</a></label>
<label><?php _e( 'SKU', 'woocommerce' ); ?>: <?php echo wc_help_tip( __( 'Enter a SKU for this variation or leave blank to use the parent product SKU.', 'woocommerce' ) ); ?></label>
<input type="text" size="5" name="variable_sku[<?php echo $loop; ?>]" value="<?php if ( isset( $_sku ) ) echo esc_attr( $_sku ); ?>" placeholder="<?php echo esc_attr( $parent_data['sku'] ); ?>" />
</p>
<?php else : ?>
@ -75,13 +75,13 @@ extract( $variation_data );
<p class="form-row form-row-full options">
<label><input type="checkbox" class="checkbox" name="variable_enabled[<?php echo $loop; ?>]" <?php checked( $variation->post_status, 'publish' ); ?> /> <?php _e( 'Enabled', 'woocommerce' ); ?></label>
<label><input type="checkbox" class="checkbox variable_is_downloadable" name="variable_is_downloadable[<?php echo $loop; ?>]" <?php checked( isset( $_downloadable ) ? $_downloadable : '', 'yes' ); ?> /> <?php _e( 'Downloadable', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e( 'Enable this option if access is given to a downloadable file upon purchase of a product', 'woocommerce' ); ?>" href="#">[?]</a></label>
<label><input type="checkbox" class="checkbox variable_is_downloadable" name="variable_is_downloadable[<?php echo $loop; ?>]" <?php checked( isset( $_downloadable ) ? $_downloadable : '', 'yes' ); ?> /> <?php _e( 'Downloadable', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Enable this option if access is given to a downloadable file upon purchase of a product', 'woocommerce' ) ); ?></label>
<label><input type="checkbox" class="checkbox variable_is_virtual" name="variable_is_virtual[<?php echo $loop; ?>]" <?php checked( isset( $_virtual ) ? $_virtual : '', 'yes' ); ?> /> <?php _e( 'Virtual', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e( 'Enable this option if a product is not shipped or there is no shipping cost', 'woocommerce' ); ?>" href="#">[?]</a></label>
<label><input type="checkbox" class="checkbox variable_is_virtual" name="variable_is_virtual[<?php echo $loop; ?>]" <?php checked( isset( $_virtual ) ? $_virtual : '', 'yes' ); ?> /> <?php _e( 'Virtual', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Enable this option if a product is not shipped or there is no shipping cost', 'woocommerce' ) ); ?></label>
<?php if ( get_option( 'woocommerce_manage_stock' ) == 'yes' ) : ?>
<label><input type="checkbox" class="checkbox variable_manage_stock" name="variable_manage_stock[<?php echo $loop; ?>]" <?php checked( isset( $_manage_stock ) ? $_manage_stock : '', 'yes' ); ?> /> <?php _e( 'Manage stock?', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e( 'Enable this option to enable stock management at variation level', 'woocommerce' ); ?>" href="#">[?]</a></label>
<label><input type="checkbox" class="checkbox variable_manage_stock" name="variable_manage_stock[<?php echo $loop; ?>]" <?php checked( isset( $_manage_stock ) ? $_manage_stock : '', 'yes' ); ?> /> <?php _e( 'Manage stock?', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Enable this option to enable stock management at variation level', 'woocommerce' ) ); ?></label>
<?php endif; ?>
@ -108,12 +108,25 @@ extract( $variation_data );
<input type="text" class="sale_price_dates_to" name="variable_sale_price_dates_to[<?php echo $loop; ?>]" value="<?php echo ! empty( $_sale_price_dates_to ) ? date_i18n( 'Y-m-d', $_sale_price_dates_to ) : ''; ?>" placeholder="<?php echo esc_attr_x('To&hellip;', 'placeholder', 'woocommerce') ?> YYYY-MM-DD" maxlength="10" pattern="[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])" />
</p>
</div>
<?php
/**
* woocommerce_variation_options_pricing action
*
* @since 2.5.0
*
* @param int $loop
* @param array $variation_data
* @param WP_Post $variation
*/
do_action( 'woocommerce_variation_options_pricing', $loop, $variation_data, $variation );
?>
</div>
<?php if ( 'yes' == get_option( 'woocommerce_manage_stock' ) ) : ?>
<div class="show_if_variation_manage_stock" style="display: none;">
<p class="form-row form-row-first">
<label><?php _e( 'Stock Qty:', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e( 'Enter a quantity to enable stock management at variation level, or leave blank to use the parent product\'s options.', 'woocommerce' ); ?>" href="#">[?]</a></label>
<label><?php _e( 'Stock Qty:', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Enter a quantity to enable stock management at variation level, or leave blank to use the parent product\'s options.', 'woocommerce' ) ); ?></label>
<input type="number" size="5" name="variable_stock[<?php echo $loop; ?>]" value="<?php if ( isset( $_stock ) ) echo esc_attr( wc_stock_amount( $_stock ) ); ?>" step="any" />
</p>
<p class="form-row form-row-last">
@ -126,12 +139,25 @@ extract( $variation_data );
?>
</select>
</p>
<?php
/**
* woocommerce_product_options_inventory action
*
* @since 2.5.0
*
* @param int $loop
* @param array $variation_data
* @param WP_Post $variation
*/
do_action( 'woocommerce_product_options_inventory', $loop, $variation_data, $variation );
?>
</div>
<?php endif; ?>
<div class="">
<p class="form-row form-row-full">
<label><?php _e( 'Stock status', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e( 'Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend.', 'woocommerce' ); ?>" href="#">[?]</a></label>
<label><?php _e( 'Stock status', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend.', 'woocommerce' ) ); ?></label>
<select name="variable_stock_status[<?php echo $loop; ?>]">
<?php
foreach ( $parent_data['stock_status_options'] as $key => $value ) {
@ -146,7 +172,7 @@ extract( $variation_data );
<div>
<?php if ( wc_product_weight_enabled() ) : ?>
<p class="form-row hide_if_variation_virtual form-row-first">
<label><?php echo __( 'Weight', 'woocommerce' ) . ' (' . esc_html( get_option( 'woocommerce_weight_unit' ) ) . '):'; ?> <a class="tips" data-tip="<?php esc_attr_e( 'Enter a weight for this variation or leave blank to use the parent product weight.', 'woocommerce' ); ?>" href="#">[?]</a></label>
<label><?php echo __( 'Weight', 'woocommerce' ) . ' (' . esc_html( get_option( 'woocommerce_weight_unit' ) ) . '):'; ?> <?php echo wc_help_tip( __( 'Enter a weight for this variation or leave blank to use the parent product weight.', 'woocommerce' ) ); ?></a></label>
<input type="text" size="5" name="variable_weight[<?php echo $loop; ?>]" value="<?php if ( isset( $_weight ) ) echo esc_attr( $_weight ); ?>" placeholder="<?php echo esc_attr( $parent_data['weight'] ); ?>" class="wc_input_decimal" />
</p>
<?php else : ?>
@ -162,6 +188,19 @@ extract( $variation_data );
<?php else : ?>
<p>&nbsp;</p>
<?php endif; ?>
<?php
/**
* woocommerce_product_options_dimensions action
*
* @since 2.5.0
*
* @param int $loop
* @param array $variation_data
* @param WP_Post $variation
*/
do_action( 'woocommerce_product_options_dimensions', $loop, $variation_data, $variation );
?>
</div>
<?php endif; ?>
<div>
@ -189,6 +228,19 @@ extract( $variation_data );
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $key === $_tax_class, true, false ) . '>' . esc_html( $value ) . '</option>';
?></select>
</p>
<?php
/**
* woocommerce_product_options_tax action
*
* @since 2.5.0
*
* @param int $loop
* @param array $variation_data
* @param WP_Post $variation
*/
do_action( 'woocommerce_product_options_tax', $loop, $variation_data, $variation );
?>
<?php endif; ?>
<p class="form-row form-row-full">
@ -202,8 +254,8 @@ extract( $variation_data );
<table class="widefat">
<thead>
<div>
<th><?php _e( 'Name', 'woocommerce' ); ?> <span class="tips" data-tip="<?php esc_attr_e( 'This is the name of the download shown to the customer.', 'woocommerce' ); ?>">[?]</span></th>
<th colspan="2"><?php _e( 'File URL', 'woocommerce' ); ?> <span class="tips" data-tip="<?php esc_attr_e( 'This is the URL or absolute path to the file which customers will get access to. URLs entered here should already be encoded.', 'woocommerce' ); ?>">[?]</span></th>
<th><?php _e( 'Name', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the name of the download shown to the customer.', 'woocommerce' ) ); ?></th>
<th colspan="2"><?php _e( 'File URL', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the URL or absolute path to the file which customers will get access to. URLs entered here should already be encoded.', 'woocommerce' ) ); ?></th>
<th>&nbsp;</th>
</div>
</thead>
@ -242,13 +294,26 @@ extract( $variation_data );
</div>
<div class="show_if_variation_downloadable" style="display: none;">
<p class="form-row form-row-first">
<label><?php _e( 'Download Limit:', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e( 'Leave blank for unlimited re-downloads.', 'woocommerce' ); ?>" href="#">[?]</a></label>
<label><?php _e( 'Download Limit:', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Leave blank for unlimited re-downloads.', 'woocommerce' ) ); ?></a></label>
<input type="number" size="5" name="variable_download_limit[<?php echo $loop; ?>]" value="<?php if ( isset( $_download_limit ) ) echo esc_attr( $_download_limit ); ?>" placeholder="<?php esc_attr_e( 'Unlimited', 'woocommerce' ); ?>" step="1" min="0" />
</p>
<p class="form-row form-row-last">
<label><?php _e( 'Download Expiry:', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e( 'Enter the number of days before a download link expires, or leave blank.', 'woocommerce' ); ?>" href="#">[?]</a></label>
<label><?php _e( 'Download Expiry:', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Enter the number of days before a download link expires, or leave blank.', 'woocommerce' ) ); ?></a></label>
<input type="number" size="5" name="variable_download_expiry[<?php echo $loop; ?>]" value="<?php if ( isset( $_download_expiry ) ) echo esc_attr( $_download_expiry ); ?>" placeholder="<?php esc_attr_e( 'Unlimited', 'woocommerce' ); ?>" step="1" min="0" />
</p>
<?php
/**
* woocommerce_product_options_download action
*
* @since 2.5.0
*
* @param int $loop
* @param array $variation_data
* @param WP_Post $variation
*/
do_action( 'woocommerce_product_options_download', $loop, $variation_data, $variation );
?>
</div>
<?php do_action( 'woocommerce_product_after_variable_attributes', $loop, $variation_data, $variation ); ?>
</div>

View File

@ -317,7 +317,8 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
$this->report_data->net_sales = wc_format_decimal( $this->report_data->total_sales - $this->report_data->total_shipping - $this->report_data->total_tax - $this->report_data->total_shipping_tax, 2 );
// Calculate average based on net
$this->report_data->average_sales = wc_format_decimal( $this->report_data->net_sales / ( $this->chart_interval + 1 ), 2 );
$this->report_data->average_sales = wc_format_decimal( $this->report_data->net_sales / ( $this->chart_interval + 1 ), 2 );
$this->report_data->average_total_sales = wc_format_decimal( $this->report_data->total_sales / ( $this->chart_interval + 1 ), 2 );
// Total orders and discounts also includes those which have been refunded at some point
$this->report_data->total_orders = absint( array_sum( wp_list_pluck( $this->report_data->order_counts, 'count' ) ) );
@ -338,11 +339,13 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
switch ( $this->chart_groupby ) {
case 'day' :
$average_sales_title = sprintf( __( '%s average daily sales', 'woocommerce' ), '<strong>' . wc_price( $data->average_sales ) . '</strong>' );
$average_total_sales_title = sprintf( __( '%s average gross daily sales', 'woocommerce' ), '<strong>' . wc_price( $data->average_total_sales ) . '</strong>' );
$average_sales_title = sprintf( __( '%s average net daily sales', 'woocommerce' ), '<strong>' . wc_price( $data->average_sales ) . '</strong>' );
break;
case 'month' :
default :
$average_sales_title = sprintf( __( '%s average monthly sales', 'woocommerce' ), '<strong>' . wc_price( $data->average_sales ) . '</strong>' );
$average_total_sales_title = sprintf( __( '%s average gross monthly sales', 'woocommerce' ), '<strong>' . wc_price( $data->average_total_sales ) . '</strong>' );
$average_sales_title = sprintf( __( '%s average net monthly sales', 'woocommerce' ), '<strong>' . wc_price( $data->average_sales ) . '</strong>' );
break;
}
@ -350,21 +353,30 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
'title' => sprintf( __( '%s gross sales in this period', 'woocommerce' ), '<strong>' . wc_price( $data->total_sales ) . '</strong>' ),
'placeholder' => __( 'This is the sum of the order totals after any refunds and including shipping and taxes.', 'woocommerce' ),
'color' => $this->chart_colours['sales_amount'],
'highlight_series' => 5
);
$legend[] = array(
'title' => sprintf( __( '%s net sales in this period', 'woocommerce' ), '<strong>' . wc_price( $data->net_sales ) . '</strong>' ),
'placeholder' => __( 'This is the sum of the order totals after any refunds and excluding shipping and taxes.', 'woocommerce' ),
'color' => $this->chart_colours['net_sales_amount'],
'highlight_series' => 6
);
if ( $data->average_sales > 0 ) {
if ( $data->average_total_sales > 0 ) {
$legend[] = array(
'title' => $average_sales_title,
'title' => $average_total_sales_title,
'color' => $this->chart_colours['average'],
'highlight_series' => 2
);
}
$legend[] = array(
'title' => sprintf( __( '%s net sales in this period', 'woocommerce' ), '<strong>' . wc_price( $data->net_sales ) . '</strong>' ),
'placeholder' => __( 'This is the sum of the order totals after any refunds and excluding shipping and taxes.', 'woocommerce' ),
'color' => $this->chart_colours['net_sales_amount'],
'highlight_series' => 7
);
if ( $data->average_sales > 0 ) {
$legend[] = array(
'title' => $average_sales_title,
'color' => $this->chart_colours['net_average'],
'highlight_series' => 3
);
}
$legend[] = array(
'title' => sprintf( __( '%s orders placed', 'woocommerce' ), '<strong>' . $data->total_orders . '</strong>' ),
'color' => $this->chart_colours['order_count'],
@ -379,17 +391,17 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
$legend[] = array(
'title' => sprintf( _nx( '%s refunded %d order', '%s refunded %d orders', $this->report_data->total_refunded_orders, '%s = amount of the refunds, %d = number of refunded orders.', 'woocommerce' ), '<strong>' . wc_price( $data->total_refunds ) . '</strong>', $this->report_data->total_refunded_orders ) . ' (' . sprintf( _n( '%d item', '%d items', $this->report_data->refunded_order_items, 'woocommerce' ), $this->report_data->refunded_order_items ) . ')',
'color' => $this->chart_colours['refund_amount'],
'highlight_series' => 7
'highlight_series' => 8
);
$legend[] = array(
'title' => sprintf( __( '%s charged for shipping', 'woocommerce' ), '<strong>' . wc_price( $data->total_shipping ) . '</strong>' ),
'color' => $this->chart_colours['shipping_amount'],
'highlight_series' => 4
'highlight_series' => 5
);
$legend[] = array(
'title' => sprintf( __( '%s worth of coupons used', 'woocommerce' ), '<strong>' . wc_price( $data->total_coupons ) . '</strong>' ),
'color' => $this->chart_colours['coupon_amount'],
'highlight_series' => 3
'highlight_series' => 2
);
return $legend;
@ -409,7 +421,8 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
$this->chart_colours = array(
'sales_amount' => '#b1d4ea',
'net_sales_amount' => '#3498db',
'average' => '#95a5a6',
'average' => '#b1d4ea',
'net_average' => '#3498db',
'order_count' => '#dbe1e3',
'item_count' => '#ecf0f1',
'shipping_amount' => '#5cc488',
@ -479,22 +492,27 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
$shipping_tax_amounts = $this->prepare_chart_data( $this->report_data->orders, 'post_date', 'total_shipping_tax', $this->chart_interval, $this->start_date, $this->chart_groupby );
$tax_amounts = $this->prepare_chart_data( $this->report_data->orders, 'post_date', 'total_tax', $this->chart_interval, $this->start_date, $this->chart_groupby );
$net_order_amounts = array();
$net_order_amounts = array();
$gross_order_amounts = array();
foreach ( $order_amounts as $order_amount_key => $order_amount_value ) {
$gross_order_amounts[ $order_amount_key ] = $order_amount_value;
$gross_order_amounts[ $order_amount_key ][1] = $gross_order_amounts[ $order_amount_key ][1] - $refund_amounts[ $order_amount_key ][1];
$net_order_amounts[ $order_amount_key ] = $order_amount_value;
$net_order_amounts[ $order_amount_key ][1] = $net_order_amounts[ $order_amount_key ][1] - $shipping_amounts[ $order_amount_key ][1] - $shipping_tax_amounts[ $order_amount_key ][1] - $tax_amounts[ $order_amount_key ][1];
$net_order_amounts[ $order_amount_key ][1] = $net_order_amounts[ $order_amount_key ][1] - $refund_amounts[ $order_amount_key ][1] - $shipping_amounts[ $order_amount_key ][1] - $shipping_tax_amounts[ $order_amount_key ][1] - $tax_amounts[ $order_amount_key ][1];
}
// Encode in json format
$chart_data = json_encode( array(
'order_counts' => array_values( $order_counts ),
'order_item_counts' => array_values( $order_item_counts ),
'order_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $order_amounts ) ),
'net_order_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $net_order_amounts ) ),
'shipping_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $shipping_amounts ) ),
'coupon_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $coupon_amounts ) ),
'refund_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $refund_amounts ) )
'order_counts' => array_values( $order_counts ),
'order_item_counts' => array_values( $order_item_counts ),
'order_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $order_amounts ) ),
'gross_order_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $gross_order_amounts ) ),
'net_order_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $net_order_amounts ) ),
'shipping_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $shipping_amounts ) ),
'coupon_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $coupon_amounts ) ),
'refund_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $refund_amounts ) )
) );
?>
<div class="chart-container">
@ -525,8 +543,8 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
hoverable: false
},
{
label: "<?php echo esc_js( __( 'Average sales amount', 'woocommerce' ) ) ?>",
data: [ [ <?php echo min( array_keys( $order_amounts ) ); ?>, <?php echo $this->report_data->average_sales; ?> ], [ <?php echo max( array_keys( $order_amounts ) ); ?>, <?php echo $this->report_data->average_sales; ?> ] ],
label: "<?php echo esc_js( __( 'Average gross sales amount', 'woocommerce' ) ) ?>",
data: [ [ <?php echo min( array_keys( $order_amounts ) ); ?>, <?php echo $this->report_data->average_total_sales; ?> ], [ <?php echo max( array_keys( $order_amounts ) ); ?>, <?php echo $this->report_data->average_total_sales; ?> ] ],
yaxis: 2,
color: '<?php echo $this->chart_colours['average']; ?>',
points: { show: false },
@ -534,6 +552,16 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
shadowSize: 0,
hoverable: false
},
{
label: "<?php echo esc_js( __( 'Average net sales amount', 'woocommerce' ) ) ?>",
data: [ [ <?php echo min( array_keys( $order_amounts ) ); ?>, <?php echo $this->report_data->average_sales; ?> ], [ <?php echo max( array_keys( $order_amounts ) ); ?>, <?php echo $this->report_data->average_sales; ?> ] ],
yaxis: 2,
color: '<?php echo $this->chart_colours['net_average']; ?>',
points: { show: false },
lines: { show: true, lineWidth: 2, fill: false },
shadowSize: 0,
hoverable: false
},
{
label: "<?php echo esc_js( __( 'Coupon amount', 'woocommerce' ) ) ?>",
data: order_data.coupon_amounts,
@ -556,7 +584,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
},
{
label: "<?php echo esc_js( __( 'Gross Sales amount', 'woocommerce' ) ) ?>",
data: order_data.order_amounts,
data: order_data.gross_order_amounts,
yaxis: 2,
color: '<?php echo $this->chart_colours['sales_amount']; ?>',
points: { show: true, radius: 5, lineWidth: 2, fillColor: '#fff', fill: true },

View File

@ -144,9 +144,9 @@ class WC_Report_Taxes_By_Code extends WC_Admin_Report {
<th><?php _e( 'Tax', 'woocommerce' ); ?></th>
<th><?php _e( 'Rate', 'woocommerce' ); ?></th>
<th class="total_row"><?php _e( 'Number of Orders', 'woocommerce' ); ?></th>
<th class="total_row"><?php _e( 'Tax Amount', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e( 'This is the sum of the "Tax Rows" tax amount within your orders.', 'woocommerce' ); ?>" href="#">[?]</a></th>
<th class="total_row"><?php _e( 'Shipping Tax Amount', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e( 'This is the sum of the "Tax Rows" shipping tax amount within your orders.', 'woocommerce' ); ?>" href="#">[?]</a></th>
<th class="total_row"><?php _e( 'Total Tax', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e( 'This is the total tax for the rate (shipping tax + product tax).', 'woocommerce' ); ?>" href="#">[?]</a></th>
<th class="total_row"><?php _e( 'Tax Amount', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the sum of the "Tax Rows" tax amount within your orders.', 'woocommerce' ) ); ?></th>
<th class="total_row"><?php _e( 'Shipping Tax Amount', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the sum of the "Tax Rows" shipping tax amount within your orders.', 'woocommerce' ) ); ?></th>
<th class="total_row"><?php _e( 'Total Tax', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the total tax for the rate (shipping tax + product tax).', 'woocommerce' ) ); ?></th>
</tr>
</thead>
<?php if ( $tax_rows ) : ?>

View File

@ -146,10 +146,10 @@ class WC_Report_Taxes_By_Date extends WC_Admin_Report {
<tr>
<th><?php _e( 'Period', 'woocommerce' ); ?></th>
<th class="total_row"><?php _e( 'Number of Orders', 'woocommerce' ); ?></th>
<th class="total_row"><?php _e( 'Total Sales', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e("This is the sum of the 'Order Total' field within your orders.", 'woocommerce'); ?>" href="#">[?]</a></th>
<th class="total_row"><?php _e( 'Total Shipping', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e("This is the sum of the 'Shipping Total' field within your orders.", 'woocommerce'); ?>" href="#">[?]</a></th>
<th class="total_row"><?php _e( 'Total Tax', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e( 'This is the total tax for the rate (shipping tax + product tax).', 'woocommerce' ); ?>" href="#">[?]</a></th>
<th class="total_row"><?php _e( 'Net profit', 'woocommerce' ); ?> <a class="tips" data-tip="<?php esc_attr_e("Total sales minus shipping and tax.", 'woocommerce'); ?>" href="#">[?]</a></th>
<th class="total_row"><?php _e( 'Total Sales', 'woocommerce' ); ?> <?php echo wc_help_tip( __( "This is the sum of the 'Order Total' field within your orders.", 'woocommerce' ) ); ?></th>
<th class="total_row"><?php _e( 'Total Shipping', 'woocommerce' ); ?> <?php echo wc_help_tip( __( "This is the sum of the 'Shipping Total' field within your orders.", 'woocommerce' ) ); ?></th>
<th class="total_row"><?php _e( 'Total Tax', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the total tax for the rate (shipping tax + product tax).', 'woocommerce' ) ); ?></th>
<th class="total_row"><?php _e( 'Net profit', 'woocommerce' ); ?> <?php echo wc_help_tip( __( "Total sales minus shipping and tax.", 'woocommerce' ) ); ?></th>
</tr>
</thead>
<?php if ( $tax_rows ) : ?>

View File

@ -200,7 +200,7 @@ class WC_Settings_General extends WC_Settings_Page {
* @param string $desc (default: '')
*/
public function color_picker( $name, $id, $value, $desc = '' ) {
echo '<div class="color_box"><strong><img class="help_tip" data-tip="' . esc_attr( $desc ) . '" src="' . WC()->plugin_url() . '/assets/images/help.png" height="16" width="16" /> ' . esc_html( $name ) . '</strong>
echo '<div class="color_box">' . wc_help_tip( $desc ) . '
<input name="' . esc_attr( $id ). '" id="' . esc_attr( $id ) . '" type="text" value="' . esc_attr( $value ) . '" class="colorpick" /> <div id="colorPickerDiv_' . esc_attr( $id ) . '" class="colorpickdiv"></div>
</div>';
}

View File

@ -290,7 +290,7 @@ class WC_Settings_Products extends WC_Settings_Page {
array(
'title' => __( 'Notification Recipient(s)', 'woocommerce' ),
'desc' => __( 'Enter recipients (comma separated) that will recieve this notification.', 'woocommerce' ),
'desc' => __( 'Enter recipients (comma separated) that will receive this notification.', 'woocommerce' ),
'id' => 'woocommerce_stock_email_recipient',
'type' => 'text',
'default' => get_option( 'admin_email' ),

View File

@ -203,7 +203,7 @@ class WC_Settings_Shipping extends WC_Settings_Page {
<th class="name"><?php _e( 'Name', 'woocommerce' ); ?></th>
<th class="id"><?php _e( 'ID', 'woocommerce' ); ?></th>
<th class="status"><?php _e( 'Enabled', 'woocommerce' ); ?></th>
<th class="priority"><?php _e( 'Selection Priority', 'woocommerce' ); ?> <span class="tips" data-tip="<?php echo esc_attr( __( 'Available methods will be chosen by default in this order. If multiple methods have the same priority, they will be sorted by cost.', 'woocommerce' ) ); ?>">[?]</span></th>
<th class="priority"><?php _e( 'Selection Priority', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Available methods will be chosen by default in this order. If multiple methods have the same priority, they will be sorted by cost.', 'woocommerce' ) ); ?></th>
</tr>
</thead>
<tbody>

View File

@ -104,12 +104,76 @@ class WC_Settings_Tax extends WC_Settings_Page {
* Output tax rate tables
*/
public function output_tax_rates() {
global $wpdb;
global $wpdb,
$current_section;
$page = ! empty( $_GET['p'] ) ? absint( $_GET['p'] ) : 1;
$limit = 100;
$current_class = $this->get_current_tax_class();
$countries = array();
foreach ( WC()->countries->get_allowed_countries() as $value => $label ) {
$countries[] = array(
'label' => $label,
'value' => $value,
);
}
$states = array();
foreach ( WC()->countries->get_allowed_country_states() as $label ) {
foreach ( $label as $code => $state ) {
$states[] = array(
'label' => $state,
'value' => $code,
);
}
}
$base_url = admin_url( add_query_arg( array(
'page' => 'wc-settings',
'tab' => 'tax',
'section' => $current_section,
), 'admin.php' ) );
// Localize and enqueue our js.
wp_localize_script( 'wc-settings-tax', 'htmlSettingsTaxLocalizeScript', array(
'current_class' => $current_class,
'wc_tax_nonce' => wp_create_nonce( 'wc_tax_nonce-class:' . $current_class ),
'base_url' => $base_url,
'rates' => array_values( WC_Tax::get_rates_for_tax_class( $current_class ) ),
'page' => ! empty( $_GET['p'] ) ? absint( $_GET['p'] ) : 1,
'limit' => 100,
'countries' => $countries,
'states' => $states,
'default_rate' => array(
'tax_rate_id' => 0,
'tax_rate_country' => '',
'tax_rate_state' => '',
'tax_rate' => '',
'tax_rate_name' => '',
'tax_rate_priority' => 1,
'tax_rate_compound' => 0,
'tax_rate_shipping' => 1,
'tax_rate_order' => null,
'tax_rate_class' => $current_class,
),
'strings' => array(
'no_rows_selected' => __( 'No row(s) selected', 'woocommerce' ),
'unload_confirmation_msg' => __( 'Your changed data will be lost if you leave this page without saving.', 'woocommerce' ),
'csv_data_cols' => array(
__( 'Country Code', 'woocommerce' ),
__( 'State Code', 'woocommerce' ),
__( 'ZIP/Postcode', 'woocommerce' ),
__( 'City', 'woocommerce' ),
__( 'Rate %', 'woocommerce' ),
__( 'Tax Name', 'woocommerce' ),
__( 'Priority', 'woocommerce' ),
__( 'Compound', 'woocommerce' ),
__( 'Shipping', 'woocommerce' ),
__( 'Tax Class', 'woocommerce' ),
),
),
) );
wp_enqueue_script( 'wc-settings-tax' );
include( 'views/html-settings-tax.php' );
}
@ -117,7 +181,7 @@ class WC_Settings_Tax extends WC_Settings_Page {
* Get tax class being edited
* @return string
*/
private function get_current_tax_class() {
private static function get_current_tax_class() {
global $current_section;
$tax_classes = WC_Tax::get_tax_classes();

View File

@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<tr valign="top">
<th scope="row" class="titledesc">
<label for="key_description"><?php _e( 'Description', 'woocommerce' ); ?></label>
<img class="help_tip" data-tip="<?php esc_attr_e( 'Friendly name for identifying this key.', 'woocommerce' ); ?>" src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
<?php echo wc_help_tip( __( 'Friendly name for identifying this key.', 'woocommerce' ) ); ?>
</th>
<td class="forminp">
<input id="key_description" type="text" class="input-text regular-input" value="<?php echo esc_attr( $key_data['description'] ); ?>" />
@ -23,7 +23,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<tr valign="top">
<th scope="row" class="titledesc">
<label for="key_user"><?php _e( 'User', 'woocommerce' ); ?></label>
<img class="help_tip" data-tip="<?php esc_attr_e( 'Owner of these keys.', 'woocommerce' ); ?>" src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
<?php echo wc_help_tip( __( 'Owner of these keys.', 'woocommerce' ) ); ?>
</th>
<td class="forminp">
<?php
@ -38,7 +38,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<tr valign="top">
<th scope="row" class="titledesc">
<label for="key_permissions"><?php _e( 'Permissions', 'woocommerce' ); ?></label>
<img class="help_tip" data-tip="<?php esc_attr_e( 'Select the access type of these keys.', 'woocommerce' ); ?>" src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
<?php echo wc_help_tip( __( 'Select the access type of these keys.', 'woocommerce' ) ); ?>
</th>
<td class="forminp">
<select id="key_permissions" class="wc-enhanced-select">

View File

@ -3,273 +3,125 @@ if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<h3><?php printf( __( 'Tax Rates for the "%s" Class', 'woocommerce' ), $current_class ? esc_html( $current_class ) : __( 'Standard', 'woocommerce' ) ); ?></h3>
<p><?php printf( __( 'Define tax rates for countries and states below. <a href="%s">See here</a> for available alpha-2 country codes.', 'woocommerce' ), 'http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes' ); ?></p>
<div class="wc-tax-rates-search" id="rates-search">
<input type="search" class="wc-tax-rates-search-field" placeholder="<?php esc_attr_e( 'Search…', 'woocommerce' ); ?>" value="<?php if ( isset( $_GET['s'] ) ) { echo esc_attr( $_GET['s'] ); } ?>" />
</div>
<h3><?php printf( __( '"%s" Tax Rates', 'woocommerce' ), $current_class ? esc_html( $current_class ) : __( 'Standard', 'woocommerce' ) ); ?></h3>
<table class="wc_tax_rates wc_input_table sortable widefat">
<thead>
<tr>
<th class="sort">&nbsp;</th>
<th width="8%"><?php _e( 'Country&nbsp;Code', 'woocommerce' ); ?>&nbsp;<span class="tips" data-tip="<?php esc_attr_e('A 2 digit country code, e.g. US. Leave blank to apply to all.', 'woocommerce'); ?>">[?]</span></th>
<th width="8%"><?php _e( 'State&nbsp;Code', 'woocommerce' ); ?>&nbsp;<span class="tips" data-tip="<?php esc_attr_e('A 2 digit state code, e.g. AL. Leave blank to apply to all.', 'woocommerce'); ?>">[?]</span></th>
<th><?php _e( 'ZIP/Postcode', 'woocommerce' ); ?>&nbsp;<span class="tips" data-tip="<?php esc_attr_e('Postcode for this rule. Semi-colon (;) separate multiple values. Leave blank to apply to all areas. Wildcards (*) can be used. Ranges for numeric postcodes (e.g. 12345-12350) will be expanded into individual postcodes.', 'woocommerce'); ?>">[?]</span></th>
<th><?php _e( 'City', 'woocommerce' ); ?>&nbsp;<span class="tips" data-tip="<?php esc_attr_e('Cities for this rule. Semi-colon (;) separate multiple values. Leave blank to apply to all cities.', 'woocommerce'); ?>">[?]</span></th>
<th width="8%"><?php _e( 'Rate&nbsp;%', 'woocommerce' ); ?>&nbsp;<span class="tips" data-tip="<?php esc_attr_e( 'Enter a tax rate (percentage) to 4 decimal places.', 'woocommerce' ); ?>">[?]</span></th>
<th width="8%"><?php _e( 'Tax&nbsp;Name', 'woocommerce' ); ?>&nbsp;<span class="tips" data-tip="<?php esc_attr_e('Enter a name for this tax rate.', 'woocommerce'); ?>">[?]</span></th>
<th width="8%"><?php _e( 'Priority', 'woocommerce' ); ?>&nbsp;<span class="tips" data-tip="<?php esc_attr_e('Choose a priority for this tax rate. Only 1 matching rate per priority will be used. To define multiple tax rates for a single area you need to specify a different priority per rate.', 'woocommerce'); ?>">[?]</span></th>
<th width="8%"><?php _e( 'Compound', 'woocommerce' ); ?>&nbsp;<span class="tips" data-tip="<?php esc_attr_e('Choose whether or not this is a compound rate. Compound tax rates are applied on top of other tax rates.', 'woocommerce'); ?>">[?]</span></th>
<th width="8%"><?php _e( 'Shipping', 'woocommerce' ); ?>&nbsp;<span class="tips" data-tip="<?php esc_attr_e('Choose whether or not this tax rate also gets applied to shipping.', 'woocommerce'); ?>">[?]</span></th>
<th width="8%"><a href="http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes" target="_blank"><?php _e( 'Country&nbsp;Code', 'woocommerce' ); ?></a>&nbsp;<?php echo wc_help_tip( __( 'A 2 digit country code, e.g. US. Leave blank to apply to all.', 'woocommerce' ) ); ?></th>
<th width="8%"><?php _e( 'State&nbsp;Code', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'A 2 digit state code, e.g. AL. Leave blank to apply to all.', 'woocommerce' ) ); ?></th>
<th><?php _e( 'ZIP/Postcode', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Postcode for this rule. Semi-colon (;) separate multiple values. Leave blank to apply to all areas. Wildcards (*) can be used. Ranges for numeric postcodes (e.g. 12345-12350) will be expanded into individual postcodes.', 'woocommerce' ) ); ?></th>
<th><?php _e( 'City', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Cities for this rule. Semi-colon (;) separate multiple values. Leave blank to apply to all cities.', 'woocommerce' ) ); ?></th>
<th width="8%"><?php _e( 'Rate&nbsp;%', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Enter a tax rate (percentage) to 4 decimal places.', 'woocommerce' ) ); ?></th>
<th width="8%"><?php _e( 'Tax&nbsp;Name', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Enter a name for this tax rate.', 'woocommerce' ) ); ?></th>
<th width="8%"><?php _e( 'Priority', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Choose a priority for this tax rate. Only 1 matching rate per priority will be used. To define multiple tax rates for a single area you need to specify a different priority per rate.', 'woocommerce' ) ); ?></th>
<th width="8%"><?php _e( 'Compound', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Choose whether or not this is a compound rate. Compound tax rates are applied on top of other tax rates.', 'woocommerce' ) ); ?></th>
<th width="8%"><?php _e( 'Shipping', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Choose whether or not this tax rate also gets applied to shipping.', 'woocommerce' ) ); ?></th>
</tr>
</thead>
<tbody id="rates">
<?php
$rates = $wpdb->get_results( $wpdb->prepare(
"SELECT * FROM {$wpdb->prefix}woocommerce_tax_rates
WHERE tax_rate_class = %s
ORDER BY tax_rate_order
LIMIT %d, %d
" ,
sanitize_title( $current_class ),
( $page - 1 ) * $limit,
$limit
) );
foreach ( $rates as $rate ) {
?>
<tr class="tips" data-tip="<?php echo __( 'Tax rate ID', 'woocommerce' ) . ': ' . $rate->tax_rate_id; ?>">
<td class="sort"><input type="hidden" class="remove_tax_rate" name="remove_tax_rate[<?php echo $rate->tax_rate_id ?>]" value="0" /></td>
<td class="country" width="8%">
<input type="text" value="<?php echo esc_attr( $rate->tax_rate_country ) ?>" placeholder="*" name="tax_rate_country[<?php echo $rate->tax_rate_id ?>]" class="wc_input_country_iso" />
</td>
<td class="state" width="8%">
<input type="text" value="<?php echo esc_attr( $rate->tax_rate_state ) ?>" placeholder="*" name="tax_rate_state[<?php echo $rate->tax_rate_id ?>]" />
</td>
<td class="postcode">
<input type="text" value="<?php
$locations = $wpdb->get_col( $wpdb->prepare( "SELECT location_code FROM {$wpdb->prefix}woocommerce_tax_rate_locations WHERE location_type='postcode' AND tax_rate_id = %d ORDER BY location_code", $rate->tax_rate_id ) );
echo esc_attr( implode( '; ', $locations ) );
?>" placeholder="*" data-name="tax_rate_postcode[<?php echo $rate->tax_rate_id ?>]" />
</td>
<td class="city">
<input type="text" value="<?php
$locations = $wpdb->get_col( $wpdb->prepare( "SELECT location_code FROM {$wpdb->prefix}woocommerce_tax_rate_locations WHERE location_type='city' AND tax_rate_id = %d ORDER BY location_code", $rate->tax_rate_id ) );
echo esc_attr( implode( '; ', $locations ) );
?>" placeholder="*" data-name="tax_rate_city[<?php echo $rate->tax_rate_id ?>]" />
</td>
<td class="rate" width="8%">
<input type="number" step="any" min="0" value="<?php echo esc_attr( $rate->tax_rate ) ?>" placeholder="0" name="tax_rate[<?php echo $rate->tax_rate_id ?>]" />
</td>
<td class="name" width="8%">
<input type="text" value="<?php echo esc_attr( $rate->tax_rate_name ) ?>" name="tax_rate_name[<?php echo $rate->tax_rate_id ?>]" />
</td>
<td class="priority" width="8%">
<input type="number" step="1" min="1" value="<?php echo esc_attr( $rate->tax_rate_priority ) ?>" name="tax_rate_priority[<?php echo $rate->tax_rate_id ?>]" />
</td>
<td class="compound" width="8%">
<input type="checkbox" class="checkbox" name="tax_rate_compound[<?php echo $rate->tax_rate_id ?>]" <?php checked( $rate->tax_rate_compound, '1' ); ?> />
</td>
<td class="apply_to_shipping" width="8%">
<input type="checkbox" class="checkbox" name="tax_rate_shipping[<?php echo $rate->tax_rate_id ?>]" <?php checked($rate->tax_rate_shipping, '1' ); ?> />
</td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<th colspan="10">
<a href="#" class="button plus insert"><?php _e( 'Insert row', 'woocommerce' ); ?></a>
<a href="#" class="button minus remove_tax_rates"><?php _e( 'Remove selected row(s)', 'woocommerce' ); ?></a>
<div class="pagination">
<?php
echo str_replace( 'page-numbers', 'page-numbers button', paginate_links( array(
'base' => esc_url_raw( add_query_arg( 'p', '%#%', remove_query_arg( 'p' ) ) ),
'format' => '',
'add_args' => '',
'type' => 'plain',
'prev_text' => '&laquo;',
'next_text' => '&raquo;',
'current' => $page,
'total' => ceil( absint( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(tax_rate_id) FROM {$wpdb->prefix}woocommerce_tax_rates WHERE tax_rate_class = %s;", sanitize_title( $current_class ) ) ) ) / $limit )
) ) );
?>
</div>
<a href="#" download="tax_rates.csv" class="button export"><?php _e( 'Export CSV', 'woocommerce' ); ?></a>
<a href="<?php echo admin_url( 'admin.php?import=woocommerce_tax_rate_csv' ); ?>" class="button import"><?php _e( 'Import CSV', 'woocommerce' ); ?></a>
</th>
</tr>
</tfoot>
<tbody id="rates">
<tr>
<th colspan="10" style="text-align: center;"><?php esc_html_e( 'Loading…', 'woocommerce' ); ?></th>
</tr>
</tbody>
</table>
<script type="text/javascript">
jQuery( function() {
jQuery('.wc_tax_rates .remove_tax_rates').click(function() {
var $tbody = jQuery('.wc_tax_rates').find('tbody');
if ( $tbody.find('tr.current').size() > 0 ) {
$current = $tbody.find('tr.current');
$current.find('input').val('');
$current.find('input.remove_tax_rate').val('1');
$current.each(function(){
if ( jQuery(this).is('.new') )
jQuery(this).remove();
else
jQuery(this).hide();
});
} else {
alert('<?php echo esc_js( __( 'No row(s) selected', 'woocommerce' ) ); ?>');
}
return false;
});
<script type="text/html" id="tmpl-wc-tax-table-row">
<tr class="tips" data-tip="<?php echo esc_attr( sprintf( __( 'Tax rate ID: %s', 'woocommerce' ), '{{ data.tax_rate_id }}' ) ); ?>" data-id="{{ data.tax_rate_id }}">
<td class="sort"></td>
jQuery('.wc_tax_rates .export').click(function() {
<td class="country">
<input type="text" value="{{ data.tax_rate_country }}" placeholder="*" name="tax_rate_country[{{ data.tax_rate_id }}]" class="wc_input_country_iso" data-attribute="tax_rate_country" />
</td>
var csv_data = "data:application/csv;charset=utf-8,<?php echo esc_js( implode( ',', array(
__( 'Country Code', 'woocommerce' ),
__( 'State Code', 'woocommerce' ),
__( 'ZIP/Postcode', 'woocommerce' ),
__( 'City', 'woocommerce' ),
__( 'Rate %', 'woocommerce' ),
__( 'Tax Name', 'woocommerce' ),
__( 'Priority', 'woocommerce' ),
__( 'Compound', 'woocommerce' ),
__( 'Shipping', 'woocommerce' ),
__( 'Tax Class', 'woocommerce' ),
) ) ); ?>\n";
<td class="state">
<input type="text" value="{{ data.tax_rate_state }}" placeholder="*" name="tax_rate_state[{{ data.tax_rate_id }}]" data-attribute="tax_rate_state" />
</td>
jQuery('#rates').find('tr:visible').each(function() {
var row = '';
jQuery(this).find('td:not(.sort) input').each(function() {
<td class="postcode">
<input type="text" value="<# if ( data.postcode ) print( data.postcode.join( '; ' ) ); #>" placeholder="*" data-name="tax_rate_postcode[{{ data.tax_rate_id }}]" data-attribute="postcode" />
</td>
if ( jQuery(this).is('.checkbox') ) {
<td class="city">
<input type="text" value="<# if ( data.city ) print( data.city.join( '; ' ) ); #>" placeholder="*" data-name="tax_rate_city[{{ data.tax_rate_id }}]" data-attribute="city" />
</td>
if ( jQuery(this).is(':checked') ) {
val = 1;
} else {
val = 0;
}
<td class="rate">
<input type="number" step="any" min="0" value="{{ data.tax_rate }}" placeholder="0" name="tax_rate[{{ data.tax_rate_id }}]" data-attribute="tax_rate" />
</td>
} else {
<td class="name">
<input type="text" value="{{ data.tax_rate_name }}" name="tax_rate_name[{{ data.tax_rate_id }}]" data-attribute="tax_rate_name" />
</td>
var val = jQuery(this).val();
<td class="priority">
<input type="number" step="1" min="1" value="{{ data.tax_rate_priority }}" name="tax_rate_priority[{{ data.tax_rate_id }}]" data-attribute="tax_rate_priority" />
</td>
if ( ! val )
val = jQuery(this).attr('placeholder');
}
<td class="compound">
<input type="checkbox" class="checkbox" name="tax_rate_compound[{{ data.tax_rate_id }}]" <# if ( parseInt( data.tax_rate_compound, 10 ) ) { #> checked="checked" <# } #> data-attribute="tax_rate_compound" />
</td>
row = row + val + ',';
});
row = row + '<?php echo $current_class; ?>';
//row.substring( 0, row.length - 1 );
csv_data = csv_data + row + "\n";
});
jQuery(this).attr( 'href', encodeURI( csv_data ) );
return true;
});
jQuery('.wc_tax_rates .insert').click(function() {
var $tbody = jQuery('.wc_tax_rates').find('tbody');
var size = $tbody.find('tr').size();
var code = '<tr class="new">\
<td class="sort"></td>\
<td class="country" width="8%">\
<input type="text" placeholder="*" name="tax_rate_country[new-' + size + ']" class="wc_input_country_iso" />\
</td>\
<td class="state" width="8%">\
<input type="text" placeholder="*" name="tax_rate_state[new-' + size + ']" />\
</td>\
<td class="postcode">\
<input type="text" placeholder="*" name="tax_rate_postcode[new-' + size + ']" />\
</td>\
<td class="city">\
<input type="text" placeholder="*" name="tax_rate_city[new-' + size + ']" />\
</td>\
<td class="rate" width="8%">\
<input type="number" step="any" min="0" placeholder="0" name="tax_rate[new-' + size + ']" />\
</td>\
<td class="name" width="8%">\
<input type="text" name="tax_rate_name[new-' + size + ']" />\
</td>\
<td class="priority" width="8%">\
<input type="number" step="1" min="1" value="1" name="tax_rate_priority[new-' + size + ']" />\
</td>\
<td class="compound" width="8%">\
<input type="checkbox" class="checkbox" name="tax_rate_compound[new-' + size + ']" />\
</td>\
<td class="apply_to_shipping" width="8%">\
<input type="checkbox" class="checkbox" name="tax_rate_shipping[new-' + size + ']" checked="checked" />\
</td>\
</tr>';
if ( $tbody.find('tr.current').size() > 0 ) {
$tbody.find('tr.current').after( code );
} else {
$tbody.append( code );
}
jQuery( "td.country input" ).autocomplete({
source: availableCountries,
minLength: 3
});
jQuery( "td.state input" ).autocomplete({
source: availableStates,
minLength: 3
});
return false;
});
jQuery('.wc_tax_rates td.postcode, .wc_tax_rates td.city').find('input').change(function() {
jQuery(this).attr( 'name', jQuery(this).attr( 'data-name' ) );
});
var availableCountries = [<?php
$countries = array();
foreach ( WC()->countries->get_allowed_countries() as $value => $label )
$countries[] = '{ label: "' . esc_attr( $label ) . '", value: "' . $value . '" }';
echo implode( ', ', $countries );
?>];
var availableStates = [<?php
$countries = array();
foreach ( WC()->countries->get_allowed_country_states() as $value => $label )
foreach ( $label as $code => $state )
$countries[] = '{ label: "' . esc_attr( $state ) . '", value: "' . $code . '" }';
echo implode( ', ', $countries );
?>];
jQuery( "td.country input" ).autocomplete({
source: availableCountries,
minLength: 3
});
jQuery( "td.state input" ).autocomplete({
source: availableStates,
minLength: 3
});
});
<td class="apply_to_shipping">
<input type="checkbox" class="checkbox" name="tax_rate_shipping[{{ data.tax_rate_id }}]" <# if ( parseInt( data.tax_rate_shipping, 10 ) ) { #> checked="checked" <# } #> data-attribute="tax_rate_shipping" />
</td>
</tr>
</script>
<script type="text/html" id="tmpl-wc-tax-table-row-empty">
<tr>
<th colspan="10" style="text-align:center"><?php esc_html_e( 'No Matching Tax Rates Found.', 'woocommerce' ); ?></th>
</tr>
</script>
<script type="text/html" id="tmpl-wc-tax-table-pagination">
<div class="tablenav">
<div class="tablenav-pages">
<span class="displaying-num"><?php printf( _x( '%s items', '%s will be a number eventually, but must be a string for now.', 'woocommerce' ), '{{ data.qty_rates }}' ); ?></span>
<span class="pagination-links">
<a class="tablenav-pages-navspan" data-goto="1">
<span class="screen-reader-text"><?php esc_html_e( 'First page', 'woocommerce' ); ?></span>
<span aria-hidden="true">&laquo;</span>
</a>
<a class="tablenav-pages-navspan" data-goto="<# print( Math.max( 1, parseInt( data.current_page, 10 ) - 1 ) ) #>">
<span class="screen-reader-text"><?php esc_html_e( 'Previous page', 'woocommerce' ); ?></span>
<span aria-hidden="true">&lsaquo;</span>
</a>
<span class="paging-input">
<label for="current-page-selector" class="screen-reader-text"><?php esc_html_e( 'Current Page', 'woocommerce' ); ?></label>
<?php printf( esc_html_x( '%1$s of %2$s', 'Pagination, like `1 of 3`', 'woocommerce' ),
'<input class="current-page" id="current-page-selector" type="text" name="paged" value="{{ data.current_page }}" size="<# print( data.qty_pages.toString().length ) #>" aria-describedby="table-paging">',
'<span class="total-pages">{{ data.qty_pages }}</span>' ); ?>
</span>
<a class="tablenav-pages-navspan" data-goto="<# print( Math.min( data.qty_pages, parseInt( data.current_page, 10 ) + 1 ) ) #>">
<span class="screen-reader-text"><?php esc_html_e( 'Next page', 'woocommerce' ); ?></span>
<span aria-hidden="true">&rsaquo;</span>
</a>
<a class="tablenav-pages-navspan" data-goto="{{ data.qty_pages }}">
<span class="screen-reader-text"><?php esc_html_e( 'Last page', 'woocommerce' ); ?></span>
<span aria-hidden="true">&raquo;</span>
</a>
</span>
</div>
</div>
</script>

View File

@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<tr valign="top">
<th scope="row" class="titledesc">
<label for="webhook_name"><?php _e( 'Name', 'woocommerce' ); ?></label>
<img class="help_tip" data-tip="<?php echo sprintf( __( 'Friendly name for identifying this webhook, defaults to Webhook created on %s.', 'woocommerce' ), strftime( _x( '%b %d, %Y @ %I:%M %p', 'Webhook created on date parsed by strftime', 'woocommerce' ) ) ); ?>" src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
<?php echo wc_help_tip( sprintf( __( 'Friendly name for identifying this webhook, defaults to Webhook created on %s.', 'woocommerce' ), strftime( _x( '%b %d, %Y @ %I:%M %p', 'Webhook created on date parsed by strftime', 'woocommerce' ) ) ) ); ?>
</th>
<td class="forminp">
<input name="webhook_name" id="webhook_name" type="text" class="input-text regular-input" value="<?php echo esc_attr( $webhook->get_name() ); ?>" />
@ -22,7 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<tr valign="top">
<th scope="row" class="titledesc">
<label for="webhook_status"><?php _e( 'Status', 'woocommerce' ); ?></label>
<img class="help_tip" data-tip="<?php esc_attr_e( 'The options are &quot;Active&quot; (delivers payload), &quot;Paused&quot; (does not deliver), or &quot;Disabled&quot; (does not deliver due delivery failures).', 'woocommerce' ); ?>" src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
<?php wc_help_tip( __( 'The options are &quot;Active&quot; (delivers payload), &quot;Paused&quot; (does not deliver), or &quot;Disabled&quot; (does not deliver due delivery failures).', 'woocommerce' ) ); ?>
</th>
<td class="forminp">
<select name="webhook_status" id="webhook_status" class="wc-enhanced-select">
@ -39,7 +39,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<tr valign="top">
<th scope="row" class="titledesc">
<label for="webhook_topic"><?php _e( 'Topic', 'woocommerce' ); ?></label>
<img class="help_tip" data-tip="<?php esc_attr_e( 'Select when the webhook will fire.', 'woocommerce' ); ?>" src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
<?php echo wc_help_tip( __( 'Select when the webhook will fire.', 'woocommerce' ) ); ?>
</th>
<td class="forminp">
<select name="webhook_topic" id="webhook_topic" class="wc-enhanced-select">
@ -73,7 +73,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<tr valign="top" id="webhook-action-event-wrap">
<th scope="row" class="titledesc">
<label for="webhook_action_event"><?php _e( 'Action Event', 'woocommerce' ); ?></label>
<img class="help_tip" data-tip="<?php esc_attr_e( 'Enter the Action that will trigger this webhook.', 'woocommerce' ); ?>" src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
<?php echo wc_help_tip( __( 'Enter the Action that will trigger this webhook.', 'woocommerce' ) ); ?>
</th>
<td class="forminp">
<input name="webhook_action_event" id="webhook_action_event" type="text" class="input-text regular-input" value="<?php echo esc_attr( $topic_data['event'] ); ?>" />
@ -82,7 +82,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<tr valign="top" id="webhook-custom-topic-wrap">
<th scope="row" class="titledesc">
<label for="webhook_custom_topic"><?php _e( 'Custom Topic', 'woocommerce' ); ?></label>
<img class="help_tip" data-tip="<?php esc_attr_e( 'Enter the Custom Topic that will trigger this webhook.', 'woocommerce' ); ?>" src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
<?php echo wc_help_tip( __( 'Enter the Custom Topic that will trigger this webhook.', 'woocommerce' ) ); ?>
</th>
<td class="forminp">
<input name="webhook_custom_topic" id="webhook_custom_topic" type="text" class="input-text regular-input" value="<?php echo esc_attr( $webhook->get_topic() ); ?>" />
@ -91,7 +91,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<tr valign="top">
<th scope="row" class="titledesc">
<label for="webhook_delivery_url"><?php _e( 'Delivery URL', 'woocommerce' ); ?></label>
<img class="help_tip" data-tip="<?php esc_attr_e( 'URL where the webhook payload is delivered.', 'woocommerce' ); ?>" src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
<?php echo wc_help_tip( __( 'URL where the webhook payload is delivered.', 'woocommerce' ) ); ?>
</th>
<td class="forminp">
<input name="webhook_delivery_url" id="webhook_delivery_url" type="text" class="input-text regular-input" value="<?php echo esc_attr( $webhook->get_delivery_url() ); ?>" />
@ -100,7 +100,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<tr valign="top">
<th scope="row" class="titledesc">
<label for="webhook_secret"><?php _e( 'Secret', 'woocommerce' ); ?></label>
<img class="help_tip" data-tip="<?php esc_attr_e( 'The Secret Key is used to generate a hash of the delivered webhook and provided in the request headers. This will default to the current API user\'s consumer secret if not provided.', 'woocommerce' ); ?>" src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
<?php echo wc_help_tip( __( 'The Secret Key is used to generate a hash of the delivered webhook and provided in the request headers. This will default to the current API user\'s consumer secret if not provided.', 'woocommerce' ) ); ?>
</th>
<td class="forminp">
<input name="webhook_secret" id="webhook_secret" type="text" class="input-text regular-input" value="<?php echo esc_attr( $webhook->get_secret() ); ?>" />

View File

@ -26,22 +26,22 @@ if ( ! defined( 'ABSPATH' ) ) {
<tbody>
<tr>
<td data-export-label="Home URL"><?php _e( 'Home URL', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The URL of your site\'s homepage.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The URL of your site\'s homepage.', 'woocommerce' ) ); ?></td>
<td><?php form_option( 'home' ); ?></td>
</tr>
<tr>
<td data-export-label="Site URL"><?php _e( 'Site URL', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The root URL of your site.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The root URL of your site.', 'woocommerce' ) ); ?></td>
<td><?php form_option( 'siteurl' ); ?></td>
</tr>
<tr>
<td data-export-label="WC Version"><?php _e( 'WC Version', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The version of WooCommerce installed on your site.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The version of WooCommerce installed on your site.', 'woocommerce' ) ); ?></td>
<td><?php echo esc_html( WC()->version ); ?></td>
</tr>
<tr>
<td data-export-label="Log Directory Writable"><?php _e( 'Log Directory Writable', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'Several WooCommerce extensions can write logs which makes debugging problems easier. The directory must be writable for this to happen.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'Several WooCommerce extensions can write logs which makes debugging problems easier. The directory must be writable for this to happen.', 'woocommerce' ) ); ?></td>
<td><?php
if ( @fopen( WC_LOG_DIR . 'test-log.log', 'a' ) ) {
echo '<mark class="yes">&#10004; <code>' . WC_LOG_DIR . '</code></mark> ';
@ -52,17 +52,17 @@ if ( ! defined( 'ABSPATH' ) ) {
</tr>
<tr>
<td data-export-label="WP Version"><?php _e( 'WP Version', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The version of WordPress installed on your site.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The version of WordPress installed on your site.', 'woocommerce' ) ); ?></td>
<td><?php bloginfo('version'); ?></td>
</tr>
<tr>
<td data-export-label="WP Multisite"><?php _e( 'WP Multisite', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'Whether or not you have WordPress Multisite enabled.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'Whether or not you have WordPress Multisite enabled.', 'woocommerce' ) ); ?></td>
<td><?php if ( is_multisite() ) echo '&#10004;'; else echo '&ndash;'; ?></td>
</tr>
<tr>
<td data-export-label="WP Memory Limit"><?php _e( 'WP Memory Limit', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The maximum amount of memory (RAM) that your site can use at one time.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The maximum amount of memory (RAM) that your site can use at one time.', 'woocommerce' ) ); ?></td>
<td><?php
$memory = wc_let_to_num( WP_MEMORY_LIMIT );
@ -75,12 +75,12 @@ if ( ! defined( 'ABSPATH' ) ) {
</tr>
<tr>
<td data-export-label="WP Debug Mode"><?php _e( 'WP Debug Mode', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'Displays whether or not WordPress is in Debug Mode.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'Displays whether or not WordPress is in Debug Mode.', 'woocommerce' ) ); ?></td>
<td><?php if ( defined('WP_DEBUG') && WP_DEBUG ) echo '<mark class="yes">&#10004;</mark>'; else echo '<mark class="no">&ndash;</mark>'; ?></td>
</tr>
<tr>
<td data-export-label="Language"><?php _e( 'Language', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The current language used by WordPress. Default = English', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The current language used by WordPress. Default = English', 'woocommerce' ) ); ?></td>
<td><?php echo get_locale() ?></td>
</tr>
</tbody>
@ -94,12 +94,12 @@ if ( ! defined( 'ABSPATH' ) ) {
<tbody>
<tr>
<td data-export-label="Server Info"><?php _e( 'Server Info', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'Information about the web server that is currently hosting your site.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'Information about the web server that is currently hosting your site.', 'woocommerce' ) ); ?></td>
<td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>
</tr>
<tr>
<td data-export-label="PHP Version"><?php _e( 'PHP Version', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The version of PHP installed on your hosting server.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The version of PHP installed on your hosting server.', 'woocommerce' ) ); ?></td>
<td><?php
// Check if phpversion function exists
if ( function_exists( 'phpversion' ) ) {
@ -118,28 +118,28 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php if ( function_exists( 'ini_get' ) ) : ?>
<tr>
<td data-export-label="PHP Post Max Size"><?php _e( 'PHP Post Max Size', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The largest filesize that can be contained in one post.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The largest filesize that can be contained in one post.', 'woocommerce' ) ); ?></td>
<td><?php echo size_format( wc_let_to_num( ini_get('post_max_size') ) ); ?></td>
</tr>
<tr>
<td data-export-label="PHP Time Limit"><?php _e( 'PHP Time Limit', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups)', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups)', 'woocommerce' ) ); ?></td>
<td><?php echo ini_get('max_execution_time'); ?></td>
</tr>
<tr>
<td data-export-label="PHP Max Input Vars"><?php _e( 'PHP Max Input Vars', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The maximum number of variables your server can use for a single function to avoid overloads.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The maximum number of variables your server can use for a single function to avoid overloads.', 'woocommerce' ) ); ?></td>
<td><?php echo ini_get('max_input_vars'); ?></td>
</tr>
<tr>
<td data-export-label="SUHOSIN Installed"><?php _e( 'SUHOSIN Installed', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. If enabled on your server, Suhosin may need to be configured to increase its data submission limits.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. If enabled on your server, Suhosin may need to be configured to increase its data submission limits.', 'woocommerce' ) ); ?></td>
<td><?php echo extension_loaded( 'suhosin' ) ? '&#10004;' : '&ndash;'; ?></td>
</tr>
<?php endif; ?>
<tr>
<td data-export-label="MySQL Version"><?php _e( 'MySQL Version', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The version of MySQL installed on your hosting server.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The version of MySQL installed on your hosting server.', 'woocommerce' ) ); ?></td>
<td>
<?php
/** @global wpdb $wpdb */
@ -150,12 +150,12 @@ if ( ! defined( 'ABSPATH' ) ) {
</tr>
<tr>
<td data-export-label="Max Upload Size"><?php _e( 'Max Upload Size', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The largest filesize that can be uploaded to your WordPress installation.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The largest filesize that can be uploaded to your WordPress installation.', 'woocommerce' ) ); ?></td>
<td><?php echo size_format( wp_max_upload_size() ); ?></td>
</tr>
<tr>
<td data-export-label="Default Timezone is UTC"><?php _e( 'Default Timezone is UTC', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The default timezone for your server.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The default timezone for your server.', 'woocommerce' ) ); ?></td>
<td><?php
$default_timezone = date_default_timezone_get();
if ( 'UTC' !== $default_timezone ) {
@ -170,7 +170,7 @@ if ( ! defined( 'ABSPATH' ) ) {
// fsockopen/cURL
$posting['fsockopen_curl']['name'] = 'fsockopen/cURL';
$posting['fsockopen_curl']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'Payment gateways can use cURL to communicate with remote servers to authorize payments, other plugins may also use it when communicating with remote services.', 'woocommerce' ) . '">[?]</a>';
$posting['fsockopen_curl']['help'] = wc_help_tip( __( 'Payment gateways can use cURL to communicate with remote servers to authorize payments, other plugins may also use it when communicating with remote services.', 'woocommerce' ) );
if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) {
$posting['fsockopen_curl']['success'] = true;
@ -181,7 +181,7 @@ if ( ! defined( 'ABSPATH' ) ) {
// SOAP
$posting['soap_client']['name'] = 'SoapClient';
$posting['soap_client']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'Some webservices like shipping use SOAP to get information from remote servers, for example, live shipping quotes from FedEx require SOAP to be installed.', 'woocommerce' ) . '">[?]</a>';
$posting['soap_client']['help'] = wc_help_tip( __( 'Some webservices like shipping use SOAP to get information from remote servers, for example, live shipping quotes from FedEx require SOAP to be installed.', 'woocommerce' ) );
if ( class_exists( 'SoapClient' ) ) {
$posting['soap_client']['success'] = true;
@ -192,7 +192,7 @@ if ( ! defined( 'ABSPATH' ) ) {
// DOMDocument
$posting['dom_document']['name'] = 'DOMDocument';
$posting['dom_document']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'woocommerce' ) . '">[?]</a>';
$posting['dom_document']['help'] = wc_help_tip( __( 'HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'woocommerce' ) );
if ( class_exists( 'DOMDocument' ) ) {
$posting['dom_document']['success'] = true;
@ -203,7 +203,7 @@ if ( ! defined( 'ABSPATH' ) ) {
// GZIP
$posting['gzip']['name'] = 'GZip';
$posting['gzip']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'GZip (gzopen) is used to open the GEOIP database from MaxMind.', 'woocommerce' ) . '">[?]</a>';
$posting['gzip']['help'] = wc_help_tip( __( 'GZip (gzopen) is used to open the GEOIP database from MaxMind.', 'woocommerce' ) );
if ( is_callable( 'gzopen' ) ) {
$posting['gzip']['success'] = true;
@ -214,7 +214,7 @@ if ( ! defined( 'ABSPATH' ) ) {
// WP Remote Post Check
$posting['wp_remote_post']['name'] = __( 'Remote Post', 'woocommerce');
$posting['wp_remote_post']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'PayPal uses this method of communicating when sending back transaction information.', 'woocommerce' ) . '">[?]</a>';
$posting['wp_remote_post']['help'] = wc_help_tip( __( 'PayPal uses this method of communicating when sending back transaction information.', 'woocommerce' ) );
$response = wp_safe_remote_post( 'https://www.paypal.com/cgi-bin/webscr', array(
'timeout' => 60,
@ -238,7 +238,7 @@ if ( ! defined( 'ABSPATH' ) ) {
// WP Remote Get Check
$posting['wp_remote_get']['name'] = __( 'Remote Get', 'woocommerce');
$posting['wp_remote_get']['help'] = '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'WooCommerce plugins may use this method of communication when checking for plugin updates.', 'woocommerce' ) . '">[?]</a>';
$posting['wp_remote_get']['help'] = wc_help_tip( __( 'WooCommerce plugins may use this method of communication when checking for plugin updates.', 'woocommerce' ) );
$response = wp_safe_remote_get( 'http://www.woothemes.com/wc-api/product-key-api?request=ping&network=' . ( is_multisite() ? '1' : '0' ) );
@ -282,12 +282,13 @@ if ( ! defined( 'ABSPATH' ) ) {
<tbody>
<tr>
<td data-export-label="WC Database Version"><?php _e( 'WC Database Version', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The version of WooCommerce that the database is formatted for. This should be the same as your WooCommerce Version.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The version of WooCommerce that the database is formatted for. This should be the same as your WooCommerce Version.', 'woocommerce' ) ); ?></td>
<td><?php echo esc_html( get_option( 'woocommerce_db_version' ) ); ?></td>
</tr>
<tr>
<?php
$tables = array(
'woocommerce_sessions',
'woocommerce_api_keys',
'woocommerce_attribute_taxonomies',
'woocommerce_termmeta',
@ -392,32 +393,32 @@ if ( ! defined( 'ABSPATH' ) ) {
<tbody>
<tr>
<td data-export-label="Force SSL"><?php _e( 'Force SSL', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'Does your site force a SSL Certificate for transactions?', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'Does your site force a SSL Certificate for transactions?', 'woocommerce' ) ); ?></td>
<td><?php echo 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ? '<mark class="yes">&#10004;</mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
</tr>
<tr>
<td data-export-label="Currency"><?php _e( 'Currency', 'woocommerce' ) ?></td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'What currency prices are listed at in the catalog and which currency gateways will take payments in.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'What currency prices are listed at in the catalog and which currency gateways will take payments in.', 'woocommerce' ) ); ?></td>
<td><?php echo get_woocommerce_currency(); ?> (<?php echo get_woocommerce_currency_symbol() ?>)</td>
</tr>
<tr>
<td data-export-label="Currency Position"><?php _e( 'Currency Position', 'woocommerce' ) ?></td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The position of the currency symbol.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The position of the currency symbol.', 'woocommerce' ) ); ?></td>
<td><?php echo get_option( 'woocommerce_currency_pos' ); ?></td>
</tr>
<tr>
<td data-export-label="Thousand Separator"><?php _e( 'Thousand Separator', 'woocommerce' ) ?></td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The thousand separator of displayed prices.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The thousand separator of displayed prices.', 'woocommerce' ) ); ?></td>
<td><?php echo wc_get_price_thousand_separator(); ?></td>
</tr>
<tr>
<td data-export-label="Decimal Separator"><?php _e( 'Decimal Separator', 'woocommerce' ) ?></td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The decimal separator of displayed prices.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The decimal separator of displayed prices.', 'woocommerce' ) ); ?></td>
<td><?php echo wc_get_price_decimal_separator(); ?></td>
</tr>
<tr>
<td data-export-label="Number of Decimals"><?php _e( 'Number of Decimals', 'woocommerce' ) ?></td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The number of decimal points shown in displayed prices.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The number of decimal points shown in displayed prices.', 'woocommerce' ) ); ?></td>
<td><?php echo wc_get_price_decimals(); ?></td>
</tr>
</tbody>
@ -431,12 +432,12 @@ if ( ! defined( 'ABSPATH' ) ) {
<tbody>
<tr>
<td data-export-label="API Enabled"><?php _e( 'API Enabled', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'Does your site have REST API enabled?', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'Does your site have REST API enabled?', 'woocommerce' ) ); ?></td>
<td><?php echo 'yes' === get_option( 'woocommerce_api_enabled' ) ? '<mark class="yes">&#10004;</mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
</tr>
<tr>
<td data-export-label="API Version"><?php _e( 'API Version', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'What version of the REST API does your site use?', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'What version of the REST API does your site use?', 'woocommerce' ) ); ?></td>
<td><?php echo esc_html( WC_API::VERSION ); ?></td>
</tr>
</tbody>
@ -485,7 +486,7 @@ if ( ! defined( 'ABSPATH' ) ) {
}
echo '<tr><td data-export-label="' . esc_attr( $page_name ) . '">' . $page_name . ':</td>';
echo '<td class="help"><a href="#" class="help_tip" data-tip="' . esc_attr( $values['help'] ) . '">[?]</a></td><td>';
echo '<td class="help">' . wc_help_tip( $values['help'] ) . '</td><td>';
// Page ID check
if ( ! $page_id ) {
@ -522,7 +523,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<table class="wc_status_table widefat" cellspacing="0">
<thead>
<tr>
<th colspan="3" data-export-label="Taxonomies"><?php _e( 'Taxonomies', 'woocommerce' ); ?><?php echo ' <a href="#" class="help_tip" data-tip="' . esc_attr__( 'A list of taxonomy terms that can be used in regard to order/product statuses.', 'woocommerce' ) . '">[?]</a>'; ?></th>
<th colspan="3" data-export-label="Taxonomies"><?php _e( 'Taxonomies', 'woocommerce' ); ?><?php echo wc_help_tip( __( 'A list of taxonomy terms that can be used in regard to order/product statuses.', 'woocommerce' ) ); ?></th>
</tr>
</thead>
<tbody>
@ -587,12 +588,12 @@ if ( ! defined( 'ABSPATH' ) ) {
<tbody>
<tr>
<td data-export-label="Name"><?php _e( 'Name', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The name of the current active theme.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The name of the current active theme.', 'woocommerce' ) ); ?></td>
<td><?php echo $active_theme->Name; ?></td>
</tr>
<tr>
<td data-export-label="Version"><?php _e( 'Version', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The installed version of the current active theme.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The installed version of the current active theme.', 'woocommerce' ) ); ?></td>
<td><?php
echo esc_html( $theme_version );
@ -603,12 +604,12 @@ if ( ! defined( 'ABSPATH' ) ) {
</tr>
<tr>
<td data-export-label="Author URL"><?php _e( 'Author URL', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The theme developers URL.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The theme developers URL.', 'woocommerce' ) ); ?></td>
<td><?php echo $active_theme->{'Author URI'}; ?></td>
</tr>
<tr>
<td data-export-label="Child Theme"><?php _e( 'Child Theme', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'Displays whether or not the current theme is a child theme.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'Displays whether or not the current theme is a child theme.', 'woocommerce' ) ); ?></td>
<td><?php
echo is_child_theme() ? '<mark class="yes">&#10004;</mark>' : '&#10005; &ndash; ' . sprintf( __( 'If you\'re modifying WooCommerce or a parent theme you didn\'t build personally we recommend using a child theme. See: <a href="%s" target="_blank">How to create a child theme</a>', 'woocommerce' ), 'http://codex.wordpress.org/Child_Themes' );
?></td>
@ -619,23 +620,23 @@ if ( ! defined( 'ABSPATH' ) ) {
?>
<tr>
<td data-export-label="Parent Theme Name"><?php _e( 'Parent Theme Name', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The name of the parent theme.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The name of the parent theme.', 'woocommerce' ) ); ?></td>
<td><?php echo $parent_theme->Name; ?></td>
</tr>
<tr>
<td data-export-label="Parent Theme Version"><?php _e( 'Parent Theme Version', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The installed version of the parent theme.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The installed version of the parent theme.', 'woocommerce' ) ); ?></td>
<td><?php echo $parent_theme->Version; ?></td>
</tr>
<tr>
<td data-export-label="Parent Theme Author URL"><?php _e( 'Parent Theme Author URL', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'The parent theme developers URL.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'The parent theme developers URL.', 'woocommerce' ) ); ?></td>
<td><?php echo $parent_theme->{'Author URI'}; ?></td>
</tr>
<?php endif ?>
<tr>
<td data-export-label="WooCommerce Support"><?php _e( 'WooCommerce Support', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'Displays whether or not the current active theme declares WooCommerce support.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo wc_help_tip( __( 'Displays whether or not the current active theme declares WooCommerce support.', 'woocommerce' ) ); ?></td>
<td><?php
if ( ! current_theme_supports( 'woocommerce' ) && ! in_array( $active_theme->template, wc_get_core_supported_themes() ) ) {
echo '<mark class="error">' . __( 'Not Declared', 'woocommerce' ) . '</mark>';
@ -649,7 +650,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<table class="wc_status_table widefat" cellspacing="0">
<thead>
<tr>
<th colspan="3" data-export-label="Templates"><?php _e( 'Templates', 'woocommerce' ); ?><?php echo ' <a href="#" class="help_tip" data-tip="' . esc_attr__( 'This section shows any files that are overriding the default WooCommerce template pages.', 'woocommerce' ) . '">[?]</a>'; ?></th>
<th colspan="3" data-export-label="Templates"><?php _e( 'Templates', 'woocommerce' ); ?><?php echo wc_help_tip( __( 'This section shows any files that are overriding the default WooCommerce template pages.', 'woocommerce' ) ); ?></th>
</tr>
</thead>
<tbody>
@ -661,11 +662,10 @@ if ( ! defined( 'ABSPATH' ) ) {
$outdated_templates = false;
foreach ( $template_paths as $plugin_name => $template_path ) {
$scanned_files[ $plugin_name ] = WC_Admin_Status::scan_template_files( $template_path );
}
foreach ( $scanned_files as $plugin_name => $files ) {
foreach ( $files as $file ) {
$scanned_files = WC_Admin_Status::scan_template_files( $template_path );
foreach ( $scanned_files as $file ) {
if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {
$theme_file = get_stylesheet_directory() . '/' . $file;
} elseif ( file_exists( get_stylesheet_directory() . '/woocommerce/' . $file ) ) {
@ -679,7 +679,7 @@ if ( ! defined( 'ABSPATH' ) ) {
}
if ( ! empty( $theme_file ) ) {
$core_version = WC_Admin_Status::get_file_version( WC()->plugin_path() . '/templates/' . $file );
$core_version = WC_Admin_Status::get_file_version( $template_path . $file );
$theme_version = WC_Admin_Status::get_file_version( $theme_file );
if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) {
@ -731,7 +731,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<script type="text/javascript">
jQuery( 'a.help_tip' ).click( function() {
jQuery( 'a.help_tip, a.woocommerce-help-tip' ).click( function() {
return false;
});
@ -780,7 +780,8 @@ if ( ! defined( 'ABSPATH' ) ) {
jQuery( '#debug-report' ).find( 'textarea' ).val( report ).focus().select();
jQuery( this ).fadeOut();
return false;
} catch( e ){
} catch ( e ) {
/*jshint devel: true */
console.log( e );
}

View File

@ -1,23 +0,0 @@
<?php
/**
* Admin View: Notice - Translation Upgrade
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div id="message" class="updated woocommerce-message wc-connect">
<p><?php printf( __( '<strong>WooCommerce Translation Available</strong> &#8211; Install or update your <code>%s</code> translation to version <code>%s</code>.', 'woocommerce' ), get_locale(), WC_VERSION ); ?></p>
<p>
<?php if ( is_multisite() ) : ?>
<a href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin.php?page=wc-status&tab=tools&action=translation_upgrade' ), 'debug_action' ) ); ?>" class="button-primary"><?php _e( 'Update Translation', 'woocommerce' ); ?></a>
<?php else : ?>
<a href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'do-translation-upgrade' ), admin_url( 'update-core.php' ) ), 'upgrade-translations' ) ); ?>" class="button-primary"><?php _e( 'Update Translation', 'woocommerce' ); ?></a>
<a href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin.php?page=wc-status&tab=tools&action=translation_upgrade' ), 'debug_action' ) ); ?>" class="button-secondary"><?php _e( 'Force Update Translation', 'woocommerce' ); ?></a>
<?php endif; ?>
<a href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'translation_upgrade' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>" class="button-secondary skip"><?php _e( 'Hide This Message', 'woocommerce' ); ?></a>
</p>
</div>

View File

@ -376,3 +376,23 @@ function wc_save_order_items( $order_id, $items ) {
// inform other plugins that the items have been saved
do_action( 'woocommerce_saved_order_items', $order_id, $items );
}
/**
* Add help tips
* Display a WooCommerce help tip.
*
* @since 2.5.0
*
* @param string $tip Help tip text
* @param bool $allow_html Allow sanitized HTML if true or escape
* @return string
*/
function wc_help_tip( $tip, $allow_html = false ) {
if ( $allow_html ) {
$tip = wc_sanitize_tooltip( $tip );
} else {
$tip = esc_attr( $tip );
}
return '<span class="woocommerce-help-tip" data-tip="' . $tip . '"></span>';
}

View File

@ -66,7 +66,7 @@ function woocommerce_wp_text_input( $field ) {
if ( ! empty( $field['description'] ) ) {
if ( isset( $field['desc_tip'] ) && false !== $field['desc_tip'] ) {
echo '<img class="help_tip" data-tip="' . esc_attr( $field['description'] ) . '" src="' . esc_url( WC()->plugin_url() ) . '/assets/images/help.png" height="16" width="16" />';
echo wc_help_tip( $field['description'] );
} else {
echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
}
@ -119,7 +119,7 @@ function woocommerce_wp_textarea_input( $field ) {
if ( ! empty( $field['description'] ) ) {
if ( isset( $field['desc_tip'] ) && false !== $field['desc_tip'] ) {
echo '<img class="help_tip" data-tip="' . esc_attr( $field['description'] ) . '" src="' . esc_url( WC()->plugin_url() ) . '/assets/images/help.png" height="16" width="16" />';
echo wc_help_tip( $field['description'] );
} else {
echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
}
@ -158,7 +158,7 @@ function woocommerce_wp_checkbox( $field ) {
if ( ! empty( $field['description'] ) ) {
if ( isset( $field['desc_tip'] ) && false !== $field['desc_tip'] ) {
echo '<img class="help_tip" data-tip="' . esc_attr( $field['description'] ) . '" src="' . esc_url( WC()->plugin_url() ) . '/assets/images/help.png" height="16" width="16" />';
echo wc_help_tip( $field['description'] );
} else {
echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
}
@ -203,7 +203,7 @@ function woocommerce_wp_select( $field ) {
if ( ! empty( $field['description'] ) ) {
if ( isset( $field['desc_tip'] ) && false !== $field['desc_tip'] ) {
echo '<img class="help_tip" data-tip="' . esc_attr( $field['description'] ) . '" src="' . esc_url( WC()->plugin_url() ) . '/assets/images/help.png" height="16" width="16" />';
echo wc_help_tip( $field['description'] );
} else {
echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
}
@ -245,7 +245,7 @@ function woocommerce_wp_radio( $field ) {
if ( ! empty( $field['description'] ) ) {
if ( isset( $field['desc_tip'] ) && false !== $field['desc_tip'] ) {
echo '<img class="help_tip" data-tip="' . esc_attr( $field['description'] ) . '" src="' . esc_url( WC()->plugin_url() ) . '/assets/images/help.png" height="16" width="16" />';
echo wc_help_tip( $field['description'] );
} else {
echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
}

View File

@ -241,7 +241,7 @@ class WC_API_Customers extends WC_API_Resource {
$query = $this->query_customers( $filter );
return array( 'count' => count( $query->get_results() ) );
return array( 'count' => $query->get_total() );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
@ -531,6 +531,11 @@ class WC_API_Customers extends WC_API_Resource {
// Custom Role
if ( ! empty( $args['role'] ) ) {
$query_args['role'] = $args['role'];
// Show users on all roles
if ( 'all' === $query_args['role'] ) {
unset( $query_args['role'] );
}
}
// Search

View File

@ -470,12 +470,6 @@ class WC_API_Orders extends WC_API_Resource {
update_post_meta( $order->id, '_order_currency', $data['currency'] );
}
// set order number
if ( isset( $data['order_number'] ) ) {
update_post_meta( $order->id, '_order_number', $data['order_number'] );
}
// set order meta
if ( isset( $data['order_meta'] ) && is_array( $data['order_meta'] ) ) {
$this->set_order_meta( $order->id, $data['order_meta'] );
@ -640,12 +634,6 @@ class WC_API_Orders extends WC_API_Resource {
update_post_meta( $order->id, '_order_currency', $data['currency'] );
}
// set order number
if ( isset( $data['order_number'] ) ) {
update_post_meta( $order->id, '_order_number', $data['order_number'] );
}
// if items have changed, recalculate order totals
if ( $update_totals ) {
$order->calculate_totals();
@ -886,7 +874,8 @@ class WC_API_Orders extends WC_API_Resource {
*/
protected function set_line_item( $order, $item, $action ) {
$creating = ( 'create' === $action );
$creating = ( 'create' === $action );
$item_args = array();
// product is always required
if ( ! isset( $item['product_id'] ) && ! isset( $item['sku'] ) ) {
@ -939,8 +928,6 @@ class WC_API_Orders extends WC_API_Resource {
throw new WC_API_Exception( 'woocommerce_api_invalid_product_quantity', __( 'Product quantity is required', 'woocommerce' ), 400 );
}
$item_args = array();
// quantity
if ( isset( $item['quantity'] ) ) {
$item_args['qty'] = $item['quantity'];
@ -1563,18 +1550,19 @@ class WC_API_Orders extends WC_API_Resource {
}
$line_items[] = array(
'id' => $item_id,
'subtotal' => wc_format_decimal( $order->get_line_subtotal( $item ), 2 ),
'subtotal_tax' => wc_format_decimal( $item['line_subtotal_tax'], 2 ),
'total' => wc_format_decimal( $order->get_line_total( $item ), 2 ),
'total_tax' => wc_format_decimal( $order->get_line_tax( $item ), 2 ),
'price' => wc_format_decimal( $order->get_item_total( $item ), 2 ),
'quantity' => (int) $item['qty'],
'tax_class' => ( ! empty( $item['tax_class'] ) ) ? $item['tax_class'] : null,
'name' => $item['name'],
'product_id' => ( isset( $product->variation_id ) ) ? $product->variation_id : $product->id,
'sku' => is_object( $product ) ? $product->get_sku() : null,
'meta' => $item_meta,
'id' => $item_id,
'subtotal' => wc_format_decimal( $order->get_line_subtotal( $item ), 2 ),
'subtotal_tax' => wc_format_decimal( $item['line_subtotal_tax'], 2 ),
'total' => wc_format_decimal( $order->get_line_total( $item ), 2 ),
'total_tax' => wc_format_decimal( $order->get_line_tax( $item ), 2 ),
'price' => wc_format_decimal( $order->get_item_total( $item ), 2 ),
'quantity' => (int) $item['qty'],
'tax_class' => ( ! empty( $item['tax_class'] ) ) ? $item['tax_class'] : null,
'name' => $item['name'],
'product_id' => ( isset( $product->variation_id ) ) ? $product->variation_id : $product->id,
'sku' => is_object( $product ) ? $product->get_sku() : null,
'meta' => $item_meta,
'refunded_item_id' => (int) $item['refunded_item_id'],
);
}

View File

@ -180,16 +180,24 @@ class WC_API_Products extends WC_API_Resource {
// add variations to variable products
if ( $product->is_type( 'variable' ) && $product->has_child() ) {
$product_data['variations'] = $this->get_variation_data( $product );
}
// add the parent product data to an individual variation
if ( $product->is_type( 'variation' ) && $product->parent ) {
$product_data['parent'] = $this->get_product_data( $product->parent );
}
// Add grouped products data
if ( $product->is_type( 'grouped' ) && $product->has_child() ) {
$product_data['grouped_products'] = $this->get_grouped_products_data( $product );
}
if ( $product->is_type( 'simple' ) && ! empty( $product->post->post_parent ) ) {
$_product = wc_get_product( $product->post->post_parent );
$product_data['parent'] = $this->get_product_data( $_product );
}
return array( 'product' => apply_filters( 'woocommerce_api_product_response', $product_data, $product, $fields, $this->server ) );
}
@ -391,8 +399,14 @@ class WC_API_Products extends WC_API_Resource {
$this->save_product_meta( $id, $data );
// Save variations
if ( isset( $data['type'] ) && 'variable' == $data['type'] && isset( $data['variations'] ) && is_array( $data['variations'] ) ) {
$this->save_variations( $id, $data );
$product = get_product( $id );
if ( $product->is_type( 'variable' ) ) {
if ( isset( $data['variations'] ) && is_array( $data['variations'] ) ) {
$this->save_variations( $id, $data );
} else {
// Just sync variations
WC_Product_Variable::sync( $id );
}
}
do_action( 'woocommerce_api_edit_product', $id, $data );
@ -455,7 +469,7 @@ class WC_API_Products extends WC_API_Resource {
'rating' => get_comment_meta( $comment->comment_ID, 'rating', true ),
'reviewer_name' => $comment->comment_author,
'reviewer_email' => $comment->comment_author_email,
'verified' => (bool) wc_customer_bought_product( $comment->comment_author_email, $comment->user_id, $id ),
'verified' => wc_review_is_from_verified_owner( $comment->comment_ID ),
);
}
@ -1032,6 +1046,8 @@ class WC_API_Products extends WC_API_Resource {
'value' => $args['sku'],
'compare' => '='
);
$query_args['post_type'] = array( 'product', 'product_variation' );
}
$query_args = $this->merge_query_args( $query_args, $args );
@ -1047,8 +1063,6 @@ class WC_API_Products extends WC_API_Resource {
* @return WC_Product
*/
private function get_product_data( $product ) {
$prices_precision = wc_get_price_decimals();
return array(
'title' => $product->get_title(),
'id' => (int) $product->is_type( 'variation' ) ? $product->get_variation_id() : $product->id,
@ -1060,9 +1074,9 @@ class WC_API_Products extends WC_API_Resource {
'virtual' => $product->is_virtual(),
'permalink' => $product->get_permalink(),
'sku' => $product->get_sku(),
'price' => wc_format_decimal( $product->get_price(), $prices_precision ),
'regular_price' => wc_format_decimal( $product->get_regular_price(), $prices_precision ),
'sale_price' => $product->get_sale_price() ? wc_format_decimal( $product->get_sale_price(), $prices_precision ) : null,
'price' => $product->get_price(),
'regular_price' => $product->get_regular_price(),
'sale_price' => $product->get_sale_price() ? $product->get_sale_price() : null,
'price_html' => $product->get_price_html(),
'taxable' => $product->is_taxable(),
'tax_status' => $product->get_tax_status(),
@ -1080,7 +1094,7 @@ class WC_API_Products extends WC_API_Resource {
'on_sale' => $product->is_on_sale(),
'product_url' => $product->is_type( 'external' ) ? $product->get_product_url() : '',
'button_text' => $product->is_type( 'external' ) ? $product->get_button_text() : '',
'weight' => $product->get_weight() ? wc_format_decimal( $product->get_weight(), 2 ) : null,
'weight' => $product->get_weight() ? $product->get_weight() : null,
'dimensions' => array(
'length' => $product->length,
'width' => $product->width,
@ -1103,7 +1117,7 @@ class WC_API_Products extends WC_API_Resource {
'categories' => wp_get_post_terms( $product->id, 'product_cat', array( 'fields' => 'names' ) ),
'tags' => wp_get_post_terms( $product->id, 'product_tag', array( 'fields' => 'names' ) ),
'images' => $this->get_images( $product ),
'featured_src' => wp_get_attachment_url( get_post_thumbnail_id( $product->is_type( 'variation' ) ? $product->variation_id : $product->id ) ),
'featured_src' => (string) wp_get_attachment_url( get_post_thumbnail_id( $product->is_type( 'variation' ) ? $product->variation_id : $product->id ) ),
'attributes' => $this->get_attributes( $product ),
'downloads' => $this->get_downloads( $product ),
'download_limit' => (int) $product->download_limit,
@ -1113,6 +1127,7 @@ class WC_API_Products extends WC_API_Resource {
'total_sales' => metadata_exists( 'post', $product->id, 'total_sales' ) ? (int) get_post_meta( $product->id, 'total_sales', true ) : 0,
'variations' => array(),
'parent' => array(),
'grouped_products' => array(),
);
}
@ -1124,8 +1139,7 @@ class WC_API_Products extends WC_API_Resource {
* @return array
*/
private function get_variation_data( $product ) {
$prices_precision = wc_get_price_decimals();
$variations = array();
$variations = array();
foreach ( $product->get_children() as $child_id ) {
@ -1143,9 +1157,9 @@ class WC_API_Products extends WC_API_Resource {
'virtual' => $variation->is_virtual(),
'permalink' => $variation->get_permalink(),
'sku' => $variation->get_sku(),
'price' => wc_format_decimal( $variation->get_price(), $prices_precision ),
'regular_price' => wc_format_decimal( $variation->get_regular_price(), $prices_precision ),
'sale_price' => $variation->get_sale_price() ? wc_format_decimal( $variation->get_sale_price(), $prices_precision ) : null,
'price' => $variation->get_price(),
'regular_price' => $variation->get_regular_price(),
'sale_price' => $variation->get_sale_price() ? $variation->get_sale_price() : null,
'taxable' => $variation->is_taxable(),
'tax_status' => $variation->get_tax_status(),
'tax_class' => $variation->get_tax_class(),
@ -1156,7 +1170,7 @@ class WC_API_Products extends WC_API_Resource {
'purchaseable' => $variation->is_purchasable(),
'visible' => $variation->variation_is_visible(),
'on_sale' => $variation->is_on_sale(),
'weight' => $variation->get_weight() ? wc_format_decimal( $variation->get_weight(), 2 ) : null,
'weight' => $variation->get_weight() ? $variation->get_weight() : null,
'dimensions' => array(
'length' => $variation->length,
'width' => $variation->width,
@ -1176,6 +1190,31 @@ class WC_API_Products extends WC_API_Resource {
return $variations;
}
/**
* Get grouped products data
*
* @since 2.5.0
* @param WC_Product $product
*
* @return array
*/
private function get_grouped_products_data( $product ) {
$products = array();
foreach ( $product->get_children() as $child_id ) {
$_product = $product->get_child( $child_id );
if ( ! $_product->exists() ) {
continue;
}
$products[] = $this->get_product_data( $_product );
}
return $products;
}
/**
* Save product meta
*
@ -1280,15 +1319,14 @@ class WC_API_Products extends WC_API_Resource {
if ( $is_taxonomy ) {
if ( isset( $attribute['options'] ) ) {
// Select based attributes - Format values (posted values are slugs)
if ( is_array( $attribute['options'] ) ) {
$values = array_map( 'sanitize_title', $attribute['options'] );
$options = $attribute['options'];
// Text based attributes - Posted values are term names - don't change to slugs
} else {
$values = array_map( 'wc_sanitize_term_text_based', explode( WC_DELIMITER, $attribute['options'] ) );
if ( ! is_array( $attribute['options'] ) ) {
// Text based attributes - Posted values are term names
$options = explode( WC_DELIMITER, $options );
}
$values = array_map( 'wc_sanitize_term_text_based', $options );
$values = array_filter( $values, 'strlen' );
} else {
$values = array();
@ -1518,7 +1556,12 @@ class WC_API_Products extends WC_API_Resource {
// Stock quantity
if ( isset( $data['stock_quantity'] ) ) {
wc_update_product_stock( $product_id, intval( $data['stock_quantity'] ) );
wc_update_product_stock( $product_id, wc_stock_amount( $data['stock_quantity'] ) );
} else if ( isset( $data['inventory_delta'] ) ) {
$stock_quantity = wc_stock_amount( get_post_meta( $product_id, '_stock', true ) );
$stock_quantity += wc_stock_amount( $data['inventory_delta'] );
wc_update_product_stock( $product_id, wc_stock_amount( $stock_quantity ) );
}
} else {
@ -1776,6 +1819,11 @@ class WC_API_Products extends WC_API_Resource {
if ( isset( $variation['stock_quantity'] ) ) {
wc_update_product_stock( $variation_id, wc_stock_amount( $variation['stock_quantity'] ) );
} else if ( isset( $data['inventory_delta'] ) ) {
$stock_quantity = wc_stock_amount( get_post_meta( $variation_id, '_stock', true ) );
$stock_quantity += wc_stock_amount( $data['inventory_delta'] );
wc_update_product_stock( $variation_id, wc_stock_amount( $stock_quantity ) );
}
} else {
delete_post_meta( $variation_id, '_backorders' );

View File

@ -43,7 +43,7 @@ class WC_API_Resource {
$response_names = array( 'order', 'coupon', 'customer', 'product', 'report',
'customer_orders', 'customer_downloads', 'order_note', 'order_refund',
'product_reviews', 'product_category'
'product_reviews', 'product_category', 'tax', 'tax_class'
);
foreach ( $response_names as $name ) {

View File

@ -560,7 +560,7 @@ class WC_API_Server {
* Send pagination headers for resources
*
* @since 2.1
* @param WP_Query|WP_User_Query $query
* @param WP_Query|WP_User_Query|stdClass $query
*/
public function add_pagination_headers( $query ) {
@ -577,6 +577,11 @@ class WC_API_Server {
$page = 1;
$total_pages = 1;
}
} else if ( is_a( $query, 'stdClass' ) ) {
$page = $query->page;
$single = $query->is_single;
$total = $query->total;
$total_pages = $query->total_pages;
// WP_Query
} else {

View File

@ -0,0 +1,678 @@
<?php
/**
* WooCommerce API Taxes Class
*
* Handles requests to the /taxes endpoint
*
* @author WooThemes
* @category API
* @package WooCommerce/API
* @since 2.5.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class WC_API_Taxes extends WC_API_Resource {
/** @var string $base the route base */
protected $base = '/taxes';
/**
* Register the routes for this class
*
* GET /taxes
* GET /taxes/count
* GET /taxes/<id>
*
* @since 2.1
* @param array $routes
* @return array
*/
public function register_routes( $routes ) {
# GET/POST /taxes
$routes[ $this->base ] = array(
array( array( $this, 'get_taxes' ), WC_API_Server::READABLE ),
array( array( $this, 'create_tax' ), WC_API_Server::CREATABLE | WC_API_Server::ACCEPT_DATA ),
);
# GET /taxes/count
$routes[ $this->base . '/count'] = array(
array( array( $this, 'get_taxes_count' ), WC_API_Server::READABLE ),
);
# GET/PUT/DELETE /taxes/<id>
$routes[ $this->base . '/(?P<id>\d+)' ] = array(
array( array( $this, 'get_tax' ), WC_API_Server::READABLE ),
array( array( $this, 'edit_tax' ), WC_API_SERVER::EDITABLE | WC_API_SERVER::ACCEPT_DATA ),
array( array( $this, 'delete_tax' ), WC_API_SERVER::DELETABLE ),
);
# GET/POST /taxes/classes
$routes[ $this->base . '/classes' ] = array(
array( array( $this, 'get_tax_classes' ), WC_API_Server::READABLE ),
array( array( $this, 'create_tax_class' ), WC_API_Server::CREATABLE | WC_API_Server::ACCEPT_DATA ),
);
# GET /taxes/classes/count
$routes[ $this->base . '/classes/count'] = array(
array( array( $this, 'get_tax_classes_count' ), WC_API_Server::READABLE ),
);
# GET /taxes/classes/<slug>
$routes[ $this->base . '/classes/(?P<slug>\w[\w\s\-]*)' ] = array(
array( array( $this, 'delete_tax_class' ), WC_API_SERVER::DELETABLE ),
);
# POST|PUT /taxes/bulk
$routes[ $this->base . '/bulk' ] = array(
array( array( $this, 'bulk' ), WC_API_Server::EDITABLE | WC_API_Server::ACCEPT_DATA ),
);
return $routes;
}
/**
* Get all taxes
*
* @since 2.5.0
*
* @param string $fields
* @param array $filter
* @param string $class
* @param int $page
*
* @return array
*/
public function get_taxes( $fields = null, $filter = array(), $class = null, $page = 1 ) {
if ( ! empty( $class ) ) {
$filter['tax_rate_class'] = $class;
}
$filter['page'] = $page;
$query = $this->query_tax_rates( $filter );
$taxes = array();
foreach ( $query['results'] as $tax ) {
$taxes[] = current( $this->get_tax( $tax->tax_rate_id, $fields ) );
}
// Set pagination headers
$this->server->add_pagination_headers( $query['headers'] );
return array( 'taxes' => $taxes );
}
/**
* Get the tax for the given ID
*
* @since 2.5.0
*
* @param int $id The tax ID
* @param string $fields fields to include in response
*
* @return array|WP_Error
*/
public function get_tax( $id, $fields = null ) {
global $wpdb;
try {
$id = absint( $id );
// Permissions check
if ( ! current_user_can( 'manage_woocommerce' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_read_tax', __( 'You do not have permission to read tax rate', 'woocommerce' ), 401 );
}
// Get tax rate details
$tax = WC_Tax::_get_tax_rate( $id );
if ( is_wp_error( $tax ) || empty( $tax ) ) {
throw new WC_API_Exception( 'woocommerce_api_invalid_tax_id', __( 'A tax rate with the provided ID could not be found', 'woocommerce' ), 404 );
}
$tax_data = array(
'id' => $tax['tax_rate_id'],
'country' => $tax['tax_rate_country'],
'state' => $tax['tax_rate_state'],
'postcode' => '',
'city' => '',
'rate' => $tax['tax_rate'],
'name' => $tax['tax_rate_name'],
'priority' => (int) $tax['tax_rate_priority'],
'compound' => (bool) $tax['tax_rate_compound'],
'shipping' => (bool) $tax['tax_rate_shipping'],
'order' => (int) $tax['tax_rate_order'],
'class' => $tax['tax_rate_class'] ? $tax['tax_rate_class'] : 'standard'
);
// Get locales from a tax rate
$locales = $wpdb->get_results( $wpdb->prepare( "
SELECT location_code, location_type
FROM {$wpdb->prefix}woocommerce_tax_rate_locations
WHERE tax_rate_id = %d
", $id ) );
if ( ! is_wp_error( $tax ) && ! is_null( $tax ) ) {
foreach ( $locales as $locale ) {
$tax_data[ $locale->location_type ] = $locale->location_code;
}
}
return array( 'tax' => apply_filters( 'woocommerce_api_tax_response', $tax_data, $tax, $fields, $this ) );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Create a tax
*
* @since 2.5.0
*
* @param array $data
*
* @return array
*/
public function create_tax( $data ) {
try {
if ( ! isset( $data['tax'] ) ) {
throw new WC_API_Exception( 'woocommerce_api_missing_tax_data', sprintf( __( 'No %1$s data specified to create %1$s', 'woocommerce' ), 'tax' ), 400 );
}
// Check permissions
if ( ! current_user_can( 'manage_woocommerce' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_tax', __( 'You do not have permission to create tax rates', 'woocommerce' ), 401 );
}
$data = apply_filters( 'woocommerce_api_create_tax_data', $data['tax'], $this );
$tax_data = array(
'tax_rate_country' => '',
'tax_rate_state' => '',
'tax_rate' => '',
'tax_rate_name' => '',
'tax_rate_priority' => 1,
'tax_rate_compound' => 0,
'tax_rate_shipping' => 1,
'tax_rate_order' => 0,
'tax_rate_class' => '',
);
foreach ( $tax_data as $key => $value ) {
$new_key = str_replace( 'tax_rate_', '', $key );
$new_key = 'tax_rate' === $new_key ? 'rate' : $new_key;
if ( isset( $data[ $new_key ] ) ) {
if ( in_array( $new_key, array( 'compound', 'shipping' ) ) ) {
$tax_data[ $key ] = $data[ $new_key ] ? 1 : 0;
} else {
$tax_data[ $key ] = $data[ $new_key ];
}
}
}
// Create tax rate
$id = WC_Tax::_insert_tax_rate( $tax_data );
// Add locales
if ( ! empty( $data['postcode'] ) ) {
WC_Tax::_update_tax_rate_postcodes( $id, wc_clean( $data['postcode'] ) );
}
if ( ! empty( $data['city'] ) ) {
WC_Tax::_update_tax_rate_cities( $id, wc_clean( $data['city'] ) );
}
do_action( 'woocommerce_api_create_tax_rate', $id, $data );
$this->server->send_status( 201 );
return $this->get_tax( $id );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Edit a tax
*
* @since 2.5.0
*
* @param int $id The tax ID
* @param array $data
*
* @return array
*/
public function edit_tax( $id, $data ) {
try {
if ( ! isset( $data['tax'] ) ) {
throw new WC_API_Exception( 'woocommerce_api_missing_tax_data', sprintf( __( 'No %1$s data specified to edit %1$s', 'woocommerce' ), 'tax' ), 400 );
}
// Check permissions
if ( ! current_user_can( 'manage_woocommerce' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_edit_tax', __( 'You do not have permission to edit tax rates', 'woocommerce' ), 401 );
}
$data = $data['tax'];
// Get current tax rate data
$tax = $this->get_tax( $id );
if ( is_wp_error( $tax ) ) {
$error_data = $tax->get_error_data();
throw new WC_API_Exception( $tax->get_error_code(), $tax->get_error_message(), $error_data['status'] );
}
$current_data = $tax['tax'];
$data = apply_filters( 'woocommerce_api_edit_tax_data', $data, $this );
$tax_data = array();
$default_fields = array(
'tax_rate_country',
'tax_rate_state',
'tax_rate',
'tax_rate_name',
'tax_rate_priority',
'tax_rate_compound',
'tax_rate_shipping',
'tax_rate_order',
'tax_rate_class'
);
foreach ( $data as $key => $value ) {
$new_key = 'rate' === $key ? 'tax_rate' : 'tax_rate_' . $key;
// Check if the key is valid
if ( ! in_array( $new_key, $default_fields ) ) {
continue;
}
// Test new data against current data
if ( $value === $current_data[ $key ] ) {
continue;
}
// Fix compund and shipping values
if ( in_array( $key, array( 'compound', 'shipping' ) ) ) {
$value = $value ? 1 : 0;
}
$tax_data[ $new_key ] = $value;
}
// Update tax rate
WC_Tax::_update_tax_rate( $id, $tax_data );
// Update locales
if ( ! empty( $data['postcode'] ) && $current_data['postcode'] != $data['postcode'] ) {
WC_Tax::_update_tax_rate_postcodes( $id, wc_clean( $data['postcode'] ) );
}
if ( ! empty( $data['city'] ) && $current_data['city'] != $data['city'] ) {
WC_Tax::_update_tax_rate_cities( $id, wc_clean( $data['city'] ) );
}
do_action( 'woocommerce_api_edit_product', $id, $data );
// Clear cache/transients
wc_delete_product_transients( $id );
return $this->get_tax( $id );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Delete a tax
*
* @since 2.5.0
*
* @param int $id The tax ID
*
* @return array
*/
public function delete_tax( $id ) {
global $wpdb;
try {
// Check permissions
if ( ! current_user_can( 'manage_woocommerce' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_delete_tax', __( 'You do not have permission to delete tax rates', 'woocommerce' ), 401 );
}
$id = absint( $id );
WC_Tax::_delete_tax_rate( $id );
if ( 0 === $wpdb->rows_affected ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_delete_tax', __( 'Could not delete the tax rate', 'woocommerce' ), 401 );
}
return array( 'message' => sprintf( __( 'Deleted %s', 'woocommerce' ), 'tax' ) );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Get the total number of taxes
*
* @since 2.5.0
*
* @param string $class
* @param array $filter
*
* @return array
*/
public function get_taxes_count( $class = null, $filter = array() ) {
try {
if ( ! current_user_can( 'manage_woocommerce' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_read_taxes_count', __( 'You do not have permission to read the taxes count', 'woocommerce' ), 401 );
}
if ( ! empty( $class ) ) {
$filter['tax_rate_class'] = $class;
}
$query = $this->query_tax_rates( $filter, true );
return array( 'count' => (int) $query['headers']->total );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Helper method to get tax rates objects
*
* @since 2.5.0
*
* @param array $args
*
* @return array
*/
protected function query_tax_rates( $args, $count_only = false ) {
global $wpdb;
$results = '';
// Set args
$args = $this->merge_query_args( $args, array() );
$query = "
SELECT tax_rate_id
FROM {$wpdb->prefix}woocommerce_tax_rates
WHERE 1 = 1
";
// Filter by tax class
if ( ! empty( $args['tax_rate_class'] ) ) {
$tax_rate_class = 'standard' !== $args['tax_rate_class'] ? sanitize_title( $args['tax_rate_class'] ) : '';
$query .= " AND tax_rate_class = '$tax_rate_class'";
}
// Order tax rates
$order_by = ' ORDER BY tax_rate_order';
// Pagination
$per_page = isset( $args['posts_per_page'] ) ? $args['posts_per_page'] : get_option( 'posts_per_page' );
$offset = 1 < $args['paged'] ? ( $args['paged'] - 1 ) * $per_page : 0;
$pagination = sprintf( ' LIMIT %d, %d', $offset, $per_page );
if ( ! $count_only ) {
$results = $wpdb->get_results( $query . $order_by . $pagination );
}
$wpdb->get_results( $query );
$headers = new stdClass;
$headers->page = $args['paged'];
$headers->total = (int) $wpdb->num_rows;
$headers->is_single = $per_page > $headers->total;
$headers->total_pages = ceil( $headers->total / $per_page );
return array(
'results' => $results,
'headers' => $headers
);
}
/**
* Bulk update or insert taxes
* Accepts an array with taxes in the formats supported by
* WC_API_Taxes->create_tax() and WC_API_Taxes->edit_tax()
*
* @since 2.5.0
*
* @param array $data
*
* @return array
*/
public function bulk( $data ) {
try {
if ( ! isset( $data['taxes'] ) ) {
throw new WC_API_Exception( 'woocommerce_api_missing_taxes_data', sprintf( __( 'No %1$s data specified to create/edit %1$s', 'woocommerce' ), 'taxes' ), 400 );
}
$data = $data['taxes'];
$limit = apply_filters( 'woocommerce_api_bulk_limit', 100, 'taxes' );
// Limit bulk operation
if ( count( $data ) > $limit ) {
throw new WC_API_Exception( 'woocommerce_api_taxes_request_entity_too_large', sprintf( __( 'Unable to accept more than %s items for this request', 'woocommerce' ), $limit ), 413 );
}
$taxes = array();
foreach ( $data as $_tax ) {
$tax_id = 0;
// Try to get the tax rate ID
if ( isset( $_tax['id'] ) ) {
$tax_id = intval( $_tax['id'] );
}
// Tax rate exists / edit tax rate
if ( $tax_id ) {
$edit = $this->edit_tax( $tax_id, array( 'tax' => $_tax ) );
if ( is_wp_error( $edit ) ) {
$taxes[] = array(
'id' => $tax_id,
'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() )
);
} else {
$taxes[] = $edit['tax'];
}
}
// Tax rate don't exists / create tax rate
else {
$new = $this->create_tax( array( 'tax' => $_tax ) );
if ( is_wp_error( $new ) ) {
$taxes[] = array(
'id' => $tax_id,
'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() )
);
} else {
$taxes[] = $new['tax'];
}
}
}
return array( 'taxes' => apply_filters( 'woocommerce_api_taxes_bulk_response', $orders, $this ) );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Get all tax classes
*
* @since 2.5.0
*
* @param string $fields
*
* @return array
*/
public function get_tax_classes( $fields = null ) {
try {
// Permissions check
if ( ! current_user_can( 'manage_woocommerce' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_read_tax_classes', __( 'You do not have permission to read tax classes', 'woocommerce' ), 401 );
}
$tax_classes = array();
// Add standard class
$tax_classes[] = array(
'slug' => 'standard',
'name' => __( 'Standard Rate', 'woocommerce' )
);
$classes = WC_Tax::get_tax_classes();
foreach ( $classes as $class ) {
$tax_classes[] = apply_filters( 'woocommerce_api_tax_class_response', array(
'slug' => sanitize_title( $class ),
'name' => $class
), $class, $fields, $this );
}
return array( 'tax_classes' => apply_filters( 'woocommerce_api_tax_classes_response', $tax_classes, $classes, $fields, $this ) );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Create a tax class
*
* @since 2.5.0
*
* @param array $data
*
* @return array
*/
public function create_tax_class( $data ) {
try {
if ( ! isset( $data['tax_class'] ) ) {
throw new WC_API_Exception( 'woocommerce_api_missing_tax_class_data', sprintf( __( 'No %1$s data specified to create %1$s', 'woocommerce' ), 'tax_class' ), 400 );
}
// Check permissions
if ( ! current_user_can( 'manage_woocommerce' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_tax_class', __( 'You do not have permission to create tax classes', 'woocommerce' ), 401 );
}
$data = $data['tax_class'];
if ( empty( $data['name'] ) ) {
throw new WC_API_Exception( 'woocommerce_api_missing_tax_class_name', sprintf( __( 'Missing parameter %s', 'woocommerce' ), 'name' ), 400 );
}
$name = sanitize_text_field( $data['name'] );
$slug = sanitize_title( $name );
$classes = WC_Tax::get_tax_classes();
$exists = false;
// Check if class exists
foreach ( $classes as $key => $class ) {
if ( sanitize_title( $class ) === $slug ) {
$exists = true;
break;
}
}
// Return error if tax class already exists
if ( $exists ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_create_tax_class', __( 'Tax class already exists', 'woocommerce' ), 401 );
}
// Add the new class
$classes[] = $name;
update_option( 'woocommerce_tax_classes', implode( "\n", $classes ) );
do_action( 'woocommerce_api_create_tax_class', $slug, $data );
$this->server->send_status( 201 );
return array(
'tax_class' => array(
'slug' => $slug,
'name' => $name
)
);
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Delete a tax class
*
* @since 2.5.0
*
* @param int $slug The tax class slug
*
* @return array
*/
public function delete_tax_class( $slug ) {
try {
// Check permissions
if ( ! current_user_can( 'manage_woocommerce' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_delete_tax_class', __( 'You do not have permission to delete tax classes', 'woocommerce' ), 401 );
}
$slug = sanitize_title( $slug );
$classes = WC_Tax::get_tax_classes();
$deleted = false;
foreach ( $classes as $key => $class ) {
if ( sanitize_title( $class ) === $slug ) {
unset( $classes[ $key ] );
$deleted = true;
break;
}
}
if ( ! $deleted ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_delete_tax_class', __( 'Could not delete the tax class', 'woocommerce' ), 401 );
}
update_option( 'woocommerce_tax_classes', implode( "\n", $classes ) );
return array( 'message' => sprintf( __( 'Deleted %s', 'woocommerce' ), 'tax_class' ) );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Get the total number of tax classes
*
* @since 2.5.0
*
* @return array
*/
public function get_tax_classes_count() {
try {
if ( ! current_user_can( 'manage_woocommerce' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_read_tax_classes_count', __( 'You do not have permission to read the tax classes count', 'woocommerce' ), 401 );
}
$total = count( WC_Tax::get_tax_classes() ) + 1; // +1 for Standard Rate
return array( 'count' => $total );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
}

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