Merge remote-tracking branch 'woothemes/master'

This commit is contained in:
Ewout Fernhout 2015-10-01 17:14:58 +02:00
commit 9d78297e9e
279 changed files with 10182 additions and 1889 deletions

View File

@ -10,6 +10,7 @@ php:
env: env:
- WP_VERSION=latest WP_MULTISITE=0 - WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=4.3 WP_MULTISITE=0
- WP_VERSION=4.2 WP_MULTISITE=0 - WP_VERSION=4.2 WP_MULTISITE=0
- WP_VERSION=4.1 WP_MULTISITE=0 - WP_VERSION=4.1 WP_MULTISITE=0
- WP_VERSION=4.0 WP_MULTISITE=0 - WP_VERSION=4.0 WP_MULTISITE=0
@ -27,5 +28,3 @@ script: phpunit -c phpunit.xml.dist
after_script: after_script:
- bash tests/bin/travis.sh after - bash tests/bin/travis.sh after
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover ./tmp/clover.xml

View File

@ -21,9 +21,6 @@ module.exports = function( grunt ) {
'Gruntfile.js', 'Gruntfile.js',
'<%= dirs.js %>/admin/*.js', '<%= dirs.js %>/admin/*.js',
'!<%= dirs.js %>/admin/*.min.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/*.js',
'!<%= dirs.js %>/frontend/*.min.js', '!<%= dirs.js %>/frontend/*.min.js',
'includes/gateways/simplify-commerce/assets/js/*.js', 'includes/gateways/simplify-commerce/assets/js/*.js',
@ -42,33 +39,30 @@ module.exports = function( grunt ) {
cwd: '<%= dirs.js %>/admin/', cwd: '<%= dirs.js %>/admin/',
src: [ src: [
'*.js', '*.js',
'!*.min.js', '!*.min.js'
'!Gruntfile.js',
'!jquery.flot*' // !jquery.flot* prevents to join all jquery.flot files in jquery.min.js
], ],
dest: '<%= dirs.js %>/admin/', dest: '<%= dirs.js %>/admin/',
ext: '.min.js' ext: '.min.js'
}] }]
}, },
adminflot: { // minify correctly the jquery.flot lib vendor: {
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: {
files: { 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-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-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-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-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-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-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.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 %>/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 %>/select2/select2.min.js': ['<%= dirs.js %>/select2/select2.js'],
'<%= dirs.js %>/stupidtable/stupidtable.min.js': ['<%= dirs.js %>/stupidtable/stupidtable.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'] '<%= dirs.js %>/zeroclipboard/jquery.zeroclipboard.min.js': ['<%= dirs.js %>/zeroclipboard/jquery.zeroclipboard.js']

View File

@ -40,7 +40,7 @@ $(window).load(function() {
// Search autocompletion // Search autocompletion
var autocompleteFound = false; var autocompleteFound = false;
var autocompleteFiles = {'c': 'class', 'co': 'constant', 'f': 'function', 'm': 'class', 'mm': 'class', 'p': 'class', 'mp': 'class', 'cc': 'class'}; var autocompleteFiles = {'c': 'class', 'co': 'constant', 'f': 'function', 'm': 'class', 'mm': 'class', 'p': 'class', 'mp': 'class', 'cc': 'class'};
var $search = $('#search input[name=q]'); var $search = $('#search').find('input[name=q]');
$search $search
.autocomplete(ApiGen.elements, { .autocomplete(ApiGen.elements, {
matchContains: true, matchContains: true,
@ -92,7 +92,7 @@ $(window).load(function() {
if ('' === query) { if ('' === query) {
return false; return false;
} }
return !autocompleteFound && '' !== $('#search input[name=cx]').val(); return !autocompleteFound && '' !== $('#search').find('input[name=cx]').val();
}); });
// Save natural order // Save natural order

File diff suppressed because one or more lines are too long

View File

@ -2744,7 +2744,7 @@ img.help_tip {
float: right; float: right;
height: 26px; height: 26px;
width: 17px; width: 17px;
display: none; visibility: hidden;
vertical-align: middle; vertical-align: middle;
margin-right: .5em; margin-right: .5em;
color: #a0a5aa; color: #a0a5aa;
@ -2765,7 +2765,7 @@ img.help_tip {
} }
h3:hover, &.ui-sortable-helper { h3:hover, &.ui-sortable-helper {
.sort { .sort {
display: block; visibility: visible;
} }
} }
} }
@ -2992,8 +2992,26 @@ img.help_tip {
zoom: 1; zoom: 1;
} }
select.attribute_taxonomy, .expand-close {
button.add_attribute, margin-right: 2px;
color: #777;
font-size: 12px;
font-style: italic;
a {
background: none;
padding: 0;
font-size: 12px;
text-decoration: none;
}
}
&#product_attributes {
.expand-close {
float: right;
line-height: 28px;
}
}
button.add_variable_attribute, button.add_variable_attribute,
.fr { .fr {
float: right; float: right;
@ -3061,8 +3079,9 @@ img.help_tip {
color: red; color: red;
font-weight: normal; font-weight: normal;
line-height: 26px; line-height: 26px;
display: none;
text-decoration: none; text-decoration: none;
position: relative;
visibility: hidden;
} }
strong { strong {
@ -3073,12 +3092,13 @@ img.help_tip {
select { select {
font-family: sans-serif; font-family: sans-serif;
margin: 0 1px; max-width: 20%;
margin: .25em .25em .25em 0;
} }
.handlediv { .handlediv {
background-position: 6px 5px !important; background-position: 6px 5px !important;
display: none; visibility: hidden;
height: 26px; height: 26px;
} }
@ -3089,11 +3109,15 @@ img.help_tip {
&.woocommerce_variation h3 { &.woocommerce_variation h3 {
cursor: pointer; cursor: pointer;
padding: .5em .75em .5em 1em !important;
a.delete, .handlediv, .sort {
margin-top: .25em;
}
} }
h3:hover, &.ui-sortable-helper { h3:hover, &.ui-sortable-helper {
a.delete, .handlediv { a.delete, .handlediv {
display: block; visibility: visible;
} }
} }
@ -3179,19 +3203,6 @@ img.help_tip {
font-style: italic; font-style: italic;
} }
.expand-close {
margin-right: 2px;
color: #777;
font-size: 12px;
font-style: italic;
a {
background: none;
padding: 0;
font-size: 12px;
text-decoration: none;
}
}
a { a {
padding: 0px 10px 3px; padding: 0px 10px 3px;
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
@ -3211,6 +3222,9 @@ img.help_tip {
.variations-defaults { .variations-defaults {
float: left; float: left;
select {
margin: .25em .25em .25em 0;
}
} }
.woocommerce_variable_attributes { .woocommerce_variable_attributes {
@ -4045,7 +4059,7 @@ table.bar_chart {
width: 94%; width: 94%;
.sort { .sort {
display: none; visibility: hidden;
} }
} }
} }
@ -4146,6 +4160,78 @@ table.bar_chart {
text-align: center; text-align: center;
margin-top: 10px; margin-top: 10px;
} }
.post-type-product {
.wp-list-table {
.column-thumb {
display: none;
text-align: left;
padding-bottom: 0;
&:before {
display: none !important;
}
img {
max-width: 32px;
}
}
.is-expanded {
td {
&:not(.hidden) {
overflow: visible;
}
}
}
.toggle-row {
top: -28px;
}
}
}
.post-type-shop_order {
.wp-list-table {
.column-order_status {
display: none;
text-align: left;
padding-bottom: 0;
mark {
margin: 0;
}
&:before {
display: none !important;
}
}
.column-customer_message,
.column-order_notes {
text-align: inherit;
}
.column-order_notes {
.note-on {
font-size: 1.3em;
margin: 0;
}
}
.is-expanded {
td {
&:not(.hidden) {
overflow: visible;
}
}
}
.toggle-row {
top: -15px;
}
}
}
} }
@media only screen and (max-width: 500px) { @media only screen and (max-width: 500px) {

File diff suppressed because one or more lines are too long

View File

@ -274,10 +274,18 @@ body {
} }
} }
} }
.woocommerce-tracker { .woocommerce-tracker, .woocommerce-language-pack, .updated {
padding: 24px 24px 0; padding: 24px 24px 0;
margin: 0 0 24px 0; margin: 0 0 24px 0;
overflow: hidden;
background: #f5f5f5; background: #f5f5f5;
p {
padding: 0;
margin: 0 0 12px;
}
p:last-child {
margin: 0 0 24px 0;
}
} }
} }
.wc-setup-steps { .wc-setup-steps {
@ -286,15 +294,19 @@ body {
list-style: none outside; list-style: none outside;
overflow: hidden; overflow: hidden;
color: #ccc; color: #ccc;
width:100%;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
li { li {
width: 20%; width: 20%;
float: left; float: left;
padding: 0 0 1em; padding: 0 0 0.8em;
margin: 0; margin: 0;
text-align: center; text-align: center;
position: relative; position: relative;
border-bottom: 4px solid #ccc; border-bottom: 4px solid #ccc;
line-height: 1; line-height: 1.4em;
} }
li:before { li:before {
content: ""; content: "";

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,9 @@ p.demo_store {
color: $primarytext; color: $primarytext;
z-index: 99998; z-index: 99998;
box-shadow: 0 1px 1em rgba(0,0,0,0.2); box-shadow: 0 1px 1em rgba(0,0,0,0.2);
a {
color: $primarytext;
}
} }
.admin-bar { .admin-bar {
@ -1786,6 +1789,7 @@ p.demo_store {
text-align: left; text-align: left;
margin: 0; margin: 0;
font-weight: normal; font-weight: normal;
@include clearfix;
input { input {
margin: 0 1em 0 0; margin: 0 1em 0 0;
@ -1811,8 +1815,9 @@ p.demo_store {
div.payment_box { div.payment_box {
position: relative; position: relative;
width: 96%; box-sizing: border-box;
padding: 1em 2%; width: 100%;
padding: 1em;
margin: 1em 0 1em 0; margin: 1em 0 1em 0;
font-size: 0.92em; font-size: 0.92em;
border-radius: 2px; border-radius: 2px;
@ -1891,15 +1896,15 @@ p.demo_store {
margin-bottom: 0; margin-bottom: 0;
} }
&:after { &:before {
content: ""; content: "";
display: block; display: block;
border: 8px solid darken( $secondary, 5% ); /* arrow size / color */ border: 1em solid darken( $secondary, 5% ); /* arrow size / color */
border-right-color: transparent; border-right-color: transparent;
border-left-color: transparent; border-left-color: transparent;
border-top-color: transparent; border-top-color: transparent;
position: absolute; position: absolute;
top: -3px; top: -.75em;
left: 0; left: 0;
margin: -1em 0 0 2em; margin: -1em 0 0 2em;
} }

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"> <svg xmlns="http://www.w3.org/2000/svg">
<metadata> <metadata>
<json> <json>
<![CDATA[
{ {
"fontFamily": "WooCommerce", "fontFamily": "WooCommerce",
"fontURL": "http://woothemes.com", "fontURL": "http://woothemes.com",
@ -10,7 +11,7 @@
"designerURL": "http://jameskoster.co.uk", "designerURL": "http://jameskoster.co.uk",
"license": "SIL OFL", "license": "SIL OFL",
"licenseURL": "http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=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, "majorVersion": 0,
"fontId": "WooCommerce", "fontId": "WooCommerce",
"psName": "WooCommerce", "psName": "WooCommerce",
@ -18,78 +19,79 @@
"fullName": "WooCommerce", "fullName": "WooCommerce",
"description": "Font generated by IcoMoon." "description": "Font generated by IcoMoon."
} }
]]>
</json> </json>
</metadata> </metadata>
<defs> <defs>
<font id="WooCommerce" horiz-adv-x="1024"> <font id="WooCommerce" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" /> <font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" /> <missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" d="" horiz-adv-x="512" /> <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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;" 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="&#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> </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 + '" />' ); $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( 'contry-change.woocommerce', [country, $( this ).closest( 'div' )] );
$( document.body ).trigger( 'country-change.woocommerce', [country, $( this ).closest( 'div' )] );
}, },
change_state: function() { change_state: function() {
@ -316,8 +318,8 @@ jQuery( function ( $ ) {
data: data, data: data,
type: 'POST', type: 'POST',
success: function( response ) { success: function( response ) {
$( '#woocommerce-order-items .inside' ).empty(); $( '#woocommerce-order-items' ).find( '.inside' ).empty();
$( '#woocommerce-order-items .inside' ).append( response ); $( '#woocommerce-order-items' ).find( '.inside' ).append( response );
wc_meta_boxes_order.init_tiptip(); wc_meta_boxes_order.init_tiptip();
wc_meta_boxes_order_items.unblock(); wc_meta_boxes_order_items.unblock();
wc_meta_boxes_order_items.stupidtable.init(); wc_meta_boxes_order_items.stupidtable.init();
@ -384,7 +386,7 @@ jQuery( function ( $ ) {
$( 'div.wc-order-refund-items' ).slideDown(); $( 'div.wc-order-refund-items' ).slideDown();
$( 'div.wc-order-bulk-actions' ).slideUp(); $( 'div.wc-order-bulk-actions' ).slideUp();
$( 'div.wc-order-totals-items' ).slideUp(); $( 'div.wc-order-totals-items' ).slideUp();
$( '#woocommerce-order-items div.refund' ).show(); $( '#woocommerce-order-items' ).find( 'div.refund' ).show();
$( '.wc-order-edit-line-item .wc-order-edit-line-item-actions' ).hide(); $( '.wc-order-edit-line-item .wc-order-edit-line-item-actions' ).hide();
return false; return false;
}, },
@ -393,7 +395,7 @@ jQuery( function ( $ ) {
$( this ).closest( 'div.wc-order-data-row' ).slideUp(); $( this ).closest( 'div.wc-order-data-row' ).slideUp();
$( 'div.wc-order-bulk-actions' ).slideDown(); $( 'div.wc-order-bulk-actions' ).slideDown();
$( 'div.wc-order-totals-items' ).slideDown(); $( 'div.wc-order-totals-items' ).slideDown();
$( '#woocommerce-order-items div.refund' ).hide(); $( '#woocommerce-order-items' ).find( 'div.refund' ).hide();
$( '.wc-order-edit-line-item .wc-order-edit-line-item-actions' ).show(); $( '.wc-order-edit-line-item .wc-order-edit-line-item-actions' ).show();
// Reload the items // Reload the items
@ -406,7 +408,7 @@ jQuery( function ( $ ) {
add_item: function() { add_item: function() {
$( this ).WCBackboneModal({ $( this ).WCBackboneModal({
template: '#wc-modal-add-products' template: 'wc-modal-add-products'
}); });
return false; return false;
@ -448,7 +450,7 @@ jQuery( function ( $ ) {
add_tax: function() { add_tax: function() {
$( this ).WCBackboneModal({ $( this ).WCBackboneModal({
template: '#wc-modal-add-tax' template: 'wc-modal-add-tax'
}); });
return false; return false;
}, },
@ -506,8 +508,8 @@ jQuery( function ( $ ) {
data: data, data: data,
type: 'POST', type: 'POST',
success: function( response ) { success: function( response ) {
$( '#woocommerce-order-items .inside' ).empty(); $( '#woocommerce-order-items' ).find( '.inside' ).empty();
$( '#woocommerce-order-items .inside' ).append( response ); $( '#woocommerce-order-items' ).find( '.inside' ).append( response );
wc_meta_boxes_order.init_tiptip(); wc_meta_boxes_order.init_tiptip();
wc_meta_boxes_order_items.unblock(); wc_meta_boxes_order_items.unblock();
wc_meta_boxes_order_items.stupidtable.init(); wc_meta_boxes_order_items.stupidtable.init();
@ -556,8 +558,8 @@ jQuery( function ( $ ) {
data: data, data: data,
type: 'POST', type: 'POST',
success: function( response ) { success: function( response ) {
$( '#woocommerce-order-items .inside' ).empty(); $( '#woocommerce-order-items' ).find( '.inside' ).empty();
$( '#woocommerce-order-items .inside' ).append( response ); $( '#woocommerce-order-items' ).find( '.inside' ).append( response );
wc_meta_boxes_order.init_tiptip(); wc_meta_boxes_order.init_tiptip();
wc_meta_boxes_order_items.unblock(); wc_meta_boxes_order_items.unblock();
wc_meta_boxes_order_items.stupidtable.init(); wc_meta_boxes_order_items.stupidtable.init();
@ -626,8 +628,8 @@ jQuery( function ( $ ) {
data: data, data: data,
type: 'POST', type: 'POST',
success: function( response ) { success: function( response ) {
$( '#woocommerce-order-items .inside' ).empty(); $( '#woocommerce-order-items' ).find( '.inside' ).empty();
$( '#woocommerce-order-items .inside' ).append( response ); $( '#woocommerce-order-items' ).find( '.inside' ).append( response );
wc_meta_boxes_order.init_tiptip(); wc_meta_boxes_order.init_tiptip();
wc_meta_boxes_order_items.unblock(); wc_meta_boxes_order_items.unblock();
wc_meta_boxes_order_items.stupidtable.init(); wc_meta_boxes_order_items.stupidtable.init();
@ -1001,13 +1003,13 @@ jQuery( function ( $ ) {
backbone: { backbone: {
init: function( e, target ) { init: function( e, target ) {
if ( '#wc-modal-add-products' === target ) { if ( 'wc-modal-add-products' === target ) {
$( document.body ).trigger( 'wc-enhanced-select-init' ); $( document.body ).trigger( 'wc-enhanced-select-init' );
} }
}, },
response: function( e, target, data ) { response: function( e, target, data ) {
if ( '#wc-modal-add-tax' === target ) { if ( 'wc-modal-add-tax' === target ) {
var rate_id = data.add_order_tax; var rate_id = data.add_order_tax;
var manual_rate_id = ''; var manual_rate_id = '';
@ -1017,7 +1019,7 @@ jQuery( function ( $ ) {
wc_meta_boxes_order_items.backbone.add_tax( rate_id, manual_rate_id ); wc_meta_boxes_order_items.backbone.add_tax( rate_id, manual_rate_id );
} }
if ( '#wc-modal-add-products' === target ) { if ( 'wc-modal-add-products' === target ) {
wc_meta_boxes_order_items.backbone.add_item( data.add_order_items ); wc_meta_boxes_order_items.backbone.add_item( data.add_order_items );
} }
}, },
@ -1083,8 +1085,8 @@ jQuery( function ( $ ) {
data: data, data: data,
type: 'POST', type: 'POST',
success: function( response ) { success: function( response ) {
$( '#woocommerce-order-items .inside' ).empty(); $( '#woocommerce-order-items' ).find( '.inside' ).empty();
$( '#woocommerce-order-items .inside' ).append( response ); $( '#woocommerce-order-items' ).find( '.inside' ).append( response );
wc_meta_boxes_order.init_tiptip(); wc_meta_boxes_order.init_tiptip();
wc_meta_boxes_order_items.unblock(); wc_meta_boxes_order_items.unblock();
wc_meta_boxes_order_items.stupidtable.init(); wc_meta_boxes_order_items.stupidtable.init();

File diff suppressed because one or more lines are too long

View File

@ -15,15 +15,24 @@ jQuery( function( $ ) {
.on( 'change', 'input.variable_is_virtual', this.variable_is_virtual ) .on( 'change', 'input.variable_is_virtual', this.variable_is_virtual )
.on( 'change', 'input.variable_manage_stock', this.variable_manage_stock ) .on( 'change', 'input.variable_manage_stock', this.variable_manage_stock )
.on( 'click', 'button.notice-dismiss', this.notice_dismiss ) .on( 'click', 'button.notice-dismiss', this.notice_dismiss )
.on( 'click', 'h3 .sort', this.set_menu_order ); .on( 'click', 'h3 .sort', this.set_menu_order )
.on( 'reload', this.reload );
$( 'input.variable_is_downloadable, input.variable_is_virtual, input.variable_manage_stock' ).change(); $( 'input.variable_is_downloadable, input.variable_is_virtual, input.variable_manage_stock' ).change();
$( '#woocommerce-product-data' ).on( 'woocommerce_variations_loaded', this.variations_loaded ); $( '#woocommerce-product-data' ).on( 'woocommerce_variations_loaded', this.variations_loaded );
$( document.body ).on( 'woocommerce_variations_added', this.variation_added ); $( document.body ).on( 'woocommerce_variations_added', this.variation_added );
}, },
/**
* Reload UI
*
* @param {Object} event
* @param {Int} qty
*/
reload: function() {
wc_meta_boxes_product_variations_ajax.load_variations( 1 );
},
/** /**
* Check if variation is downloadable and show/hide elements * Check if variation is downloadable and show/hide elements
*/ */
@ -66,34 +75,41 @@ jQuery( function( $ ) {
/** /**
* Run actions when variations is loaded * Run actions when variations is loaded
*
* @param {Object} event
* @param {Int} needsUpdate
*/ */
variations_loaded: function() { variations_loaded: function( event, needsUpdate ) {
needsUpdate = needsUpdate || false;
var wrapper = $( '#woocommerce-product-data' ); var wrapper = $( '#woocommerce-product-data' );
// Show/hide downloadable, virtual and stock fields if ( ! needsUpdate ) {
$( 'input.variable_is_downloadable, input.variable_is_virtual, input.variable_manage_stock', wrapper ).change(); // Show/hide downloadable, virtual and stock fields
$( 'input.variable_is_downloadable, input.variable_is_virtual, input.variable_manage_stock', wrapper ).change();
// Open sale schedule fields when have some sale price date // Open sale schedule fields when have some sale price date
$( '.woocommerce_variation', wrapper ).each( function( index, el ) { $( '.woocommerce_variation', wrapper ).each( function( index, el ) {
var $el = $( el ), var $el = $( el ),
date_from = $( '.sale_price_dates_from', $el ).val(), date_from = $( '.sale_price_dates_from', $el ).val(),
date_to = $( '.sale_price_dates_to', $el ).val(); date_to = $( '.sale_price_dates_to', $el ).val();
if ( '' !== date_from || '' !== date_to ) { if ( '' !== date_from || '' !== date_to ) {
$( 'a.sale_schedule', $el ).click(); $( 'a.sale_schedule', $el ).click();
} }
}); });
// Remove variation-needs-update classes // Remove variation-needs-update classes
$( '.woocommerce_variations .variation-needs-update', wrapper ).removeClass( 'variation-needs-update' ); $( '.woocommerce_variations .variation-needs-update', wrapper ).removeClass( 'variation-needs-update' );
// Disable cancel and save buttons // Disable cancel and save buttons
$( 'button.cancel-variation-changes, button.save-variation-changes', wrapper ).attr( 'disabled', 'disabled' ); $( 'button.cancel-variation-changes, button.save-variation-changes', wrapper ).attr( 'disabled', 'disabled' );
}
// Init TipTip // Init TipTip
$( '#tiptip_holder' ).removeAttr( 'style' ); $( '#tiptip_holder' ).removeAttr( 'style' );
$( '#tiptip_arrow' ).removeAttr( 'style' ); $( '#tiptip_arrow' ).removeAttr( 'style' );
$( '.woocommerce_variations .tips', wrapper ).tipTip({ $( '.woocommerce_variations .tips, .woocommerce_variations .help_tip', wrapper ).tipTip({
'attribute': 'data-tip', 'attribute': 'data-tip',
'fadeIn': 50, 'fadeIn': 50,
'fadeOut': 50, 'fadeOut': 50,
@ -119,16 +135,16 @@ jQuery( function( $ ) {
}); });
// Allow sorting // Allow sorting
jQuery( '.woocommerce_variations' ).sortable({ $( '.woocommerce_variations', wrapper ).sortable({
items : '.woocommerce_variation', items: '.woocommerce_variation',
cursor : 'move', cursor: 'move',
axis : 'y', axis: 'y',
handle : '.sort', handle: '.sort',
scrollSensitivity : 40, scrollSensitivity: 40,
forcePlaceholderSize: true, forcePlaceholderSize: true,
helper : 'clone', helper: 'clone',
opacity : 0.65, opacity: 0.65,
stop : function () { stop: function() {
wc_meta_boxes_product_variations_actions.variation_row_indexes(); wc_meta_boxes_product_variations_actions.variation_row_indexes();
} }
}); });
@ -139,12 +155,12 @@ jQuery( function( $ ) {
/** /**
* Run actions when added a variation * Run actions when added a variation
* *
* @param {Object} event [description] * @param {Object} event
* @param {Int} qty * @param {Int} qty
*/ */
variation_added: function( event, qty ) { variation_added: function( event, qty ) {
if ( 1 === qty ) { if ( 1 === qty ) {
wc_meta_boxes_product_variations_actions.variations_loaded(); wc_meta_boxes_product_variations_actions.variations_loaded( null, true );
} }
}, },
@ -167,7 +183,7 @@ jQuery( function( $ ) {
* Set menu order * Set menu order
*/ */
variation_row_indexes: function() { variation_row_indexes: function() {
var wrapper = $( '#variable_product_options .woocommerce_variations' ), var wrapper = $( '#variable_product_options' ).find( '.woocommerce_variations' ),
current_page = parseInt( wrapper.attr( 'data-page' ), 10 ), current_page = parseInt( wrapper.attr( 'data-page' ), 10 ),
offset = parseInt( ( current_page - 1 ) * woocommerce_admin_meta_boxes_variations.variations_per_page, 10 ); offset = parseInt( ( current_page - 1 ) * woocommerce_admin_meta_boxes_variations.variations_per_page, 10 );
@ -322,7 +338,7 @@ jQuery( function( $ ) {
* @return {Bool} * @return {Bool}
*/ */
check_for_changes: function() { check_for_changes: function() {
var need_update = $( '#variable_product_options .woocommerce_variations .variation-needs-update' ); var need_update = $( '#variable_product_options' ).find( '.woocommerce_variations .variation-needs-update' );
if ( 0 < need_update.length ) { if ( 0 < need_update.length ) {
if ( window.confirm( woocommerce_admin_meta_boxes_variations.i18n_edited_variations ) ) { if ( window.confirm( woocommerce_admin_meta_boxes_variations.i18n_edited_variations ) ) {
@ -362,7 +378,7 @@ jQuery( function( $ ) {
* @return {Bool} * @return {Bool}
*/ */
initial_load: function() { initial_load: function() {
if ( 0 === $( '#variable_product_options .woocommerce_variations .woocommerce_variation' ).length ) { if ( 0 === $( '#variable_product_options' ).find( '.woocommerce_variations .woocommerce_variation' ).length ) {
wc_meta_boxes_product_variations_pagenav.go_to_page(); wc_meta_boxes_product_variations_pagenav.go_to_page();
} }
}, },
@ -377,7 +393,7 @@ jQuery( function( $ ) {
page = page || 1; page = page || 1;
per_page = per_page || woocommerce_admin_meta_boxes_variations.variations_per_page; per_page = per_page || woocommerce_admin_meta_boxes_variations.variations_per_page;
var wrapper = $( '#variable_product_options .woocommerce_variations' ); var wrapper = $( '#variable_product_options' ).find( '.woocommerce_variations' );
wc_meta_boxes_product_variations_ajax.block(); wc_meta_boxes_product_variations_ajax.block();
@ -423,10 +439,10 @@ jQuery( function( $ ) {
/** /**
* Save variations changes * Save variations changes
* *
* @param {Function} callback * @param {Function} callback Called once saving is complete
*/ */
save_changes: function( callback ) { save_changes: function( callback ) {
var wrapper = $( '#variable_product_options .woocommerce_variations' ), var wrapper = $( '#variable_product_options' ).find( '.woocommerce_variations' ),
need_update = $( '.variation-needs-update', wrapper ), need_update = $( '.variation-needs-update', wrapper ),
data = {}; data = {};
@ -470,10 +486,10 @@ jQuery( function( $ ) {
$( '#variable_product_options' ).trigger( 'woocommerce_variations_save_variations_button' ); $( '#variable_product_options' ).trigger( 'woocommerce_variations_save_variations_button' );
wc_meta_boxes_product_variations_ajax.save_changes( function( error ) { wc_meta_boxes_product_variations_ajax.save_changes( function( error ) {
var wrapper = $( '#variable_product_options .woocommerce_variations' ), var wrapper = $( '#variable_product_options' ).find( '.woocommerce_variations' ),
current = wrapper.attr( 'data-page' ); current = wrapper.attr( 'data-page' );
$( '#variable_product_options #woocommerce_errors' ).remove(); $( '#variable_product_options' ).find( '#woocommerce_errors' ).remove();
if ( error ) { if ( error ) {
wrapper.before( error ); wrapper.before( error );
@ -492,10 +508,21 @@ jQuery( function( $ ) {
/** /**
* Save on post form submit * Save on post form submit
*/ */
save_on_submit: function() { save_on_submit: function( e ) {
$( '#variable_product_options' ).trigger( 'woocommerce_variations_save_variations_on_submit' ); var need_update = $( '#variable_product_options' ).find( '.woocommerce_variations .variation-needs-update' );
wc_meta_boxes_product_variations_ajax.save_changes(); if ( 0 < need_update.length ) {
e.preventDefault();
$( '#variable_product_options' ).trigger( 'woocommerce_variations_save_variations_on_submit' );
wc_meta_boxes_product_variations_ajax.save_changes( wc_meta_boxes_product_variations_ajax.save_on_submit_done );
}
},
/**
* After saved, continue with form submission
*/
save_on_submit_done: function() {
$( 'form#post' ).submit();
}, },
/** /**
@ -504,9 +531,9 @@ jQuery( function( $ ) {
* @return {Bool} * @return {Bool}
*/ */
cancel_variations: function() { cancel_variations: function() {
var current = parseInt( $( '#variable_product_options .woocommerce_variations' ).attr( 'data-page' ), 10 ); var current = parseInt( $( '#variable_product_options' ).find( '.woocommerce_variations' ).attr( 'data-page' ), 10 );
$( '#variable_product_options .woocommerce_variations .variation-needs-update' ).removeClass( 'variation-needs-update' ); $( '#variable_product_options' ).find( '.woocommerce_variations .variation-needs-update' ).removeClass( 'variation-needs-update' );
$( '.variations-defaults select' ).each( function() { $( '.variations-defaults select' ).each( function() {
$( this ).val( $( this ).attr( 'data-current' ) ); $( this ).val( $( this ).attr( 'data-current' ) );
}); });
@ -535,7 +562,7 @@ jQuery( function( $ ) {
var variation = $( response ); var variation = $( response );
variation.addClass( 'variation-needs-update' ); variation.addClass( 'variation-needs-update' );
$( '#variable_product_options .woocommerce_variations' ).prepend( variation ); $( '#variable_product_options' ).find( '.woocommerce_variations' ).prepend( variation );
$( 'button.cancel-variation-changes, button.save-variation-changes' ).removeAttr( 'disabled' ); $( 'button.cancel-variation-changes, button.save-variation-changes' ).removeAttr( 'disabled' );
$( '#variable_product_options' ).trigger( 'woocommerce_variations_added', 1 ); $( '#variable_product_options' ).trigger( 'woocommerce_variations_added', 1 );
wc_meta_boxes_product_variations_ajax.unblock(); wc_meta_boxes_product_variations_ajax.unblock();
@ -568,7 +595,7 @@ jQuery( function( $ ) {
data.security = woocommerce_admin_meta_boxes_variations.delete_variations_nonce; data.security = woocommerce_admin_meta_boxes_variations.delete_variations_nonce;
$.post( woocommerce_admin_meta_boxes_variations.ajax_url, data, function() { $.post( woocommerce_admin_meta_boxes_variations.ajax_url, data, function() {
var wrapper = $( '#variable_product_options .woocommerce_variations' ), var wrapper = $( '#variable_product_options' ).find( '.woocommerce_variations' ),
current_page = parseInt( wrapper.attr( 'data-page' ), 10 ), current_page = parseInt( wrapper.attr( 'data-page' ), 10 ),
total_pages = Math.ceil( ( parseInt( wrapper.attr( 'data-total' ), 10 ) - 1 ) / woocommerce_admin_meta_boxes_variations.variations_per_page ), total_pages = Math.ceil( ( parseInt( wrapper.attr( 'data-total' ), 10 ) - 1 ) / woocommerce_admin_meta_boxes_variations.variations_per_page ),
page = 1; page = 1;
@ -679,7 +706,7 @@ jQuery( function( $ ) {
if ( window.confirm( woocommerce_admin_meta_boxes_variations.i18n_delete_all_variations ) ) { if ( window.confirm( woocommerce_admin_meta_boxes_variations.i18n_delete_all_variations ) ) {
if ( window.confirm( woocommerce_admin_meta_boxes_variations.i18n_last_warning ) ) { if ( window.confirm( woocommerce_admin_meta_boxes_variations.i18n_last_warning ) ) {
data.allowed = true; data.allowed = true;
changes = parseInt( $( '#variable_product_options .woocommerce_variations' ).attr( 'data-total' ), 10 ) * -1; changes = parseInt( $( '#variable_product_options' ).find( '.woocommerce_variations' ).attr( 'data-total' ), 10 ) * -1;
} }
} }
break; break;
@ -731,7 +758,7 @@ jQuery( function( $ ) {
} }
if ( 'delete_all' === do_variation_action && data.allowed ) { if ( 'delete_all' === do_variation_action && data.allowed ) {
$( '#variable_product_options .variation-needs-update' ).removeClass( 'variation-needs-update' ); $( '#variable_product_options' ).find( '.variation-needs-update' ).removeClass( 'variation-needs-update' );
} else { } else {
wc_meta_boxes_product_variations_ajax.check_for_changes(); wc_meta_boxes_product_variations_ajax.check_for_changes();
} }
@ -781,7 +808,7 @@ jQuery( function( $ ) {
* @return {Int} * @return {Int}
*/ */
update_variations_count: function( qty ) { update_variations_count: function( qty ) {
var wrapper = $( '#variable_product_options .woocommerce_variations' ), var wrapper = $( '#variable_product_options' ).find( '.woocommerce_variations' ),
total = parseInt( wrapper.attr( 'data-total' ), 10 ) + qty, total = parseInt( wrapper.attr( 'data-total' ), 10 ) + qty,
displaying_num = $( '.variations-pagenav .displaying-num' ); displaying_num = $( '.variations-pagenav .displaying-num' );
@ -812,7 +839,7 @@ jQuery( function( $ ) {
if ( page_nav.is( ':hidden' ) ) { if ( page_nav.is( ':hidden' ) ) {
$( 'option, optgroup', '.variation_actions' ).show(); $( 'option, optgroup', '.variation_actions' ).show();
$( '.variation_actions' ).val( 'add_variation' ); $( '.variation_actions' ).val( 'add_variation' );
$( '#variable_product_options .toolbar' ).show(); $( '#variable_product_options' ).find( '.toolbar' ).show();
page_nav.show(); page_nav.show();
$( '.pagination-links', page_nav ).hide(); $( '.pagination-links', page_nav ).hide();
} }
@ -825,9 +852,9 @@ jQuery( function( $ ) {
* @param {Int} qty * @param {Int} qty
*/ */
set_paginav: function( qty ) { set_paginav: function( qty ) {
var wrapper = $( '#variable_product_options .woocommerce_variations' ), var wrapper = $( '#variable_product_options' ).find( '.woocommerce_variations' ),
new_qty = wc_meta_boxes_product_variations_pagenav.update_variations_count( qty ), new_qty = wc_meta_boxes_product_variations_pagenav.update_variations_count( qty ),
toolbar = $( '#variable_product_options .toolbar' ), toolbar = $( '#variable_product_options' ).find( '.toolbar' ),
variation_action = $( '.variation_actions' ), variation_action = $( '.variation_actions' ),
page_nav = $( '.variations-pagenav' ), page_nav = $( '.variations-pagenav' ),
displaying_links = $( '.pagination-links', page_nav ), displaying_links = $( '.pagination-links', page_nav ),
@ -852,7 +879,7 @@ jQuery( function( $ ) {
page_nav.hide(); page_nav.hide();
$( 'option, optgroup', variation_action ).hide(); $( 'option, optgroup', variation_action ).hide();
$( '.variation_actions' ).val( 'add_variation' ); $( '.variation_actions' ).val( 'add_variation' );
$( 'option', variation_action ).slice( 0, 2 ).show(); $( 'option[data-global="true"]', variation_action ).show();
} else { } else {
toolbar.show(); toolbar.show();
@ -930,7 +957,7 @@ jQuery( function( $ ) {
*/ */
page_selector: function() { page_selector: function() {
var selected = parseInt( $( this ).val(), 10 ), var selected = parseInt( $( this ).val(), 10 ),
wrapper = $( '#variable_product_options .woocommerce_variations' ); wrapper = $( '#variable_product_options' ).find( '.woocommerce_variations' );
$( '.variations-pagenav .page-selector' ).val( selected ); $( '.variations-pagenav .page-selector' ).val( selected );
@ -959,7 +986,7 @@ jQuery( function( $ ) {
*/ */
prev_page: function() { prev_page: function() {
if ( wc_meta_boxes_product_variations_pagenav.check_is_enabled( this ) ) { if ( wc_meta_boxes_product_variations_pagenav.check_is_enabled( this ) ) {
var wrapper = $( '#variable_product_options .woocommerce_variations' ), var wrapper = $( '#variable_product_options' ).find( '.woocommerce_variations' ),
prev_page = parseInt( wrapper.attr( 'data-page' ), 10 ) - 1, prev_page = parseInt( wrapper.attr( 'data-page' ), 10 ) - 1,
new_page = ( 0 < prev_page ) ? prev_page : 1; new_page = ( 0 < prev_page ) ? prev_page : 1;
@ -976,7 +1003,7 @@ jQuery( function( $ ) {
*/ */
next_page: function() { next_page: function() {
if ( wc_meta_boxes_product_variations_pagenav.check_is_enabled( this ) ) { if ( wc_meta_boxes_product_variations_pagenav.check_is_enabled( this ) ) {
var wrapper = $( '#variable_product_options .woocommerce_variations' ), var wrapper = $( '#variable_product_options' ).find( '.woocommerce_variations' ),
total_pages = parseInt( wrapper.attr( 'data-total_pages' ), 10 ), total_pages = parseInt( wrapper.attr( 'data-total_pages' ), 10 ),
next_page = parseInt( wrapper.attr( 'data-page' ), 10 ) + 1, next_page = parseInt( wrapper.attr( 'data-page' ), 10 ) + 1,
new_page = ( total_pages >= next_page ) ? next_page : total_pages; new_page = ( total_pages >= next_page ) ? next_page : total_pages;
@ -994,7 +1021,7 @@ jQuery( function( $ ) {
*/ */
last_page: function() { last_page: function() {
if ( wc_meta_boxes_product_variations_pagenav.check_is_enabled( this ) ) { if ( wc_meta_boxes_product_variations_pagenav.check_is_enabled( this ) ) {
var last_page = $( '#variable_product_options .woocommerce_variations' ).attr( 'data-total_pages' ); var last_page = $( '#variable_product_options' ).find( '.woocommerce_variations' ).attr( 'data-total_pages' );
wc_meta_boxes_product_variations_pagenav.set_page( last_page ); wc_meta_boxes_product_variations_pagenav.set_page( last_page );
} }

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,7 @@ jQuery( function( $ ) {
$( function() { $( function() {
// Prevent inputs in meta box headings opening/closing contents // Prevent inputs in meta box headings opening/closing contents
$( '#woocommerce-product-data h3.hndle' ).unbind( 'click.postboxes' ); $( '#woocommerce-product-data' ).find( 'h3.hndle' ).unbind( 'click.postboxes' );
jQuery( '#woocommerce-product-data' ).on( 'click', 'h3.hndle', function( event ) { jQuery( '#woocommerce-product-data' ).on( 'click', 'h3.hndle', function( event ) {
@ -44,16 +44,16 @@ jQuery( function( $ ) {
}); });
// Catalog Visibility // Catalog Visibility
$( '#catalog-visibility .edit-catalog-visibility' ).click( function () { $( '#catalog-visibility' ).find( '.edit-catalog-visibility' ).click( function () {
if ( $( '#catalog-visibility-select').is( ':hidden' ) ) { if ( $( '#catalog-visibility-select' ).is( ':hidden' ) ) {
$( '#catalog-visibility-select' ).slideDown( 'fast' ); $( '#catalog-visibility-select' ).slideDown( 'fast' );
$( this ).hide(); $( this ).hide();
} }
return false; return false;
}); });
$('#catalog-visibility .save-post-visibility').click( function () { $( '#catalog-visibility' ).find( '.save-post-visibility' ).click( function () {
$('#catalog-visibility-select').slideUp( 'fast' ); $( '#catalog-visibility-select' ).slideUp( 'fast' );
$('#catalog-visibility .edit-catalog-visibility').show(); $( '#catalog-visibility' ).find( '.edit-catalog-visibility' ).show();
var label = $( 'input[name=_visibility]:checked' ).attr( 'data-label' ); var label = $( 'input[name=_visibility]:checked' ).attr( 'data-label' );
@ -65,9 +65,9 @@ jQuery( function( $ ) {
$( '#catalog-visibility-display' ).text( label ); $( '#catalog-visibility-display' ).text( label );
return false; return false;
}); });
$( '#catalog-visibility .cancel-post-visibility' ).click( function () { $( '#catalog-visibility' ).find( '.cancel-post-visibility' ).click( function () {
$( '#catalog-visibility-select' ).slideUp( 'fast' ); $( '#catalog-visibility-select' ).slideUp( 'fast' );
$( '#catalog-visibility .edit-catalog-visibility' ).show(); $( '#catalog-visibility' ).find( '.edit-catalog-visibility' ).show();
var current_visibility = $( '#current_visibility' ).val(); var current_visibility = $( '#current_visibility' ).val();
var current_featured = $( '#current_featured' ).val(); var current_featured = $( '#current_featured' ).val();
@ -115,7 +115,7 @@ jQuery( function( $ ) {
}).change(); }).change();
$( document.body ).on( 'woocommerce-product-type-change', function( e, select_val ) { $( document.body ).on( 'woocommerce-product-type-change', function( e, select_val ) {
if ( 'variable' !== select_val && 0 < $( '#variable_product_options input[name^=variable_sku]' ).length && $( document.body ).triggerHandler( 'woocommerce-display-product-type-alert', select_val ) !== false ) { if ( 'variable' !== select_val && 0 < $( '#variable_product_options' ).find( 'input[name^=variable_sku]' ).length && $( document.body ).triggerHandler( 'woocommerce-display-product-type-alert', select_val ) !== false ) {
window.alert( woocommerce_admin_meta_boxes.i18n_product_type_alert ); window.alert( woocommerce_admin_meta_boxes.i18n_product_type_alert );
} }
}); });
@ -404,7 +404,7 @@ jQuery( function( $ ) {
// Save attributes and update variations // Save attributes and update variations
$( '.save_attributes' ).on( 'click', function() { $( '.save_attributes' ).on( 'click', function() {
$( '.product_attributes' ).block({ $( '#woocommerce-product-data' ).block({
message: null, message: null,
overlayCSS: { overlayCSS: {
background: '#fff', background: '#fff',
@ -420,16 +420,14 @@ jQuery( function( $ ) {
}; };
$.post( woocommerce_admin_meta_boxes.ajax_url, data, function() { $.post( woocommerce_admin_meta_boxes.ajax_url, data, function() {
// Reload variations panel
var this_page = window.location.toString(); var this_page = window.location.toString();
this_page = this_page.replace( 'post-new.php?', 'post.php?post=' + woocommerce_admin_meta_boxes.post_id + '&action=edit&' ); this_page = this_page.replace( 'post-new.php?', 'post.php?post=' + woocommerce_admin_meta_boxes.post_id + '&action=edit&' );
// Load variations panel // Load variations panel
$( '#variable_product_options' ).block({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } });
$( '#variable_product_options' ).load( this_page + ' #variable_product_options_inner', function() { $( '#variable_product_options' ).load( this_page + ' #variable_product_options_inner', function() {
$( '#variable_product_options' ).unblock(); $( '#variable_product_options' ).trigger( 'reload' );
}); });
$( '.product_attributes' ).unblock();
}); });
}); });
@ -516,7 +514,7 @@ jQuery( function( $ ) {
// Product gallery file uploads // Product gallery file uploads
var product_gallery_frame; var product_gallery_frame;
var $image_gallery_ids = $( '#product_image_gallery' ); var $image_gallery_ids = $( '#product_image_gallery' );
var $product_images = $( '#product_images_container ul.product_images' ); var $product_images = $( '#product_images_container' ).find( 'ul.product_images' );
jQuery( '.add_product_images' ).on( 'click', 'a', function( event ) { jQuery( '.add_product_images' ).on( 'click', 'a', function( event ) {
var $el = $( this ); var $el = $( this );
@ -555,7 +553,7 @@ jQuery( function( $ ) {
if ( attachment.id ) { if ( attachment.id ) {
attachment_ids = attachment_ids ? attachment_ids + ',' + attachment.id : attachment.id; attachment_ids = attachment_ids ? attachment_ids + ',' + attachment.id : attachment.id;
var attachment_image = attachment.sizes.thumbnail ? attachment.sizes.thumbnail.url : attachment.url; var attachment_image = attachment.sizes && attachment.sizes.thumbnail ? attachment.sizes.thumbnail.url : attachment.url;
$product_images.append( '<li class="image" data-attachment_id="' + attachment.id + '"><img src="' + attachment_image + '" /><ul class="actions"><li><a href="#" class="delete" title="' + $el.data('delete') + '">' + $el.data('text') + '</a></li></ul></li>' ); $product_images.append( '<li class="image" data-attachment_id="' + attachment.id + '"><img src="' + attachment_image + '" /><ul class="actions"><li><a href="#" class="delete" title="' + $el.data('delete') + '">' + $el.data('text') + '</a></li></ul></li>' );
} }
@ -587,7 +585,7 @@ jQuery( function( $ ) {
update: function() { update: function() {
var attachment_ids = ''; var attachment_ids = '';
$( '#product_images_container ul li.image' ).css( 'cursor', 'default' ).each( function() { $( '#product_images_container' ).find( 'ul li.image' ).css( 'cursor', 'default' ).each( function() {
var attachment_id = jQuery( this ).attr( 'data-attachment_id' ); var attachment_id = jQuery( this ).attr( 'data-attachment_id' );
attachment_ids = attachment_ids + attachment_id + ','; attachment_ids = attachment_ids + attachment_id + ',';
}); });
@ -602,7 +600,7 @@ jQuery( function( $ ) {
var attachment_ids = ''; var attachment_ids = '';
$( '#product_images_container ul li.image' ).css( 'cursor', 'default' ).each( function() { $( '#product_images_container' ).find( 'ul li.image' ).css( 'cursor', 'default' ).each( function() {
var attachment_id = jQuery( this ).attr( 'data-attachment_id' ); var attachment_id = jQuery( this ).attr( 'data-attachment_id' );
attachment_ids = attachment_ids + attachment_id + ','; attachment_ids = attachment_ids + attachment_id + ',';
}); });

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@ jQuery( function ( $ ) {
runTipTip(); runTipTip();
// Allow Tabbing // Allow Tabbing
$( '#titlediv #title' ).keyup( function( event ) { $( '#titlediv' ).find( '#title' ).keyup( function( event ) {
var code = event.keyCode || event.which; var code = event.keyCode || event.which;
// Tab key // Tab key
@ -27,22 +27,20 @@ jQuery( function ( $ ) {
} }
}); });
$( function() { $( '.wc-metaboxes-wrapper' ).on( 'click', '.wc-metabox > h3', function() {
$( '.wc-metabox > h3' ).click( function() { $( this ).parent( '.wc-metabox' ).toggleClass( 'closed' ).toggleClass( 'open' );
$( this ).parent( '.wc-metabox' ).toggleClass( 'closed' ).toggleClass( 'open' );
});
}); });
// Tabbed Panels // Tabbed Panels
$( document.body ).on( 'wc-init-tabbed-panels', function() { $( document.body ).on( 'wc-init-tabbed-panels', function() {
$( 'ul.wc-tabs' ).show(); $( 'ul.wc-tabs' ).show();
$( 'ul.wc-tabs a' ).click( function() { $( 'ul.wc-tabs a' ).click( function( e ) {
e.preventDefault();
var panel_wrap = $( this ).closest( 'div.panel-wrap' ); var panel_wrap = $( this ).closest( 'div.panel-wrap' );
$( 'ul.wc-tabs li', panel_wrap ).removeClass( 'active' ); $( 'ul.wc-tabs li', panel_wrap ).removeClass( 'active' );
$( this ).parent().addClass( 'active' ); $( this ).parent().addClass( 'active' );
$( 'div.panel', panel_wrap ).hide(); $( 'div.panel', panel_wrap ).hide();
$( $( this ).attr( 'href' ) ).show(); $( $( this ).attr( 'href' ) ).show();
return false;
}); });
$( 'div.panel-wrap' ).each( function() { $( 'div.panel-wrap' ).each( function() {
$( this ).find( 'ul.wc-tabs li' ).eq( 0 ).find( 'a' ).click(); $( this ).find( 'ul.wc-tabs li' ).eq( 0 ).find( 'a' ).click();

View File

@ -1 +1 @@
jQuery(function(a){function b(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}b(),a("#titlediv #title").keyup(function(b){var c=b.keyCode||b.which;return"9"===c&&a("#woocommerce-coupon-description").size()>0?(b.stopPropagation(),a("#woocommerce-coupon-description").focus(),!1):void 0}),a(function(){a(".wc-metabox > h3").click(function(){a(this).parent(".wc-metabox").toggleClass("closed").toggleClass("open")})}),a(document.body).on("wc-init-tabbed-panels",function(){a("ul.wc-tabs").show(),a("ul.wc-tabs a").click(function(){var b=a(this).closest("div.panel-wrap");return a("ul.wc-tabs li",b).removeClass("active"),a(this).parent().addClass("active"),a("div.panel",b).hide(),a(a(this).attr("href")).show(),!1}),a("div.panel-wrap").each(function(){a(this).find("ul.wc-tabs li").eq(0).find("a").click()})}).trigger("wc-init-tabbed-panels"),a(document.body).on("wc-init-datepickers",function(){a(".date-picker-field, .date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0})}).trigger("wc-init-datepickers"),a(".wc-metaboxes-wrapper").on("click",".wc-metabox h3",function(b){a(b.target).filter(":input, option, .sort").length||a(this).next(".wc-metabox-content").stop().slideToggle()}).on("click",".expand_all",function(){return a(this).closest(".wc-metaboxes-wrapper").find(".wc-metabox > .wc-metabox-content").show(),!1}).on("click",".close_all",function(){return a(this).closest(".wc-metaboxes-wrapper").find(".wc-metabox > .wc-metabox-content").hide(),!1}),a(".wc-metabox.closed").each(function(){a(this).find(".wc-metabox-content").hide()})}); jQuery(function(a){function b(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}b(),a("#titlediv").find("#title").keyup(function(b){var c=b.keyCode||b.which;return"9"===c&&a("#woocommerce-coupon-description").size()>0?(b.stopPropagation(),a("#woocommerce-coupon-description").focus(),!1):void 0}),a(".wc-metaboxes-wrapper").on("click",".wc-metabox > h3",function(){a(this).parent(".wc-metabox").toggleClass("closed").toggleClass("open")}),a(document.body).on("wc-init-tabbed-panels",function(){a("ul.wc-tabs").show(),a("ul.wc-tabs a").click(function(b){b.preventDefault();var c=a(this).closest("div.panel-wrap");a("ul.wc-tabs li",c).removeClass("active"),a(this).parent().addClass("active"),a("div.panel",c).hide(),a(a(this).attr("href")).show()}),a("div.panel-wrap").each(function(){a(this).find("ul.wc-tabs li").eq(0).find("a").click()})}).trigger("wc-init-tabbed-panels"),a(document.body).on("wc-init-datepickers",function(){a(".date-picker-field, .date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0})}).trigger("wc-init-datepickers"),a(".wc-metaboxes-wrapper").on("click",".wc-metabox h3",function(b){a(b.target).filter(":input, option, .sort").length||a(this).next(".wc-metabox-content").stop().slideToggle()}).on("click",".expand_all",function(){return a(this).closest(".wc-metaboxes-wrapper").find(".wc-metabox > .wc-metabox-content").show(),!1}).on("click",".close_all",function(){return a(this).closest(".wc-metaboxes-wrapper").find(".wc-metabox > .wc-metabox-content").hide(),!1}),a(".wc-metabox.closed").each(function(){a(this).find(".wc-metabox-content").hide()})});

View File

@ -25,7 +25,8 @@
if ( settings.template ) { if ( settings.template ) {
new $.WCBackboneModal.View({ new $.WCBackboneModal.View({
target: settings.template target: settings.template,
string: settings.variable
}); });
} }
}; };
@ -36,7 +37,8 @@
* @type {object} * @type {object}
*/ */
$.WCBackboneModal.defaultOptions = { $.WCBackboneModal.defaultOptions = {
template: '' template: '',
variable: {}
}; };
/** /**
@ -48,6 +50,7 @@
tagName: 'div', tagName: 'div',
id: 'wc-backbone-modal-dialog', id: 'wc-backbone-modal-dialog',
_target: undefined, _target: undefined,
_string: undefined,
events: { events: {
'click .modal-close': 'closeButton', 'click .modal-close': 'closeButton',
'click #btn-ok': 'addButton', 'click #btn-ok': 'addButton',
@ -55,11 +58,16 @@
}, },
initialize: function( data ) { initialize: function( data ) {
this._target = data.target; this._target = data.target;
this._string = data.string;
_.bindAll( this, 'render' ); _.bindAll( this, 'render' );
this.render(); this.render();
}, },
render: function() { render: function() {
this.$el.attr( 'tabindex' , '0' ).append( $( this._target ).html() ); var template = wp.template( this._target );
this.$el.attr( 'tabindex' , '0' ).append(
template( this._string )
);
$( document.body ).css({ $( document.body ).css({
'overflow': 'hidden' 'overflow': 'hidden'

View File

@ -1 +1 @@
!function(a,b,c){"use strict";a.fn.WCBackboneModal=function(b){return this.each(function(){new a.WCBackboneModal(a(this),b)})},a.WCBackboneModal=function(b,c){var d=a.extend({},a.WCBackboneModal.defaultOptions,c);d.template&&new a.WCBackboneModal.View({target:d.template})},a.WCBackboneModal.defaultOptions={template:""},a.WCBackboneModal.View=b.View.extend({tagName:"div",id:"wc-backbone-modal-dialog",_target:void 0,events:{"click .modal-close":"closeButton","click #btn-ok":"addButton",keydown:"keyboardActions"},initialize:function(a){this._target=a.target,c.bindAll(this,"render"),this.render()},render:function(){this.$el.attr("tabindex","0").append(a(this._target).html()),a(document.body).css({overflow:"hidden"}).append(this.$el);var b=a(".wc-backbone-modal-content").find("article"),c=b.height()<90?90:b.height(),d=a(window).height()-200;d>400&&(d=400),c>d?b.css({overflow:"auto",height:d+"px"}):b.css({overflow:"visible",height:c>90?"auto":c+"px"}),a(".wc-backbone-modal-content").css({"margin-top":"-"+a(".wc-backbone-modal-content").height()/2+"px","margin-left":"-"+a(".wc-backbone-modal-content").width()/2+"px"}),a(document.body).trigger("wc_backbone_modal_loaded",this._target)},closeButton:function(b){b.preventDefault(),a(document.body).trigger("wc_backbone_modal_before_remove",this._target),this.undelegateEvents(),a(document).off("focusin"),a(document.body).css({overflow:"auto"}),this.remove(),a(document.body).trigger("wc_backbone_modal_removed",this._target)},addButton:function(b){a(document.body).trigger("wc_backbone_modal_response",[this._target,this.getFormData()]),this.closeButton(b)},getFormData:function(){var b={};return a(document.body).trigger("wc_backbone_modal_before_update",this._target),a.each(a("form",this.$el).serializeArray(),function(c,d){b.hasOwnProperty(d.name)?(b[d.name]=a.makeArray(b[d.name]),b[d.name].push(d.value)):b[d.name]=d.value}),b},keyboardActions:function(a){var b=a.keyCode||a.which;13!==b||a.target.tagName&&("input"===a.target.tagName.toLowerCase()||"textarea"===a.target.tagName.toLowerCase())||this.addButton(a),27===b&&this.closeButton(a)}})}(jQuery,Backbone,_); !function(a,b,c){"use strict";a.fn.WCBackboneModal=function(b){return this.each(function(){new a.WCBackboneModal(a(this),b)})},a.WCBackboneModal=function(b,c){var d=a.extend({},a.WCBackboneModal.defaultOptions,c);d.template&&new a.WCBackboneModal.View({target:d.template,string:d.variable})},a.WCBackboneModal.defaultOptions={template:"",variable:{}},a.WCBackboneModal.View=b.View.extend({tagName:"div",id:"wc-backbone-modal-dialog",_target:void 0,_string:void 0,events:{"click .modal-close":"closeButton","click #btn-ok":"addButton",keydown:"keyboardActions"},initialize:function(a){this._target=a.target,this._string=a.string,c.bindAll(this,"render"),this.render()},render:function(){var b=wp.template(this._target);this.$el.attr("tabindex","0").append(b(this._string)),a(document.body).css({overflow:"hidden"}).append(this.$el);var c=a(".wc-backbone-modal-content").find("article"),d=c.height()<90?90:c.height(),e=a(window).height()-200;e>400&&(e=400),d>e?c.css({overflow:"auto",height:e+"px"}):c.css({overflow:"visible",height:d>90?"auto":d+"px"}),a(".wc-backbone-modal-content").css({"margin-top":"-"+a(".wc-backbone-modal-content").height()/2+"px","margin-left":"-"+a(".wc-backbone-modal-content").width()/2+"px"}),a(document.body).trigger("wc_backbone_modal_loaded",this._target)},closeButton:function(b){b.preventDefault(),a(document.body).trigger("wc_backbone_modal_before_remove",this._target),this.undelegateEvents(),a(document).off("focusin"),a(document.body).css({overflow:"auto"}),this.remove(),a(document.body).trigger("wc_backbone_modal_removed",this._target)},addButton:function(b){a(document.body).trigger("wc_backbone_modal_response",[this._target,this.getFormData()]),this.closeButton(b)},getFormData:function(){var b={};return a(document.body).trigger("wc_backbone_modal_before_update",this._target),a.each(a("form",this.$el).serializeArray(),function(c,d){b.hasOwnProperty(d.name)?(b[d.name]=a.makeArray(b[d.name]),b[d.name].push(d.value)):b[d.name]=d.value}),b},keyboardActions:function(a){var b=a.keyCode||a.which;13!==b||a.target.tagName&&("input"===a.target.tagName.toLowerCase()||"textarea"===a.target.tagName.toLowerCase())||this.addButton(a),27===b&&this.closeButton(a)}})}(jQuery,Backbone,_);

View File

@ -42,11 +42,10 @@ jQuery(function( $ ) {
$( 'input[name="_stock"]', '.inline-edit-row' ).val( stock ); $( 'input[name="_stock"]', '.inline-edit-row' ).val( stock );
$( 'input[name="menu_order"]', '.inline-edit-row' ).val( menu_order ); $( 'input[name="menu_order"]', '.inline-edit-row' ).val( menu_order );
$( 'select[name="_tax_status"] option, select[name="_tax_class"] option, select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option' ).removeAttr( 'selected' );
$( 'select[name="_tax_status"] option[value="' + tax_status + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); $( 'select[name="_tax_status"] option[value="' + tax_status + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' );
$( 'select[name="_tax_class"] option[value="' + tax_class + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); $( 'select[name="_tax_class"] option[value="' + tax_class + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' );
$( 'select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option' ).removeAttr( 'selected' );
$( 'select[name="_visibility"] option[value="' + visibility + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); $( 'select[name="_visibility"] option[value="' + visibility + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' );
$( 'select[name="_stock_status"] option[value="' + stock_status + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); $( 'select[name="_stock_status"] option[value="' + stock_status + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' );
$( 'select[name="_backorders"] option[value="' + backorders + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); $( 'select[name="_backorders"] option[value="' + backorders + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' );
@ -100,8 +99,8 @@ jQuery(function( $ ) {
$( '#wpbody' ).on( 'click', '#doaction, #doaction2', function() { $( '#wpbody' ).on( 'click', '#doaction, #doaction2', function() {
$( 'input.text', '.inline-edit-row' ).val( '' ); $( 'input.text', '.inline-edit-row' ).val( '' );
$( '#woocommerce-fields select' ).prop( 'selectedIndex', 0 ); $( '#woocommerce-fields' ).find( 'select' ).prop( 'selectedIndex', 0 );
$( '#woocommerce-fields-bulk .inline-edit-group .change-input' ).hide(); $( '#woocommerce-fields-bulk' ).find( '.inline-edit-group .change-input' ).hide();
// Autosuggest product tags on bulk edit // Autosuggest product tags on bulk edit
var tax = 'product_tag'; var tax = 'product_tag';

View File

@ -1 +1 @@
jQuery(function(a){a("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var b=a(this).closest("tr").attr("id");b=b.replace("post-","");var c=a("#woocommerce_inline_"+b),d=c.find(".sku").text(),e=c.find(".regular_price").text(),f=c.find(".sale_price ").text(),g=c.find(".weight").text(),h=c.find(".length").text(),i=c.find(".width").text(),j=c.find(".height").text(),k=c.find(".shipping_class").text(),l=c.find(".visibility").text(),m=c.find(".stock_status").text(),n=c.find(".stock").text(),o=c.find(".featured").text(),p=c.find(".manage_stock").text(),q=c.find(".menu_order").text(),r=c.find(".tax_status").text(),s=c.find(".tax_class").text(),t=c.find(".backorders").text();a('input[name="_sku"]',".inline-edit-row").val(d),a('input[name="_regular_price"]',".inline-edit-row").val(e),a('input[name="_sale_price"]',".inline-edit-row").val(f),a('input[name="_weight"]',".inline-edit-row").val(g),a('input[name="_length"]',".inline-edit-row").val(h),a('input[name="_width"]',".inline-edit-row").val(i),a('input[name="_height"]',".inline-edit-row").val(j),a('select[name="_shipping_class"] option:selected',".inline-edit-row").attr("selected",!1).change(),a('select[name="_shipping_class"] option[value="'+k+'"]').attr("selected","selected").change(),a('input[name="_stock"]',".inline-edit-row").val(n),a('input[name="menu_order"]',".inline-edit-row").val(q),a('select[name="_tax_status"] option[value="'+r+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_tax_class"] option[value="'+s+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option').removeAttr("selected"),a('select[name="_visibility"] option[value="'+l+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_stock_status"] option[value="'+m+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_backorders"] option[value="'+t+'"]',".inline-edit-row").attr("selected","selected"),"yes"===o?a('input[name="_featured"]',".inline-edit-row").attr("checked","checked"):a('input[name="_featured"]',".inline-edit-row").removeAttr("checked"),"yes"===p?(a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"),a('input[name="_manage_stock"]',".inline-edit-row").attr("checked","checked")):(a(".stock_qty_field",".inline-edit-row").hide(),a('input[name="_manage_stock"]',".inline-edit-row").removeAttr("checked"));var u=c.find(".product_type").text(),v=c.find(".product_is_virtual").text();"simple"===u||"external"===u?a(".price_fields",".inline-edit-row").show().removeAttr("style"):a(".price_fields",".inline-edit-row").hide(),"yes"===v?a(".dimension_fields",".inline-edit-row").hide():a(".dimension_fields",".inline-edit-row").show().removeAttr("style"),"grouped"===u?a(".stock_fields",".inline-edit-row").hide():a(".stock_fields",".inline-edit-row").show().removeAttr("style")}),a("#the-list").on("change",'.inline-edit-row input[name="_manage_stock"]',function(){a(this).is(":checked")?a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"):a(".stock_qty_field",".inline-edit-row").hide()}),a("#wpbody").on("click","#doaction, #doaction2",function(){a("input.text",".inline-edit-row").val(""),a("#woocommerce-fields select").prop("selectedIndex",0),a("#woocommerce-fields-bulk .inline-edit-group .change-input").hide();var b="product_tag";a('tr.inline-editor textarea[name="tax_input['+b+']"]').suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,minchars:2,multiple:!0,multipleSep:inlineEditL10n.comma})}),a("#wpbody").on("change","#woocommerce-fields-bulk .inline-edit-group .change_to",function(){0<a(this).val()?a(this).closest("div").find(".change-input").show():a(this).closest("div").find(".change-input").hide()})}); jQuery(function(a){a("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var b=a(this).closest("tr").attr("id");b=b.replace("post-","");var c=a("#woocommerce_inline_"+b),d=c.find(".sku").text(),e=c.find(".regular_price").text(),f=c.find(".sale_price ").text(),g=c.find(".weight").text(),h=c.find(".length").text(),i=c.find(".width").text(),j=c.find(".height").text(),k=c.find(".shipping_class").text(),l=c.find(".visibility").text(),m=c.find(".stock_status").text(),n=c.find(".stock").text(),o=c.find(".featured").text(),p=c.find(".manage_stock").text(),q=c.find(".menu_order").text(),r=c.find(".tax_status").text(),s=c.find(".tax_class").text(),t=c.find(".backorders").text();a('input[name="_sku"]',".inline-edit-row").val(d),a('input[name="_regular_price"]',".inline-edit-row").val(e),a('input[name="_sale_price"]',".inline-edit-row").val(f),a('input[name="_weight"]',".inline-edit-row").val(g),a('input[name="_length"]',".inline-edit-row").val(h),a('input[name="_width"]',".inline-edit-row").val(i),a('input[name="_height"]',".inline-edit-row").val(j),a('select[name="_shipping_class"] option:selected',".inline-edit-row").attr("selected",!1).change(),a('select[name="_shipping_class"] option[value="'+k+'"]').attr("selected","selected").change(),a('input[name="_stock"]',".inline-edit-row").val(n),a('input[name="menu_order"]',".inline-edit-row").val(q),a('select[name="_tax_status"] option, select[name="_tax_class"] option, select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option').removeAttr("selected"),a('select[name="_tax_status"] option[value="'+r+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_tax_class"] option[value="'+s+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_visibility"] option[value="'+l+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_stock_status"] option[value="'+m+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_backorders"] option[value="'+t+'"]',".inline-edit-row").attr("selected","selected"),"yes"===o?a('input[name="_featured"]',".inline-edit-row").attr("checked","checked"):a('input[name="_featured"]',".inline-edit-row").removeAttr("checked"),"yes"===p?(a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"),a('input[name="_manage_stock"]',".inline-edit-row").attr("checked","checked")):(a(".stock_qty_field",".inline-edit-row").hide(),a('input[name="_manage_stock"]',".inline-edit-row").removeAttr("checked"));var u=c.find(".product_type").text(),v=c.find(".product_is_virtual").text();"simple"===u||"external"===u?a(".price_fields",".inline-edit-row").show().removeAttr("style"):a(".price_fields",".inline-edit-row").hide(),"yes"===v?a(".dimension_fields",".inline-edit-row").hide():a(".dimension_fields",".inline-edit-row").show().removeAttr("style"),"grouped"===u?a(".stock_fields",".inline-edit-row").hide():a(".stock_fields",".inline-edit-row").show().removeAttr("style")}),a("#the-list").on("change",'.inline-edit-row input[name="_manage_stock"]',function(){a(this).is(":checked")?a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"):a(".stock_qty_field",".inline-edit-row").hide()}),a("#wpbody").on("click","#doaction, #doaction2",function(){a("input.text",".inline-edit-row").val(""),a("#woocommerce-fields").find("select").prop("selectedIndex",0),a("#woocommerce-fields-bulk").find(".inline-edit-group .change-input").hide();var b="product_tag";a('tr.inline-editor textarea[name="tax_input['+b+']"]').suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,minchars:2,multiple:!0,multipleSep:inlineEditL10n.comma})}),a("#wpbody").on("change","#woocommerce-fields-bulk .inline-edit-group .change_to",function(){0<a(this).val()?a(this).closest("div").find(".change-input").show():a(this).closest("div").find(".change-input").hide()})});

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 + '" />' ); $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( 'contry-change.woocommerce', [country, $( this ).closest( 'div' )] );
$( document.body ).trigger( 'country-change.woocommerce', [country, $( this ).closest( 'div' )] );
}, },
change_state: function() { 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

@ -53,4 +53,15 @@ jQuery(function( $ ) {
} }
}).change(); }).change();
$('.button-next').on( 'click', function() {
$('.wc-setup-content').block({
message: null,
overlayCSS: {
background: '#fff',
opacity: 0.6
}
});
return true;
});
}); });

View File

@ -1 +1 @@
jQuery(function(a){var b=a.parseJSON(wc_setup_params.locale_info);a('select[name="store_location"]').change(function(){var c=a(this).val(),d=c.split(":")[0],e=b[d],f=["thousand_sep","decimal_sep","num_decimals","currency_pos"];e?a.each(e,function(b,c){a(':input[name="'+b+'"]').val(c).change(),-1!==a.inArray(b,f)&&a(':input[name="'+b+'"]').closest("tr").hide()}):(a(':input[name="currency_pos"]').closest("tr").show(),a(':input[name="thousand_sep"]').closest("tr").show(),a(':input[name="decimal_sep"]').closest("tr").show(),a(':input[name="num_decimals"]').closest("tr").show())}).change(),a('input[name="woocommerce_calc_shipping"]').change(function(){a(this).is(":checked")?(a(':input[name="shipping_cost_domestic"]').closest("tr").show(),a(':input[name="shipping_cost_international"]').closest("tr").show()):(a(':input[name="shipping_cost_domestic"]').closest("tr").hide(),a(':input[name="shipping_cost_international"]').closest("tr").hide())}).change(),a('input[name="woocommerce_calc_taxes"]').change(function(){a(this).is(":checked")?(a(':input[name="woocommerce_prices_include_tax"], :input[name="woocommerce_import_tax_rates"]').closest("tr").show(),a("tr.tax-rates").show()):(a(':input[name="woocommerce_prices_include_tax"], :input[name="woocommerce_import_tax_rates"]').closest("tr").hide(),a("tr.tax-rates").hide())}).change(),a('input[name="woocommerce_import_tax_rates"]').change(function(){a(this).is(":checked")?a(".importing-tax-rates").show():a(".importing-tax-rates").hide()}).change()}); jQuery(function(a){var b=a.parseJSON(wc_setup_params.locale_info);a('select[name="store_location"]').change(function(){var c=a(this).val(),d=c.split(":")[0],e=b[d],f=["thousand_sep","decimal_sep","num_decimals","currency_pos"];e?a.each(e,function(b,c){a(':input[name="'+b+'"]').val(c).change(),-1!==a.inArray(b,f)&&a(':input[name="'+b+'"]').closest("tr").hide()}):(a(':input[name="currency_pos"]').closest("tr").show(),a(':input[name="thousand_sep"]').closest("tr").show(),a(':input[name="decimal_sep"]').closest("tr").show(),a(':input[name="num_decimals"]').closest("tr").show())}).change(),a('input[name="woocommerce_calc_shipping"]').change(function(){a(this).is(":checked")?(a(':input[name="shipping_cost_domestic"]').closest("tr").show(),a(':input[name="shipping_cost_international"]').closest("tr").show()):(a(':input[name="shipping_cost_domestic"]').closest("tr").hide(),a(':input[name="shipping_cost_international"]').closest("tr").hide())}).change(),a('input[name="woocommerce_calc_taxes"]').change(function(){a(this).is(":checked")?(a(':input[name="woocommerce_prices_include_tax"], :input[name="woocommerce_import_tax_rates"]').closest("tr").show(),a("tr.tax-rates").show()):(a(':input[name="woocommerce_prices_include_tax"], :input[name="woocommerce_import_tax_rates"]').closest("tr").hide(),a("tr.tax-rates").hide())}).change(),a('input[name="woocommerce_import_tax_rates"]').change(function(){a(this).is(":checked")?a(".importing-tax-rates").show():a(".importing-tax-rates").hide()}).change(),a(".button-next").on("click",function(){return a(".wc-setup-content").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),!0})});

View File

@ -89,11 +89,6 @@ jQuery( function( $ ) {
} }
} else if ( locale['default'][ key ] ) { } else if ( locale['default'][ key ] ) {
if ( locale['default'][ key ].required === true ) {
if ( field.find( 'label abbr' ).size() === 0 ) {
field_is_required( field, true );
}
}
if ( 'state' !== key ) { if ( 'state' !== key ) {
if ( typeof locale['default'][ key ].hidden === 'undefined' || locale['default'][ key ].hidden === false ) { if ( typeof locale['default'][ key ].hidden === 'undefined' || locale['default'][ key ].hidden === false ) {
@ -103,7 +98,7 @@ jQuery( function( $ ) {
} }
} }
if ( 'postcode' === key ) { if ( 'postcode' === key || 'city' === key ) {
if ( locale['default'][ key ].label ) { if ( locale['default'][ key ].label ) {
field.find( 'label' ).html( locale['default'][ key ].label ); field.find( 'label' ).html( locale['default'][ key ].label );
} }
@ -112,6 +107,12 @@ jQuery( function( $ ) {
field.find( 'input' ).attr( 'placeholder', locale['default'][ key ].placeholder ); field.find( 'input' ).attr( 'placeholder', locale['default'][ key ].placeholder );
} }
} }
if ( locale['default'][ key ].required === true ) {
if ( field.find( 'label abbr' ).size() === 0 ) {
field_is_required( field, true );
}
}
} }
}); });

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]&&(d["default"][a].required===!0&&0===e.find("label abbr").size()&&b(e,!0),"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)))})})}); 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

@ -15,7 +15,6 @@ jQuery( function( $ ) {
$order_review: $( '#order_review' ), $order_review: $( '#order_review' ),
$checkout_form: $( 'form.checkout' ), $checkout_form: $( 'form.checkout' ),
init: function() { init: function() {
$( document.body ).bind( 'update_checkout', this.reset_update_checkout_timer );
$( document.body ).bind( 'update_checkout', this.update_checkout ); $( document.body ).bind( 'update_checkout', this.update_checkout );
$( document.body ).bind( 'init_checkout', this.init_checkout ); $( document.body ).bind( 'init_checkout', this.init_checkout );
@ -26,13 +25,13 @@ jQuery( function( $ ) {
this.$checkout_form.on( 'submit', this.submit ); this.$checkout_form.on( 'submit', this.submit );
// Inline validation // Inline validation
this.$checkout_form.on( 'blur input change', '.input-text, select', this.validate_field ); this.$checkout_form.on( 'blur change', '.input-text, select', this.validate_field );
// Inputs/selects which update totals // Inputs/selects which update totals
this.$checkout_form.on( 'input 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', '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 );
this.$checkout_form.on( 'change', '.address-field input.input-text, .update_totals_on_change input.input-text', this.maybe_input_changed ); this.$checkout_form.on( 'change', '.address-field input.input-text, .update_totals_on_change input.input-text', this.maybe_input_changed );
this.$checkout_form.on( 'input change', '.address-field select', this.input_changed ); this.$checkout_form.on( 'keydown', '.address-field input.input-text, .update_totals_on_change input.input-text', this.queue_update_checkout );
this.$checkout_form.on( 'input keydown', '.address-field input.input-text, .update_totals_on_change input.input-text', this.queue_update_checkout );
// Address fields // Address fields
this.$checkout_form.on( 'change', '#ship-to-different-address input', this.ship_to_different_address ); this.$checkout_form.on( 'change', '#ship-to-different-address input', this.ship_to_different_address );
@ -182,7 +181,7 @@ jQuery( function( $ ) {
shipping_methods[ $( this ).data( 'index' ) ] = $( this ).val(); shipping_methods[ $( this ).data( 'index' ) ] = $( this ).val();
} ); } );
var payment_method = $( '#order_review input[name=payment_method]:checked' ).val(), var payment_method = $( '#order_review' ).find( 'input[name=payment_method]:checked' ).val(),
country = $( '#billing_country' ).val(), country = $( '#billing_country' ).val(),
state = $( '#billing_state' ).val(), state = $( '#billing_state' ).val(),
postcode = $( 'input#billing_postcode' ).val(), postcode = $( 'input#billing_postcode' ).val(),
@ -196,7 +195,7 @@ jQuery( function( $ ) {
s_address, s_address,
s_address_2; s_address_2;
if ( $( '#ship-to-different-address input' ).is( ':checked' ) ) { if ( $( '#ship-to-different-address' ).find( 'input' ).is( ':checked' ) ) {
s_country = $( '#shipping_country' ).val(); s_country = $( '#shipping_country' ).val();
s_state = $( '#shipping_state' ).val(); s_state = $( '#shipping_state' ).val();
s_postcode = $( 'input#shipping_postcode' ).val(); s_postcode = $( 'input#shipping_postcode' ).val();
@ -302,7 +301,7 @@ jQuery( function( $ ) {
} }
// Trigger a handler to let gateways manipulate the checkout if needed // Trigger a handler to let gateways manipulate the checkout if needed
if ( $form.triggerHandler( 'checkout_place_order' ) !== false && $form.triggerHandler( 'checkout_place_order_' + $( '#order_review input[name=payment_method]:checked' ).val() ) !== false ) { if ( $form.triggerHandler( 'checkout_place_order' ) !== false && $form.triggerHandler( 'checkout_place_order_' + $( '#order_review' ).find( 'input[name=payment_method]:checked' ).val() ) !== false ) {
$form.addClass( 'processing' ); $form.addClass( 'processing' );

File diff suppressed because one or more lines are too long

View File

@ -40,13 +40,34 @@ jQuery( function( $ ) {
} }
}; };
if ( '1' !== wc_geolocation_params.is_checkout ) { if ( '1' !== wc_geolocation_params.is_checkout && '1' !== wc_geolocation_params.is_cart && '1' !== wc_geolocation_params.is_account_page ) {
$.ajax( $geolocate_customer ); $.ajax( $geolocate_customer );
// Support form elements
$( 'form' ).each( function() {
var $this = $( this );
var method = $this.attr( 'method' );
if ( method && 'get' === method.toLowerCase() ) {
$this.append( '<input type="hidden" name="v" value="' + wc_geolocation_params.hash + '" />' );
} else {
var href = $this.attr( 'action' );
if ( href ) {
if ( href.indexOf( '?' ) > 0 ) {
$this.attr( 'action', href + '&v=' + wc_geolocation_params.hash );
} else {
$this.attr( 'action', href + '?v=' + wc_geolocation_params.hash );
}
}
}
});
// Append hashes on load
$append_hashes();
} }
$( document.body ).on( 'added_to_cart', function() { $( document.body ).on( 'added_to_cart', function() {
$append_hashes(); $append_hashes();
}); });
$append_hashes();
}); });

View File

@ -1 +1 @@
jQuery(function(a){var b=window.location.toString(),c=function(){wc_geolocation_params.hash&&a('a[href^="'+wc_geolocation_params.home_url+'"]:not(a[href*="v="]), a[href^="/"]:not(a[href*="v="])').each(function(){var b=a(this),c=b.attr("href");c.indexOf("?")>0?b.attr("href",c+"&v="+wc_geolocation_params.hash):b.attr("href",c+"?v="+wc_geolocation_params.hash)})},d=function(a){b=b.indexOf("?v=")>0||b.indexOf("&v=")>0?b.replace(/v=[^&]+/,"v="+a):b.indexOf("?")>0?b+"&v="+a:b+"?v="+a,window.location=b},e={url:wc_geolocation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_customer_location"),type:"GET",success:function(a){a.success&&a.data.hash&&a.data.hash!==wc_geolocation_params.hash&&d(a.data.hash)}};"1"!==wc_geolocation_params.is_checkout&&a.ajax(e),a(document.body).on("added_to_cart",function(){c()}),c()}); jQuery(function(a){var b=window.location.toString(),c=function(){wc_geolocation_params.hash&&a('a[href^="'+wc_geolocation_params.home_url+'"]:not(a[href*="v="]), a[href^="/"]:not(a[href*="v="])').each(function(){var b=a(this),c=b.attr("href");c.indexOf("?")>0?b.attr("href",c+"&v="+wc_geolocation_params.hash):b.attr("href",c+"?v="+wc_geolocation_params.hash)})},d=function(a){b=b.indexOf("?v=")>0||b.indexOf("&v=")>0?b.replace(/v=[^&]+/,"v="+a):b.indexOf("?")>0?b+"&v="+a:b+"?v="+a,window.location=b},e={url:wc_geolocation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_customer_location"),type:"GET",success:function(a){a.success&&a.data.hash&&a.data.hash!==wc_geolocation_params.hash&&d(a.data.hash)}};"1"!==wc_geolocation_params.is_checkout&&"1"!==wc_geolocation_params.is_cart&&"1"!==wc_geolocation_params.is_account_page&&(a.ajax(e),a("form").each(function(){var b=a(this),c=b.attr("method");if(c&&"get"===c.toLowerCase())b.append('<input type="hidden" name="v" value="'+wc_geolocation_params.hash+'" />');else{var d=b.attr("action");d&&(d.indexOf("?")>0?b.attr("action",d+"&v="+wc_geolocation_params.hash):b.attr("action",d+"?v="+wc_geolocation_params.hash))}}),c()),a(document.body).on("added_to_cart",function(){c()})});

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,9 @@
# This file is distributed under the same license as the WooCommerce package. # This file is distributed under the same license as the WooCommerce package.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WooCommerce 2.4.3 Frontend\n" "Project-Id-Version: WooCommerce 2.4.6 Frontend\n"
"Report-Msgid-Bugs-To: https://github.com/woothemes/woocommerce/issues\n" "Report-Msgid-Bugs-To: https://github.com/woothemes/woocommerce/issues\n"
"POT-Creation-Date: 2015-08-12 18:49:49+00:00\n" "POT-Creation-Date: 2015-08-24 16:25:50+00:00\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@ -989,6 +989,10 @@ msgstr ""
msgid "Zimbabwe" msgid "Zimbabwe"
msgstr "" msgstr ""
#: i18n/locale-info.php:351
msgid "Consumption tax"
msgstr ""
#: i18n/states/AR.php:13 #: i18n/states/AR.php:13
msgid "Ciudad Aut&oacute;noma de Buenos Aires" msgid "Ciudad Aut&oacute;noma de Buenos Aires"
msgstr "" msgstr ""
@ -5082,7 +5086,7 @@ msgstr ""
#: includes/abstracts/abstract-wc-integration.php:29 #: includes/abstracts/abstract-wc-integration.php:29
#: includes/abstracts/abstract-wc-settings-api.php:77 #: includes/abstracts/abstract-wc-settings-api.php:77
#: includes/class-wc-install.php:688 includes/emails/class-wc-email.php:711 #: includes/class-wc-install.php:692 includes/emails/class-wc-email.php:711
msgid "Settings" msgid "Settings"
msgstr "" msgstr ""
@ -5098,8 +5102,8 @@ msgstr ""
#: includes/abstracts/abstract-wc-order.php:1762 #: includes/abstracts/abstract-wc-order.php:1762
#: includes/abstracts/abstract-wc-product.php:964 #: includes/abstracts/abstract-wc-product.php:964
#: includes/abstracts/abstract-wc-product.php:970 #: includes/abstracts/abstract-wc-product.php:970
#: includes/class-wc-cart.php:1538 includes/class-wc-product-variable.php:331 #: includes/class-wc-cart.php:1538 includes/class-wc-product-variable.php:335
#: includes/class-wc-product-variation.php:306 #: includes/class-wc-product-variation.php:307
msgid "Free!" msgid "Free!"
msgstr "" msgstr ""
@ -5120,35 +5124,41 @@ msgid "Fee"
msgstr "" msgstr ""
#: includes/abstracts/abstract-wc-order.php:1892 #: includes/abstracts/abstract-wc-order.php:1892
#: includes/shortcodes/class-wc-shortcode-checkout.php:141 #: includes/shortcodes/class-wc-shortcode-checkout.php:143
#: templates/checkout/thankyou.php:53 #: templates/checkout/thankyou.php:53
msgid "Payment Method:" msgid "Payment Method:"
msgstr "" msgstr ""
#: includes/abstracts/abstract-wc-order.php:1898 #: includes/abstracts/abstract-wc-order.php:1898
#: includes/shortcodes/class-wc-shortcode-checkout.php:136 #: includes/shortcodes/class-wc-shortcode-checkout.php:138
#: templates/checkout/thankyou.php:48 #: templates/checkout/thankyou.php:48
msgid "Total:" msgid "Total:"
msgstr "" msgstr ""
#: includes/abstracts/abstract-wc-order.php:2134 #: includes/abstracts/abstract-wc-order.php:2135
msgid "Download file%s" #: templates/emails/plain/email-order-items.php:49
msgid "Download %d"
msgstr ""
#: includes/abstracts/abstract-wc-order.php:2135
#: templates/emails/plain/email-order-items.php:51
msgid "Download"
msgstr "" msgstr ""
#. Plugin Name of the plugin/theme #. Plugin Name of the plugin/theme
msgid "WooCommerce" msgid "WooCommerce"
msgstr "" msgstr ""
#: includes/abstracts/abstract-wc-order.php:2219 #: includes/abstracts/abstract-wc-order.php:2222
msgid "Order status changed from %s to %s." msgid "Order status changed from %s to %s."
msgstr "" msgstr ""
#: includes/abstracts/abstract-wc-order.php:2477 #: includes/abstracts/abstract-wc-order.php:2480
msgid "Item #%s variation #%s stock reduced from %s to %s." msgid "Item #%s variation #%s stock reduced from %s to %s."
msgstr "" msgstr ""
#: includes/abstracts/abstract-wc-order.php:2479 #: includes/abstracts/abstract-wc-order.php:2482
#: includes/class-wc-ajax.php:1372 #: includes/class-wc-ajax.php:1415
msgid "Item #%s stock reduced from %s to %s." msgid "Item #%s stock reduced from %s to %s."
msgstr "" msgstr ""
@ -5175,7 +5185,7 @@ msgstr ""
#: includes/abstracts/abstract-wc-product.php:537 #: includes/abstracts/abstract-wc-product.php:537
#: includes/class-wc-product-simple.php:47 #: includes/class-wc-product-simple.php:47
#: includes/class-wc-product-variation.php:186 #: includes/class-wc-product-variation.php:187
msgid "Add to cart" msgid "Add to cart"
msgstr "" msgstr ""
@ -5186,40 +5196,40 @@ msgstr ""
#: includes/abstracts/abstract-wc-product.php:626 #: includes/abstracts/abstract-wc-product.php:626
#: includes/abstracts/abstract-wc-product.php:637 #: includes/abstracts/abstract-wc-product.php:637
#: includes/abstracts/abstract-wc-product.php:659 #: includes/abstracts/abstract-wc-product.php:659
#: includes/class-wc-ajax.php:780 includes/class-wc-ajax.php:2447 #: includes/class-wc-ajax.php:829 includes/class-wc-ajax.php:2492
#: includes/class-wc-product-variation.php:527 #: includes/class-wc-product-variation.php:526
#: includes/class-wc-product-variation.php:537 #: includes/class-wc-product-variation.php:536
#: includes/class-wc-product-variation.php:553 #: includes/class-wc-product-variation.php:552
msgid "In stock" msgid "In stock"
msgstr "" msgstr ""
#: includes/abstracts/abstract-wc-product.php:631 #: includes/abstracts/abstract-wc-product.php:631
#: includes/class-wc-product-variation.php:531 #: includes/class-wc-product-variation.php:530
msgid "Only %s left in stock" msgid "Only %s left in stock"
msgstr "" msgstr ""
#: includes/abstracts/abstract-wc-product.php:634 #: includes/abstracts/abstract-wc-product.php:634
#: includes/abstracts/abstract-wc-product.php:645 #: includes/abstracts/abstract-wc-product.php:645
#: includes/class-wc-product-variation.php:534 #: includes/class-wc-product-variation.php:533
#: includes/class-wc-product-variation.php:544 #: includes/class-wc-product-variation.php:543
msgid "(can be backordered)" msgid "(can be backordered)"
msgstr "" msgstr ""
#: includes/abstracts/abstract-wc-product.php:642 #: includes/abstracts/abstract-wc-product.php:642
#: includes/class-wc-product-variation.php:541 #: includes/class-wc-product-variation.php:540
msgid "%s in stock" msgid "%s in stock"
msgstr "" msgstr ""
#: includes/abstracts/abstract-wc-product.php:654 #: includes/abstracts/abstract-wc-product.php:654
#: includes/class-wc-product-variation.php:550 templates/cart/cart.php:82 #: includes/class-wc-product-variation.php:549 templates/cart/cart.php:82
msgid "Available on backorder" msgid "Available on backorder"
msgstr "" msgstr ""
#: includes/abstracts/abstract-wc-product.php:664 #: includes/abstracts/abstract-wc-product.php:664
#: includes/abstracts/abstract-wc-product.php:670 #: includes/abstracts/abstract-wc-product.php:670
#: includes/class-wc-ajax.php:781 includes/class-wc-ajax.php:2448 #: includes/class-wc-ajax.php:830 includes/class-wc-ajax.php:2493
#: includes/class-wc-product-variation.php:556 #: includes/class-wc-product-variation.php:555
#: includes/class-wc-product-variation.php:560 #: includes/class-wc-product-variation.php:559
msgid "Out of stock" msgid "Out of stock"
msgstr "" msgstr ""
@ -6047,108 +6057,108 @@ msgstr ""
msgid "Invalid product SKU" msgid "Invalid product SKU"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:193 #: includes/class-wc-ajax.php:201
msgid "Sorry there was a problem removing this coupon." msgid "Sorry there was a problem removing this coupon."
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:199 #: includes/class-wc-ajax.php:207
msgid "Coupon has been removed." msgid "Coupon has been removed."
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:250 #: includes/class-wc-ajax.php:258
msgid "Sorry, your session has expired." msgid "Sorry, your session has expired."
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:250 #: includes/class-wc-ajax.php:258
msgid "Return to homepage" msgid "Return to homepage"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:765 includes/class-wc-ajax.php:2430 #: includes/class-wc-ajax.php:812 includes/class-wc-ajax.php:2475
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:210 #: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:210
msgid "Standard" msgid "Standard"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:774 includes/class-wc-ajax.php:2440 #: includes/class-wc-ajax.php:822 includes/class-wc-ajax.php:2485
msgid "Do not allow" msgid "Do not allow"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:775 includes/class-wc-ajax.php:2441 #: includes/class-wc-ajax.php:823 includes/class-wc-ajax.php:2486
msgid "Allow, but notify customer" msgid "Allow, but notify customer"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:776 includes/class-wc-ajax.php:2442 #: includes/class-wc-ajax.php:824 includes/class-wc-ajax.php:2487
msgid "Allow" msgid "Allow"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:1073 #: includes/class-wc-ajax.php:1116
msgid "File %d" msgid "File %d"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:1383 #: includes/class-wc-ajax.php:1426
msgid "" msgid ""
"No products had their stock reduced - they may not have stock management " "No products had their stock reduced - they may not have stock management "
"enabled." "enabled."
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:1424 includes/class-wc-ajax.php:2235 #: includes/class-wc-ajax.php:1467 includes/class-wc-ajax.php:2278
msgid "Item #%s stock increased from %s to %s." msgid "Item #%s stock increased from %s to %s."
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:1434 #: includes/class-wc-ajax.php:1477
msgid "" msgid ""
"No products had their stock increased - they may not have stock management " "No products had their stock increased - they may not have stock management "
"enabled." "enabled."
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:1453 #: includes/class-wc-ajax.php:1496
#: includes/widgets/class-wc-widget-product-categories.php:52 #: includes/widgets/class-wc-widget-product-categories.php:52
#: templates/single-product-reviews.php:65 #: templates/single-product-reviews.php:65
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:1453 #: includes/class-wc-ajax.php:1496
msgid "Value" msgid "Value"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:1703 #: includes/class-wc-ajax.php:1746
msgid "Delete note" msgid "Delete note"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:2175 #: includes/class-wc-ajax.php:2218
msgid "Invalid refund amount" msgid "Invalid refund amount"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:2220 #: includes/class-wc-ajax.php:2263
msgid "Refund failed" msgid "Refund failed"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:2317 #: includes/class-wc-ajax.php:2360
msgid "Description is missing." msgid "Description is missing."
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:2320 #: includes/class-wc-ajax.php:2363
msgid "User is missing." msgid "User is missing."
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:2323 #: includes/class-wc-ajax.php:2366
msgid "Permissions is missing." msgid "Permissions is missing."
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:2352 #: includes/class-wc-ajax.php:2395
msgid "API Key updated successfully." msgid "API Key updated successfully."
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:2383 #: includes/class-wc-ajax.php:2426
msgid "" msgid ""
"API Key generated successfully. Make sure to copy your new API keys now. " "API Key generated successfully. Make sure to copy your new API keys now. "
"You won't be able to see it again!" "You won't be able to see it again!"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:2384 #: includes/class-wc-ajax.php:2427
msgid "Revoke Key" msgid "Revoke Key"
msgstr "" msgstr ""
#: includes/class-wc-ajax.php:2599 #: includes/class-wc-ajax.php:2643
msgid "Dismiss this notice." msgid "Dismiss this notice."
msgstr "" msgstr ""
@ -6258,27 +6268,27 @@ msgstr ""
msgid "Access Denied" msgid "Access Denied"
msgstr "" msgstr ""
#: includes/class-wc-breadcrumb.php:118 #: includes/class-wc-breadcrumb.php:119
msgid "Error 404" msgid "Error 404"
msgstr "" msgstr ""
#: includes/class-wc-breadcrumb.php:210 #: includes/class-wc-breadcrumb.php:211
msgid "Products tagged &ldquo;%s&rdquo;" msgid "Products tagged &ldquo;%s&rdquo;"
msgstr "" msgstr ""
#: includes/class-wc-breadcrumb.php:261 #: includes/class-wc-breadcrumb.php:262
msgid "Posts tagged &ldquo;%s&rdquo;" msgid "Posts tagged &ldquo;%s&rdquo;"
msgstr "" msgstr ""
#: includes/class-wc-breadcrumb.php:286 #: includes/class-wc-breadcrumb.php:304
msgid "Author: %s" msgid "Author: %s"
msgstr "" msgstr ""
#: includes/class-wc-breadcrumb.php:321 #: includes/class-wc-breadcrumb.php:339
msgid "Search results for &ldquo;%s&rdquo;" msgid "Search results for &ldquo;%s&rdquo;"
msgstr "" msgstr ""
#: includes/class-wc-breadcrumb.php:330 #: includes/class-wc-breadcrumb.php:348
msgid "Page %d" msgid "Page %d"
msgstr "" msgstr ""
@ -6650,7 +6660,7 @@ msgstr ""
#: includes/class-wc-download-handler.php:98 #: includes/class-wc-download-handler.php:98
#: includes/class-wc-form-handler.php:558 #: includes/class-wc-form-handler.php:558
#: includes/shortcodes/class-wc-shortcode-checkout.php:163 #: includes/shortcodes/class-wc-shortcode-checkout.php:165
#: includes/shortcodes/class-wc-shortcode-my-account.php:108 #: includes/shortcodes/class-wc-shortcode-my-account.php:108
msgid "Invalid order." msgid "Invalid order."
msgstr "" msgstr ""
@ -6821,61 +6831,57 @@ msgid ""
"assistance." "assistance."
msgstr "" msgstr ""
#: includes/class-wc-form-handler.php:588 #: includes/class-wc-form-handler.php:666
msgid "Sorry, this product is unavailable." msgid "Please choose the quantity of items you wish to add to your cart&hellip;"
msgstr "" msgstr ""
#: includes/class-wc-form-handler.php:635 #: includes/class-wc-form-handler.php:674
msgid "Please choose a product to add to your cart&hellip;"
msgstr ""
#: includes/class-wc-form-handler.php:727
msgid "%s is a required field" msgid "%s is a required field"
msgid_plural "%s are required fields" msgid_plural "%s are required fields"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: includes/class-wc-form-handler.php:638 #: includes/class-wc-form-handler.php:729
msgid "Please choose product options&hellip;" msgid "Please choose product options&hellip;"
msgstr "" msgstr ""
#: includes/class-wc-form-handler.php:683 #: includes/class-wc-form-handler.php:755
msgid "Please choose the quantity of items you wish to add to your cart&hellip;" #: includes/class-wc-form-handler.php:759
msgstr "" #: includes/class-wc-form-handler.php:763
#: includes/class-wc-form-handler.php:772
#: includes/class-wc-form-handler.php:690 #: includes/class-wc-form-handler.php:903
msgid "Please choose a product to add to your cart&hellip;"
msgstr ""
#: includes/class-wc-form-handler.php:754
#: includes/class-wc-form-handler.php:758
#: includes/class-wc-form-handler.php:762
#: includes/class-wc-form-handler.php:771
#: includes/class-wc-form-handler.php:902
msgid "Error" msgid "Error"
msgstr "" msgstr ""
#: includes/class-wc-form-handler.php:758 #: includes/class-wc-form-handler.php:759
msgid "Username is required." msgid "Username is required."
msgstr "" msgstr ""
#: includes/class-wc-form-handler.php:762 #: includes/class-wc-form-handler.php:763
msgid "Password is required." msgid "Password is required."
msgstr "" msgstr ""
#: includes/class-wc-form-handler.php:771 #: includes/class-wc-form-handler.php:772
msgid "A user could not be found with this email address." msgid "A user could not be found with this email address."
msgstr "" msgstr ""
#: includes/class-wc-form-handler.php:798 #: includes/class-wc-form-handler.php:799
msgid "You are now logged in as <strong>%s</strong>" msgid "You are now logged in as <strong>%s</strong>"
msgstr "" msgstr ""
#: includes/class-wc-form-handler.php:842 #: includes/class-wc-form-handler.php:843
msgid "Please enter your password." msgid "Please enter your password."
msgstr "" msgstr ""
#: includes/class-wc-form-handler.php:846 #: includes/class-wc-form-handler.php:847
msgid "Passwords do not match." msgid "Passwords do not match."
msgstr "" msgstr ""
#: includes/class-wc-form-handler.php:885 #: includes/class-wc-form-handler.php:886
msgid "Anti-spam field was filled in." msgid "Anti-spam field was filled in."
msgstr "" msgstr ""
@ -6914,34 +6920,58 @@ msgstr ""
msgid "Shop Manager" msgid "Shop Manager"
msgstr "" msgstr ""
#: includes/class-wc-install.php:688 #: includes/class-wc-install.php:692
msgid "View WooCommerce Settings" msgid "View WooCommerce Settings"
msgstr "" msgstr ""
#: includes/class-wc-install.php:704 #: includes/class-wc-install.php:708
msgid "View WooCommerce Documentation" msgid "View WooCommerce Documentation"
msgstr "" msgstr ""
#: includes/class-wc-install.php:704 #: includes/class-wc-install.php:708
msgid "Docs" msgid "Docs"
msgstr "" msgstr ""
#: includes/class-wc-install.php:705 #: includes/class-wc-install.php:709
msgid "View WooCommerce API Docs" msgid "View WooCommerce API Docs"
msgstr "" msgstr ""
#: includes/class-wc-install.php:705 #: includes/class-wc-install.php:709
msgid "API Docs" msgid "API Docs"
msgstr "" msgstr ""
#: includes/class-wc-install.php:706 #: includes/class-wc-install.php:710
msgid "Visit Premium Customer Support Forum" msgid "Visit Premium Customer Support Forum"
msgstr "" msgstr ""
#: includes/class-wc-install.php:706 #: includes/class-wc-install.php:710
msgid "Premium Support" msgid "Premium Support"
msgstr "" msgstr ""
#: includes/class-wc-language-pack-upgrader.php:254
#: includes/class-wc-language-pack-upgrader.php:257
#: includes/class-wc-language-pack-upgrader.php:260
msgid "Failed to install/update the translation:"
msgstr ""
#: includes/class-wc-language-pack-upgrader.php:254
msgid "Seems you don't have permission to do this!"
msgstr ""
#: includes/class-wc-language-pack-upgrader.php:257
msgid ""
"An authentication error occurred while updating the translation. Please try "
"again or configure your %sUpgrade Constants%s."
msgstr ""
#: includes/class-wc-language-pack-upgrader.php:260
msgid "Sorry but there is no translation available for your language =/"
msgstr ""
#: includes/class-wc-language-pack-upgrader.php:267
msgid "Translations installed/updated successfully!"
msgstr ""
#: includes/class-wc-order.php:40 includes/wc-cart-functions.php:246 #: includes/class-wc-order.php:40 includes/wc-cart-functions.php:246
msgid "(Includes %s)" msgid "(Includes %s)"
msgstr "" msgstr ""
@ -7398,7 +7428,7 @@ msgid "Buy product"
msgstr "" msgstr ""
#: includes/class-wc-product-simple.php:47 #: includes/class-wc-product-simple.php:47
#: includes/class-wc-product-variation.php:186 #: includes/class-wc-product-variation.php:187
msgid "Read More" msgid "Read More"
msgstr "" msgstr ""
@ -7406,13 +7436,13 @@ msgstr ""
msgid "Select options" msgid "Select options"
msgstr "" msgstr ""
#: includes/class-wc-product-variable.php:678 #: includes/class-wc-product-variable.php:693
msgid "" msgid ""
"This variable product has no active variations so cannot be published. " "This variable product has no active variations so cannot be published. "
"Changing status to draft." "Changing status to draft."
msgstr "" msgstr ""
#: includes/class-wc-product-variation.php:659 #: includes/class-wc-product-variation.php:658
msgid "%s &ndash; %s%s" msgid "%s &ndash; %s%s"
msgstr "" msgstr ""
@ -7469,7 +7499,7 @@ msgstr ""
#: includes/emails/class-wc-email-cancelled-order.php:110 #: includes/emails/class-wc-email-cancelled-order.php:110
#: includes/emails/class-wc-email-customer-completed-order.php:138 #: includes/emails/class-wc-email-customer-completed-order.php:138
#: includes/emails/class-wc-email-customer-refunded-order.php:171 #: includes/emails/class-wc-email-customer-refunded-order.php:174
#: includes/emails/class-wc-email-new-order.php:117 #: includes/emails/class-wc-email-new-order.php:117
#: includes/emails/class-wc-email.php:475 #: includes/emails/class-wc-email.php:475
#: includes/gateways/bacs/class-wc-gateway-bacs.php:74 #: includes/gateways/bacs/class-wc-gateway-bacs.php:74
@ -7483,7 +7513,7 @@ msgstr ""
#: includes/emails/class-wc-email-cancelled-order.php:112 #: includes/emails/class-wc-email-cancelled-order.php:112
#: includes/emails/class-wc-email-customer-completed-order.php:140 #: includes/emails/class-wc-email-customer-completed-order.php:140
#: includes/emails/class-wc-email-customer-refunded-order.php:173 #: includes/emails/class-wc-email-customer-refunded-order.php:176
#: includes/emails/class-wc-email-new-order.php:119 #: includes/emails/class-wc-email-new-order.php:119
#: includes/emails/class-wc-email.php:477 #: includes/emails/class-wc-email.php:477
msgid "Enable this email notification" msgid "Enable this email notification"
@ -7531,7 +7561,7 @@ msgstr ""
#: includes/emails/class-wc-email-cancelled-order.php:137 #: includes/emails/class-wc-email-cancelled-order.php:137
#: includes/emails/class-wc-email-customer-completed-order.php:172 #: includes/emails/class-wc-email-customer-completed-order.php:172
#: includes/emails/class-wc-email-customer-refunded-order.php:205 #: includes/emails/class-wc-email-customer-refunded-order.php:208
#: includes/emails/class-wc-email-new-order.php:144 #: includes/emails/class-wc-email-new-order.php:144
#: includes/emails/class-wc-email.php:495 #: includes/emails/class-wc-email.php:495
msgid "Email type" msgid "Email type"
@ -7540,7 +7570,7 @@ msgstr ""
#: includes/emails/class-wc-email-cancelled-order.php:139 #: includes/emails/class-wc-email-cancelled-order.php:139
#: includes/emails/class-wc-email-customer-completed-order.php:174 #: includes/emails/class-wc-email-customer-completed-order.php:174
#: includes/emails/class-wc-email-customer-invoice.php:175 #: includes/emails/class-wc-email-customer-invoice.php:175
#: includes/emails/class-wc-email-customer-refunded-order.php:207 #: includes/emails/class-wc-email-customer-refunded-order.php:210
#: includes/emails/class-wc-email-new-order.php:146 #: includes/emails/class-wc-email-new-order.php:146
#: includes/emails/class-wc-email.php:497 #: includes/emails/class-wc-email.php:497
msgid "Choose which format of email to send." msgid "Choose which format of email to send."
@ -7580,10 +7610,10 @@ msgstr ""
#: includes/emails/class-wc-email-customer-invoice.php:154 #: includes/emails/class-wc-email-customer-invoice.php:154
#: includes/emails/class-wc-email-customer-invoice.php:161 #: includes/emails/class-wc-email-customer-invoice.php:161
#: includes/emails/class-wc-email-customer-invoice.php:168 #: includes/emails/class-wc-email-customer-invoice.php:168
#: includes/emails/class-wc-email-customer-refunded-order.php:179 #: includes/emails/class-wc-email-customer-refunded-order.php:182
#: includes/emails/class-wc-email-customer-refunded-order.php:186 #: includes/emails/class-wc-email-customer-refunded-order.php:189
#: includes/emails/class-wc-email-customer-refunded-order.php:193 #: includes/emails/class-wc-email-customer-refunded-order.php:196
#: includes/emails/class-wc-email-customer-refunded-order.php:200 #: includes/emails/class-wc-email-customer-refunded-order.php:203
#: includes/emails/class-wc-email.php:483 #: includes/emails/class-wc-email.php:483
#: includes/emails/class-wc-email.php:490 #: includes/emails/class-wc-email.php:490
msgid "Defaults to <code>%s</code>" msgid "Defaults to <code>%s</code>"
@ -7640,21 +7670,21 @@ msgstr ""
msgid "Email Type" msgid "Email Type"
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-new-account.php:32 #: includes/emails/class-wc-email-customer-new-account.php:33
msgid "New account" msgid "New account"
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-new-account.php:33 #: includes/emails/class-wc-email-customer-new-account.php:34
msgid "" msgid ""
"Customer \"new account\" emails are sent to the customer when a customer " "Customer \"new account\" emails are sent to the customer when a customer "
"signs up via checkout or account pages." "signs up via checkout or account pages."
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-new-account.php:38 #: includes/emails/class-wc-email-customer-new-account.php:39
msgid "Your account on {site_title}" msgid "Your account on {site_title}"
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-new-account.php:39 #: includes/emails/class-wc-email-customer-new-account.php:40
msgid "Welcome to {site_title}" msgid "Welcome to {site_title}"
msgstr "" msgstr ""
@ -7692,55 +7722,55 @@ msgstr ""
msgid "Your {site_title} order receipt from {order_date}" msgid "Your {site_title} order receipt from {order_date}"
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-refunded-order.php:37 #: includes/emails/class-wc-email-customer-refunded-order.php:40
msgid "Your {site_title} order from {order_date} has been partially refunded" msgid "Your {site_title} order from {order_date} has been partially refunded"
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-refunded-order.php:38 #: includes/emails/class-wc-email-customer-refunded-order.php:41
msgid "Your {site_title} order from {order_date} has been refunded" msgid "Your {site_title} order from {order_date} has been refunded"
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-refunded-order.php:40 #: includes/emails/class-wc-email-customer-refunded-order.php:43
msgid "Your order has been fully refunded" msgid "Your order has been fully refunded"
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-refunded-order.php:41 #: includes/emails/class-wc-email-customer-refunded-order.php:44
msgid "Your order has been partially refunded" msgid "Your order has been partially refunded"
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-refunded-order.php:45 #: includes/emails/class-wc-email-customer-refunded-order.php:48
msgid "Partially Refunded order" msgid "Partially Refunded order"
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-refunded-order.php:46 #: includes/emails/class-wc-email-customer-refunded-order.php:49
msgid "" msgid ""
"Order partially refunded emails are sent to customers when their orders are " "Order partially refunded emails are sent to customers when their orders are "
"partially refunded." "partially refunded."
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-refunded-order.php:54 #: includes/emails/class-wc-email-customer-refunded-order.php:57
msgid "Refunded order" msgid "Refunded order"
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-refunded-order.php:55 #: includes/emails/class-wc-email-customer-refunded-order.php:58
msgid "" msgid ""
"Order refunded emails are sent to customers when their orders are marked " "Order refunded emails are sent to customers when their orders are marked "
"refunded." "refunded."
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-refunded-order.php:177 #: includes/emails/class-wc-email-customer-refunded-order.php:180
msgid "Full Refund Subject" msgid "Full Refund Subject"
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-refunded-order.php:184 #: includes/emails/class-wc-email-customer-refunded-order.php:187
msgid "Partial Refund Subject" msgid "Partial Refund Subject"
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-refunded-order.php:191 #: includes/emails/class-wc-email-customer-refunded-order.php:194
msgid "Full Refund Email Heading" msgid "Full Refund Email Heading"
msgstr "" msgstr ""
#: includes/emails/class-wc-email-customer-refunded-order.php:198 #: includes/emails/class-wc-email-customer-refunded-order.php:201
msgid "Partial Refund Email Heading" msgid "Partial Refund Email Heading"
msgstr "" msgstr ""
@ -8092,7 +8122,7 @@ msgstr ""
msgid "Accept COD if the order is virtual" msgid "Accept COD if the order is virtual"
msgstr "" msgstr ""
#: includes/gateways/cod/class-wc-gateway-cod.php:206 #: includes/gateways/cod/class-wc-gateway-cod.php:203
msgid "Payment to be made upon delivery." msgid "Payment to be made upon delivery."
msgstr "" msgstr ""
@ -8640,14 +8670,14 @@ msgid "Flat Rate Shipping lets you charge a fixed rate for shipping."
msgstr "" msgstr ""
#: includes/shipping/flat-rate/includes/settings-flat-rate.php:7 #: includes/shipping/flat-rate/includes/settings-flat-rate.php:7
msgid "Enter a cost (excl. tax) or sum, e.g. <code>10 * [qty]</code>." msgid "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>."
msgstr "" msgstr ""
#: includes/shipping/flat-rate/includes/settings-flat-rate.php:7 #: includes/shipping/flat-rate/includes/settings-flat-rate.php:7
msgid "" msgid ""
"Supports the following placeholders: <code>[qty]</code> = number of items, " "Supports the following placeholders: <code>[qty]</code> = number of items, "
"<code>[cost]</code> = cost of items, <code>[fee percent=\"10\" " "<code>[cost]</code> = cost of items, <code>[fee percent=\"10\" "
"min=\"20\"]</code> = Percentage based fee." "min_fee=\"20\"]</code> = Percentage based fee."
msgstr "" msgstr ""
#: includes/shipping/flat-rate/includes/settings-flat-rate.php:16 #: includes/shipping/flat-rate/includes/settings-flat-rate.php:16
@ -8877,8 +8907,7 @@ msgid "Allowed Zip/Post Codes"
msgstr "" msgstr ""
#: includes/shipping/local-delivery/class-wc-shipping-local-delivery.php:125 #: includes/shipping/local-delivery/class-wc-shipping-local-delivery.php:125
#: includes/shipping/local-pickup/class-wc-shipping-local-pickup.php:81 msgid "What zip/post codes are available for local delivery?"
msgid "What zip/post codes are available for local pickup?"
msgstr "" msgstr ""
#: includes/shipping/local-delivery/class-wc-shipping-local-delivery.php:127 #: includes/shipping/local-delivery/class-wc-shipping-local-delivery.php:127
@ -8904,43 +8933,47 @@ msgstr ""
msgid "Enable local pickup" msgid "Enable local pickup"
msgstr "" msgstr ""
#: includes/shipping/local-pickup/class-wc-shipping-local-pickup.php:81
msgid "What zip/post codes are available for local pickup?"
msgstr ""
#: includes/shortcodes/class-wc-shortcode-cart.php:42 #: includes/shortcodes/class-wc-shortcode-cart.php:42
msgid "Shipping costs updated." msgid "Shipping costs updated."
msgstr "" msgstr ""
#: includes/shortcodes/class-wc-shortcode-checkout.php:88 #: includes/shortcodes/class-wc-shortcode-checkout.php:90
msgid "Invalid order. If you have an account please log in and try again." msgid "Invalid order. If you have an account please log in and try again."
msgstr "" msgstr ""
#: includes/shortcodes/class-wc-shortcode-checkout.php:88 #: includes/shortcodes/class-wc-shortcode-checkout.php:90
#: includes/shortcodes/class-wc-shortcode-my-account.php:108 #: includes/shortcodes/class-wc-shortcode-my-account.php:108
#: templates/checkout/thankyou.php:30 #: templates/checkout/thankyou.php:30
msgid "My Account" msgid "My Account"
msgstr "" msgstr ""
#: includes/shortcodes/class-wc-shortcode-checkout.php:107 #: includes/shortcodes/class-wc-shortcode-checkout.php:109
#: includes/shortcodes/class-wc-shortcode-checkout.php:155 #: includes/shortcodes/class-wc-shortcode-checkout.php:157
msgid "" msgid ""
"This order&rsquo;s status is &ldquo;%s&rdquo;&mdash;it cannot be paid for. " "This order&rsquo;s status is &ldquo;%s&rdquo;&mdash;it cannot be paid for. "
"Please contact us if you need assistance." "Please contact us if you need assistance."
msgstr "" msgstr ""
#: includes/shortcodes/class-wc-shortcode-checkout.php:111 #: includes/shortcodes/class-wc-shortcode-checkout.php:113
#: includes/shortcodes/class-wc-shortcode-checkout.php:159 #: includes/shortcodes/class-wc-shortcode-checkout.php:161
msgid "Sorry, this order is invalid and cannot be paid for." msgid "Sorry, this order is invalid and cannot be paid for."
msgstr "" msgstr ""
#: includes/shortcodes/class-wc-shortcode-checkout.php:128 #: includes/shortcodes/class-wc-shortcode-checkout.php:130
#: templates/checkout/thankyou.php:40 #: templates/checkout/thankyou.php:40
msgid "Order Number:" msgid "Order Number:"
msgstr "" msgstr ""
#: includes/shortcodes/class-wc-shortcode-checkout.php:132 #: includes/shortcodes/class-wc-shortcode-checkout.php:134
#: templates/checkout/thankyou.php:44 #: templates/checkout/thankyou.php:44
msgid "Date:" msgid "Date:"
msgstr "" msgstr ""
#: includes/shortcodes/class-wc-shortcode-checkout.php:227 #: includes/shortcodes/class-wc-shortcode-checkout.php:231
msgid "" msgid ""
"The order totals have been updated. Please confirm your order by pressing " "The order totals have been updated. Please confirm your order by pressing "
"the Place Order button at the bottom of the page." "the Place Order button at the bottom of the page."
@ -9282,19 +9315,19 @@ msgstr ""
msgid "Refund &ndash; %s" msgid "Refund &ndash; %s"
msgstr "" msgstr ""
#: includes/wc-product-functions.php:510 #: includes/wc-product-functions.php:508
msgid "Simple product" msgid "Simple product"
msgstr "" msgstr ""
#: includes/wc-product-functions.php:511 #: includes/wc-product-functions.php:509
msgid "Grouped product" msgid "Grouped product"
msgstr "" msgstr ""
#: includes/wc-product-functions.php:512 #: includes/wc-product-functions.php:510
msgid "External/Affiliate product" msgid "External/Affiliate product"
msgstr "" msgstr ""
#: includes/wc-product-functions.php:513 #: includes/wc-product-functions.php:511
msgid "Variable product" msgid "Variable product"
msgstr "" msgstr ""
@ -10128,16 +10161,6 @@ msgstr ""
msgid "Shipping address" msgid "Shipping address"
msgstr "" msgstr ""
#: templates/emails/email-order-items.php:54
#: templates/emails/plain/email-order-items.php:49
msgid "Download %d"
msgstr ""
#: templates/emails/email-order-items.php:56
#: templates/emails/plain/email-order-items.php:51
msgid "Download"
msgstr ""
#: templates/emails/plain/admin-cancelled-order.php:21 #: templates/emails/plain/admin-cancelled-order.php:21
#: templates/emails/plain/admin-new-order.php:22 #: templates/emails/plain/admin-new-order.php:22
#: templates/emails/plain/customer-completed-order.php:22 #: templates/emails/plain/customer-completed-order.php:22
@ -10862,8 +10885,8 @@ msgid "Failed"
msgstr "" msgstr ""
#: includes/class-wc-product-grouped.php:193 #: includes/class-wc-product-grouped.php:193
#: includes/class-wc-product-variable.php:322 #: includes/class-wc-product-variable.php:326
#: includes/class-wc-product-variable.php:328 #: includes/class-wc-product-variable.php:332
msgctxt "Price range: from-to" msgctxt "Price range: from-to"
msgid "%1$s&ndash;%2$s" msgid "%1$s&ndash;%2$s"
msgstr "" msgstr ""
@ -10875,7 +10898,7 @@ msgstr ""
#: includes/wc-cart-functions.php:100 #: includes/wc-cart-functions.php:100
msgctxt "Item name in quotes" msgctxt "Item name in quotes"
msgid "&ldquo;%s&ldquo;" msgid "&ldquo;%s&rdquo;"
msgstr "" msgstr ""
#: includes/wc-core-functions.php:78 includes/wc-order-functions.php:629 #: includes/wc-core-functions.php:78 includes/wc-order-functions.php:629

View File

@ -20,6 +20,26 @@ return array(
) )
) )
), ),
'BD' => array(
'currency_code' => 'BDT',
'currency_pos' => 'left',
'thousand_sep' => ',',
'decimal_sep' => '.',
'num_decimals' => 2,
'weight_unit' => 'kg',
'dimension_unit' => 'in',
'tax_rates' => array(
'' => array(
array(
'country' => 'BD',
'state' => '',
'rate' => '15.0000',
'name' => 'VAT',
'shipping' => true
)
)
)
),
'BE' => array( 'BE' => array(
'currency_code' => 'EUR', 'currency_code' => 'EUR',
'currency_pos' => 'left', 'currency_pos' => 'left',
@ -274,6 +294,26 @@ return array(
) )
) )
), ),
'HU' => array(
'currency_code' => 'HUF',
'currency_pos' => 'right_space',
'thousand_sep' => ' ',
'decimal_sep' => ',',
'num_decimals' => 0,
'weight_unit' => 'kg',
'dimension_unit' => 'cm',
'tax_rates' => array(
'' => array(
array(
'country' => 'HU',
'state' => '',
'rate' => '27.0000',
'name' => 'ÁFA',
'shipping' => true
)
)
)
),
'IT' => array( 'IT' => array(
'currency_code' => 'EUR', 'currency_code' => 'EUR',
'currency_pos' => 'right', 'currency_pos' => 'right',
@ -294,6 +334,26 @@ return array(
) )
) )
), ),
'JP' => array(
'currency_code' => 'JPY',
'currency_pos' => 'left',
'thousand_sep' => ',',
'decimal_sep' => '.',
'num_decimals' => 0,
'weight_unit' => 'kg',
'dimension_unit' => 'cm',
'tax_rates' => array(
'' => array(
array(
'country' => 'JP',
'state' => '',
'rate' => '8.0000',
'name' => __( 'Consumption tax', 'woocommerce' ),
'shipping' => true
)
)
)
),
'NL' => array( 'NL' => array(
'currency_code' => 'EUR', 'currency_code' => 'EUR',
'currency_pos' => 'left', 'currency_pos' => 'left',
@ -334,6 +394,26 @@ return array(
) )
) )
), ),
'NP' => array(
'currency_code' => 'NPR',
'currency_pos' => 'left_space',
'thousand_sep' => ',',
'decimal_sep' => '.',
'num_decimals' => 2,
'weight_unit' => 'kg',
'dimension_unit' => 'cm',
'tax_rates' => array(
'' => array(
array(
'country' => 'NP',
'state' => '',
'rate' => '13.0000',
'name' => 'VAT',
'shipping' => true
)
)
)
),
'PL' => array( 'PL' => array(
'currency_code' => 'PLN', 'currency_code' => 'PLN',
'currency_pos' => 'right', 'currency_pos' => 'right',

View File

@ -1732,15 +1732,13 @@ abstract class WC_Abstract_Order {
if ( $this->order_shipping != 0 ) { if ( $this->order_shipping != 0 ) {
$tax_text = '';
if ( $tax_display == 'excl' ) { if ( $tax_display == 'excl' ) {
// Show shipping excluding tax // Show shipping excluding tax
$shipping = wc_price( $this->order_shipping, array('currency' => $this->get_order_currency()) ); $shipping = wc_price( $this->order_shipping, array('currency' => $this->get_order_currency()) );
if ( $this->order_shipping_tax != 0 && $this->prices_include_tax ) { if ( $this->order_shipping_tax != 0 && $this->prices_include_tax ) {
$tax_text = WC()->countries->ex_tax_or_vat() . ' '; $shipping .= apply_filters( 'woocommerce_order_shipping_to_display_tax_label', '&nbsp;<small class="tax_label">' . WC()->countries->ex_tax_or_vat() . '</small>', $this, $tax_display );
} }
} else { } else {
@ -1749,12 +1747,12 @@ abstract class WC_Abstract_Order {
$shipping = wc_price( $this->order_shipping + $this->order_shipping_tax, array('currency' => $this->get_order_currency()) ); $shipping = wc_price( $this->order_shipping + $this->order_shipping_tax, array('currency' => $this->get_order_currency()) );
if ( $this->order_shipping_tax != 0 && ! $this->prices_include_tax ) { if ( $this->order_shipping_tax != 0 && ! $this->prices_include_tax ) {
$tax_text = WC()->countries->inc_tax_or_vat() . ' '; $shipping .= apply_filters( 'woocommerce_order_shipping_to_display_tax_label', '&nbsp;<small class="tax_label">' . WC()->countries->inc_tax_or_vat() . '</small>', $this, $tax_display );
} }
} }
$shipping .= sprintf( __( '&nbsp;<small>%svia %s</small>', 'woocommerce' ), $tax_text, $this->get_shipping_method() ); $shipping .= apply_filters( 'woocommerce_order_shipping_to_display_shipped_via', '&nbsp;<small class="shipped_via">' . sprintf( __( 'via %s', 'woocommerce' ), $this->get_shipping_method() ) . '</small>', $this );
} elseif ( $this->get_shipping_method() ) { } elseif ( $this->get_shipping_method() ) {
$shipping = $this->get_shipping_method(); $shipping = $this->get_shipping_method();
@ -1830,14 +1828,14 @@ abstract class WC_Abstract_Order {
if ( $this->get_total_discount() > 0 ) { if ( $this->get_total_discount() > 0 ) {
$total_rows['discount'] = array( $total_rows['discount'] = array(
'label' => __( 'Discount:', 'woocommerce' ), 'label' => __( 'Discount:', 'woocommerce' ),
'value' => '-' . $this->get_discount_to_display() 'value' => '-' . $this->get_discount_to_display( $tax_display )
); );
} }
if ( $this->get_shipping_method() ) { if ( $this->get_shipping_method() ) {
$total_rows['shipping'] = array( $total_rows['shipping'] = array(
'label' => __( 'Shipping:', 'woocommerce' ), 'label' => __( 'Shipping:', 'woocommerce' ),
'value' => $this->get_shipping_to_display() 'value' => $this->get_shipping_to_display( $tax_display )
); );
} }
@ -2131,7 +2129,9 @@ abstract class WC_Abstract_Order {
$links = array(); $links = array();
foreach ( $download_files as $download_id => $file ) { foreach ( $download_files as $download_id => $file ) {
$links[] = '<small><a href="' . esc_url( $file['download_url'] ) . '">' . sprintf( __( 'Download file%s', 'woocommerce' ), ( count( $download_files ) > 1 ? ' ' . ( $i++ ) . ': ' : ': ' ) ) . esc_html( $file['name'] ) . '</a></small>'; $i++;
$prefix = count( $download_files ) > 1 ? sprintf( __( 'Download %d', 'woocommerce' ), $i ) : __( 'Download', 'woocommerce' );
$links[] = '<small class="download-url">' . $prefix . ': <a href="' . esc_url( $file['download_url'] ) . '" target="_blank">' . esc_html( $file['name'] ) . '</a></small>' . "\n";
} }
echo '<br/>' . implode( '<br/>', $links ); echo '<br/>' . implode( '<br/>', $links );
@ -2199,8 +2199,9 @@ abstract class WC_Abstract_Order {
* *
* @param string $new_status Status to change the order to. No internal wc- prefix is required. * @param string $new_status Status to change the order to. No internal wc- prefix is required.
* @param string $note (default: '') Optional note to add * @param string $note (default: '') Optional note to add
* @param bool $manual is this a manual order status change?
*/ */
public function update_status( $new_status, $note = '' ) { public function update_status( $new_status, $note = '', $manual = false ) {
if ( ! $this->id ) { if ( ! $this->id ) {
return; return;
} }
@ -2216,7 +2217,7 @@ abstract class WC_Abstract_Order {
wp_update_post( array( 'ID' => $this->id, 'post_status' => 'wc-' . $new_status ) ); wp_update_post( array( 'ID' => $this->id, 'post_status' => 'wc-' . $new_status ) );
$this->post_status = 'wc-' . $new_status; $this->post_status = 'wc-' . $new_status;
$this->add_order_note( trim( $note . ' ' . sprintf( __( 'Order status changed from %s to %s.', 'woocommerce' ), wc_get_order_status_name( $old_status ), wc_get_order_status_name( $new_status ) ) ) ); $this->add_order_note( trim( $note . ' ' . sprintf( __( 'Order status changed from %s to %s.', 'woocommerce' ), wc_get_order_status_name( $old_status ), wc_get_order_status_name( $new_status ) ) ), 0, $manual );
// Status was changed // Status was changed
do_action( 'woocommerce_order_status_' . $new_status, $this->id ); do_action( 'woocommerce_order_status_' . $new_status, $this->id );
@ -2285,7 +2286,6 @@ abstract class WC_Abstract_Order {
* @param $transaction_id string Optional transaction id to store in post meta * @param $transaction_id string Optional transaction id to store in post meta
*/ */
public function payment_complete( $transaction_id = '' ) { public function payment_complete( $transaction_id = '' ) {
do_action( 'woocommerce_pre_payment_complete', $this->id ); do_action( 'woocommerce_pre_payment_complete', $this->id );
if ( null !== WC()->session ) { if ( null !== WC()->session ) {
@ -2295,57 +2295,43 @@ abstract class WC_Abstract_Order {
$valid_order_statuses = apply_filters( 'woocommerce_valid_order_statuses_for_payment_complete', array( 'on-hold', 'pending', 'failed', 'cancelled' ), $this ); $valid_order_statuses = apply_filters( 'woocommerce_valid_order_statuses_for_payment_complete', array( 'on-hold', 'pending', 'failed', 'cancelled' ), $this );
if ( $this->id && $this->has_status( $valid_order_statuses ) ) { if ( $this->id && $this->has_status( $valid_order_statuses ) ) {
$order_needs_processing = false;
$order_needs_processing = true;
if ( sizeof( $this->get_items() ) > 0 ) { if ( sizeof( $this->get_items() ) > 0 ) {
foreach ( $this->get_items() as $item ) { foreach ( $this->get_items() as $item ) {
if ( $_product = $this->get_product_from_item( $item ) ) {
$virtual_downloadable_item = $_product->is_downloadable() && $_product->is_virtual();
if ( $item['product_id'] > 0 ) { if ( apply_filters( 'woocommerce_order_item_needs_processing', ! $virtual_downloadable_item, $_product, $this->id ) ) {
$order_needs_processing = true;
$_product = $this->get_product_from_item( $item ); break;
if ( false !== $_product && ! apply_filters( 'woocommerce_order_item_needs_processing', ! ( $_product->is_downloadable() && $_product->is_virtual() ), $_product, $this->id ) ) {
$order_needs_processing = false;
continue;
} }
} }
$order_needs_processing = true;
break;
} }
} }
$new_order_status = $order_needs_processing ? 'processing' : 'completed'; $this->update_status( apply_filters( 'woocommerce_payment_complete_order_status', $order_needs_processing ? 'processing' : 'completed', $this->id ) );
$new_order_status = apply_filters( 'woocommerce_payment_complete_order_status', $new_order_status, $this->id ); add_post_meta( $this->id, '_paid_date', current_time( 'mysql' ), true );
$this->update_status( $new_order_status );
add_post_meta( $this->id, '_paid_date', current_time('mysql'), true );
if ( ! empty( $transaction_id ) ) { if ( ! empty( $transaction_id ) ) {
add_post_meta( $this->id, '_transaction_id', $transaction_id, true ); add_post_meta( $this->id, '_transaction_id', $transaction_id, true );
} }
$this_order = array( wp_update_post( array(
'ID' => $this->id, 'ID' => $this->id,
'post_date' => current_time( 'mysql', 0 ), 'post_date' => current_time( 'mysql', 0 ),
'post_date_gmt' => current_time( 'mysql', 1 ) 'post_date_gmt' => current_time( 'mysql', 1 )
); ) );
wp_update_post( $this_order );
if ( apply_filters( 'woocommerce_payment_complete_reduce_order_stock', true, $this->id ) ) { // Payment is complete so reduce stock levels
$this->reduce_order_stock(); // Payment is complete so reduce stock levels if ( apply_filters( 'woocommerce_payment_complete_reduce_order_stock', ! get_post_meta( $this->id, '_order_stock_reduced', true ), $this->id ) ) {
$this->reduce_order_stock();
} }
do_action( 'woocommerce_payment_complete', $this->id ); do_action( 'woocommerce_payment_complete', $this->id );
} else { } else {
do_action( 'woocommerce_payment_complete_order_status_' . $this->get_status(), $this->id ); do_action( 'woocommerce_payment_complete_order_status_' . $this->get_status(), $this->id );
} }
} }
@ -2354,8 +2340,7 @@ abstract class WC_Abstract_Order {
* Record sales * Record sales
*/ */
public function record_product_sales() { public function record_product_sales() {
if ( 'yes' === get_post_meta( $this->id, '_recorded_sales', true ) ) {
if ( 'yes' == get_post_meta( $this->id, '_recorded_sales', true ) ) {
return; return;
} }
@ -2400,7 +2385,6 @@ abstract class WC_Abstract_Order {
* Increase applied coupon counts * Increase applied coupon counts
*/ */
public function increase_coupon_usage_counts() { public function increase_coupon_usage_counts() {
if ( 'yes' == get_post_meta( $this->id, '_recorded_coupon_usage_counts', true ) ) { if ( 'yes' == get_post_meta( $this->id, '_recorded_coupon_usage_counts', true ) ) {
return; return;
} }
@ -2483,6 +2467,8 @@ abstract class WC_Abstract_Order {
} }
} }
add_post_meta( $this->id, '_order_stock_reduced', '1', true );
do_action( 'woocommerce_reduce_order_stock', $this ); do_action( 'woocommerce_reduce_order_stock', $this );
} }
} }
@ -2512,6 +2498,8 @@ abstract class WC_Abstract_Order {
if ( ! $notification_sent && 'yes' == get_option( 'woocommerce_notify_low_stock' ) && get_option( 'woocommerce_notify_low_stock_amount' ) >= $new_stock ) { if ( ! $notification_sent && 'yes' == get_option( 'woocommerce_notify_low_stock' ) && get_option( 'woocommerce_notify_low_stock_amount' ) >= $new_stock ) {
do_action( 'woocommerce_low_stock', $product ); do_action( 'woocommerce_low_stock', $product );
} }
do_action( 'woocommerce_after_send_stock_notifications', $product, $new_stock, $qty_ordered );
} }

View File

@ -126,7 +126,7 @@ abstract class WC_Payment_Gateway extends WC_Settings_API {
/** /**
* Get the order total in checkout and pay_for_order. * Get the order total in checkout and pay_for_order.
* *
* @return bool * @return float
*/ */
protected function get_order_total() { protected function get_order_total() {

View File

@ -177,7 +177,7 @@ class WC_Product {
* @return int * @return int
*/ */
public function get_stock_quantity() { public function get_stock_quantity() {
return $this->managing_stock() ? wc_stock_amount( $this->stock ) : ''; return apply_filters( 'woocommerce_get_stock_quantity', $this->managing_stock() ? wc_stock_amount( $this->stock ) : '', $this );
} }
/** /**
@ -827,7 +827,12 @@ class WC_Product {
$base_tax_amount = array_sum( $base_taxes ); $base_tax_amount = array_sum( $base_taxes );
$price = round( $price * $qty - $base_tax_amount, wc_get_price_decimals() ); $price = round( $price * $qty - $base_tax_amount, wc_get_price_decimals() );
} elseif ( $tax_rates !== $base_tax_rates ) { /**
* The woocommerce_adjust_non_base_location_prices filter can stop base taxes being taken off when dealing with out of base locations.
* e.g. If a product costs 10 including tax, all users will pay 10 regardless of location and taxes.
* This feature is experimental @since 2.4.7 and may change in the future. Use at your risk.
*/
} elseif ( $tax_rates !== $base_tax_rates && apply_filters( 'woocommerce_adjust_non_base_location_prices', true ) ) {
$base_taxes = WC_Tax::calc_tax( $price * $qty, $base_tax_rates, true ); $base_taxes = WC_Tax::calc_tax( $price * $qty, $base_tax_rates, true );
$modded_taxes = WC_Tax::calc_tax( ( $price * $qty ) - array_sum( $base_taxes ), $tax_rates, false ); $modded_taxes = WC_Tax::calc_tax( ( $price * $qty ) - array_sum( $base_taxes ), $tax_rates, false );
@ -861,7 +866,7 @@ class WC_Product {
$price = $this->get_price(); $price = $this->get_price();
} }
if ( $this->is_taxable() && get_option( 'woocommerce_prices_include_tax' ) === 'yes' ) { if ( $this->is_taxable() && 'yes' === get_option( 'woocommerce_prices_include_tax' ) ) {
$tax_rates = WC_Tax::get_base_tax_rates( $this->tax_class ); $tax_rates = WC_Tax::get_base_tax_rates( $this->tax_class );
$taxes = WC_Tax::calc_tax( $price * $qty, $tax_rates, true ); $taxes = WC_Tax::calc_tax( $price * $qty, $tax_rates, true );
$price = WC_Tax::round( $price * $qty - array_sum( $taxes ) ); $price = WC_Tax::round( $price * $qty - array_sum( $taxes ) );
@ -967,7 +972,7 @@ class WC_Product {
} else { } else {
$price = __( 'Free!', 'woocommerce' ); $price = '<span class="amount">' . __( 'Free!', 'woocommerce' ) . '</span>';
$price = apply_filters( 'woocommerce_free_price_html', $price, $this ); $price = apply_filters( 'woocommerce_free_price_html', $price, $this );

View File

@ -73,51 +73,41 @@ abstract class WC_Shipping_Method extends WC_Settings_API {
* @param array $args (default: array()) * @param array $args (default: array())
*/ */
public function add_rate( $args = array() ) { public function add_rate( $args = array() ) {
$defaults = array( $args = wp_parse_args( $args, array(
'id' => '', // ID for the rate 'id' => '', // ID for the rate
'label' => '', // Label for the rate 'label' => '', // Label for the rate
'cost' => '0', // Amount or array of costs (per item shipping) 'cost' => '0', // Amount or array of costs (per item shipping)
'taxes' => '', // Pass taxes, nothing to have it calculated for you, or 'false' to calc no tax 'taxes' => '', // Pass taxes, nothing to have it calculated for you, or 'false' to calc no tax
'calc_tax' => 'per_order' // Calc tax per_order or per_item. Per item needs an array of costs 'calc_tax' => 'per_order' // Calc tax per_order or per_item. Per item needs an array of costs
); ) );
$args = wp_parse_args( $args, $defaults );
extract( $args );
// Id and label are required // Id and label are required
if ( ! $id || ! $label ) { if ( ! $args['id'] || ! $args['label'] ) {
return; return;
} }
// Handle cost // Handle cost
$total_cost = is_array( $cost ) ? array_sum( $cost ) : $cost; $total_cost = is_array( $args['cost'] ) ? array_sum( $args['cost'] ) : $args['cost'];
$taxes = $args['taxes'];
// Taxes - if not an array and not set to false, calc tax based on cost and passed calc_tax variable // Taxes - if not an array and not set to false, calc tax based on cost and passed calc_tax variable
// This saves shipping methods having to do complex tax calculations // This saves shipping methods having to do complex tax calculations
if ( ! is_array( $taxes ) && $taxes !== false && $total_cost > 0 && $this->is_taxable() ) { if ( ! is_array( $taxes ) && $taxes !== false && $total_cost > 0 && $this->is_taxable() ) {
$taxes = array(); $taxes = array();
switch ( $calc_tax ) { switch ( $args['calc_tax'] ) {
case "per_item" : case "per_item" :
// If we have an array of costs we can look up each items tax class and add tax accordingly // If we have an array of costs we can look up each items tax class and add tax accordingly
if ( is_array( $cost ) ) { if ( is_array( $args['cost'] ) ) {
$cart = WC()->cart->get_cart(); $cart = WC()->cart->get_cart();
foreach ( $cost as $cost_key => $amount ) { foreach ( $args['cost'] as $cost_key => $amount ) {
if ( ! isset( $cart[ $cost_key ] ) ) { if ( ! isset( $cart[ $cost_key ] ) ) {
continue; continue;
} }
$_product = $cart[ $cost_key ]['data']; $item_taxes = WC_Tax::calc_shipping_tax( $amount, WC_Tax::get_shipping_tax_rates( $cart[ $cost_key ]['data']->get_tax_class() ) );
$rates = WC_Tax::get_shipping_tax_rates( $_product->get_tax_class() );
$item_taxes = WC_Tax::calc_shipping_tax( $amount, $rates );
// Sum the item taxes // Sum the item taxes
foreach ( array_keys( $taxes + $item_taxes ) as $key ) { foreach ( array_keys( $taxes + $item_taxes ) as $key ) {
@ -126,10 +116,8 @@ abstract class WC_Shipping_Method extends WC_Settings_API {
} }
// Add any cost for the order - order costs are in the key 'order' // Add any cost for the order - order costs are in the key 'order'
if ( isset( $cost['order'] ) ) { if ( isset( $args['cost']['order'] ) ) {
$item_taxes = WC_Tax::calc_shipping_tax( $args['cost']['order'], WC_Tax::get_shipping_tax_rates() );
$rates = WC_Tax::get_shipping_tax_rates();
$item_taxes = WC_Tax::calc_shipping_tax( $cost['order'], $rates );
// Sum the item taxes // Sum the item taxes
foreach ( array_keys( $taxes + $item_taxes ) as $key ) { foreach ( array_keys( $taxes + $item_taxes ) as $key ) {
@ -137,19 +125,14 @@ abstract class WC_Shipping_Method extends WC_Settings_API {
} }
} }
} }
break; break;
default : default :
$taxes = WC_Tax::calc_shipping_tax( $total_cost, WC_Tax::get_shipping_tax_rates() );
$rates = WC_Tax::get_shipping_tax_rates();
$taxes = WC_Tax::calc_shipping_tax( $total_cost, $rates );
break; break;
} }
} }
$this->rates[] = new WC_Shipping_Rate( $id, $label, $total_cost, $taxes, $this->id ); $this->rates[] = new WC_Shipping_Rate( $args['id'], $args['label'], $total_cost, $taxes, $this->id );
} }
/** /**

View File

@ -52,7 +52,7 @@ class WC_Admin_API_Keys_Table_List extends WP_List_Table {
* @return string * @return string
*/ */
public function column_cb( $key ) { public function column_cb( $key ) {
return sprintf( '<input type="checkbox" name="%1$s[]" value="%2$s" />', $this->_args['singular'], $key['key_id'] ); return sprintf( '<input type="checkbox" name="key[]" value="%1$s" />', $key['key_id'] );
} }
/** /**

View File

@ -34,27 +34,35 @@ class WC_Admin_Assets {
public function admin_styles() { public function admin_styles() {
global $wp_scripts; global $wp_scripts;
// Sitewide menu CSS $screen = get_current_screen();
wp_enqueue_style( 'woocommerce_admin_menu_styles', WC()->plugin_url() . '/assets/css/menu.css', array(), WC_VERSION ); $jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
$screen = get_current_screen(); // 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' );
if ( in_array( $screen->id, wc_get_screen_ids() ) ) { 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'; $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 // 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( 'woocommerce_admin_styles' );
wp_enqueue_style( 'jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version ); wp_enqueue_style( 'jquery-ui-style' );
wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_style( 'wp-color-picker' );
} }
if ( in_array( $screen->id, array( 'dashboard' ) ) ) { 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' ) ) ) { 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' );
} }
/** /**
@ -84,13 +92,18 @@ 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( '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-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( '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( 'accounting', WC()->plugin_url() . '/assets/js/accounting/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( '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' ), 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( '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( '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( '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( '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 );
// Chosen is @deprecated (2.3) in favour of select2, but is registered for backwards compat // 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 ); wp_register_script( 'ajax-chosen', WC()->plugin_url() . '/assets/js/chosen/ajax-chosen.jquery' . $suffix . '.js', array( 'jquery', 'chosen' ), WC_VERSION );
@ -153,14 +166,18 @@ class WC_Admin_Assets {
// Products // Products
if ( in_array( $screen->id, array( 'edit-product' ) ) ) { 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 // Meta boxes
if ( in_array( $screen->id, array( 'product', 'edit-product' ) ) ) { if ( in_array( $screen->id, array( 'product', 'edit-product' ) ) ) {
wp_enqueue_media(); 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_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_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-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( $params = array(
'post_id' => isset( $post->ID ) ? $post->ID : '', 'post_id' => isset( $post->ID ) ? $post->ID : '',
@ -190,14 +207,17 @@ class WC_Admin_Assets {
'i18n_edited_variations' => esc_js( __( 'Save changes before changing page?', 'woocommerce' ) ), 'i18n_edited_variations' => esc_js( __( 'Save changes before changing page?', 'woocommerce' ) ),
'i18n_variation_count_single' => esc_js( __( '%qty% variation', 'woocommerce' ) ), 'i18n_variation_count_single' => esc_js( __( '%qty% variation', 'woocommerce' ) ),
'i18n_variation_count_plural' => esc_js( __( '%qty% variations', 'woocommerce' ) ), 'i18n_variation_count_plural' => esc_js( __( '%qty% variations', 'woocommerce' ) ),
'variations_per_page' => absint( apply_filters( 'woocommerce_admin_meta_boxes_variations_per_page', 10 ) ) 'variations_per_page' => absint( apply_filters( 'woocommerce_admin_meta_boxes_variations_per_page', 15 ) )
); );
wp_localize_script( 'wc-admin-variation-meta-boxes', 'woocommerce_admin_meta_boxes_variations', $params ); 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' ) ) ) { 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_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_enqueue_script( 'wc-admin-order-meta-boxes-modal', WC()->plugin_url() . '/assets/js/admin/order-backbone-modal' . $suffix . '.js', array( 'underscore', 'backbone', 'wc-admin-order-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( $params = array(
'countries' => json_encode( array_merge( WC()->countries->get_allowed_country_states(), WC()->countries->get_shipping_country_states() ) ), 'countries' => json_encode( array_merge( WC()->countries->get_allowed_country_states(), WC()->countries->get_shipping_country_states() ) ),
@ -207,7 +227,8 @@ class WC_Admin_Assets {
wp_localize_script( 'wc-admin-order-meta-boxes', 'woocommerce_admin_meta_boxes_order', $params ); 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' ) ) ) { 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' ) ) ) ) { if ( in_array( str_replace( 'edit-', '', $screen->id ), array_merge( array( 'shop_coupon', 'product' ), wc_get_order_types( 'order-meta-boxes' ) ) ) ) {
$params = array( $params = array(
@ -284,22 +305,26 @@ class WC_Admin_Assets {
// Product sorting - only when sorting by menu order on the products page // 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' ) { 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 // 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' ) ) ) ) { 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_register_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( 'wc-reports' );
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' );
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-resize' );
wp_enqueue_script( 'flot-stack', WC()->plugin_url() . '/assets/js/admin/jquery.flot.stack' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); wp_enqueue_script( 'flot-time' );
wp_enqueue_script( 'flot-pie' );
wp_enqueue_script( 'flot-stack' );
} }
// API settings // API settings
if ( $wc_screen_id . '_page_wc-settings' === $screen->id && isset( $_GET['section'] ) && 'keys' == $_GET['section'] ) { 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( wp_localize_script(
'wc-api-keys', 'wc-api-keys',
'woocommerce_admin_api_keys', 'woocommerce_admin_api_keys',
@ -316,7 +341,8 @@ class WC_Admin_Assets {
} }
if ( in_array( $screen->id, array( 'user-edit', 'profile' ) ) ) { 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( wp_localize_script(
'wc-users', 'wc-users',
'wc_users_params', 'wc_users_params',

View File

@ -164,7 +164,7 @@ class WC_Admin_Help {
'title' => __( 'WooCommerce 101', 'woocommerce' ), 'title' => __( 'WooCommerce 101', 'woocommerce' ),
'content' => 'content' =>
'<h2><a href="http://docs.woothemes.com/document/woocommerce-101-video-series/?utm_source=WooCommerce&utm_medium=Wizard&utm_content=Videos&utm_campaign=Onboarding">' . __( 'WooCommerce 101', 'woocommerce' ) . '</a> &ndash; ' . esc_html( $video_map[ $video_key ]['title'] ) . '</h2>' . '<h2><a href="http://docs.woothemes.com/document/woocommerce-101-video-series/?utm_source=WooCommerce&utm_medium=Wizard&utm_content=Videos&utm_campaign=Onboarding">' . __( 'WooCommerce 101', 'woocommerce' ) . '</a> &ndash; ' . esc_html( $video_map[ $video_key ]['title'] ) . '</h2>' .
'<iframe class="wistia_embed" name="wistia_embed" src="' . esc_url( $video_map[ $video_key ]['url'] ) . '" allowtransparency="true" frameborder="0" scrolling="no" width="480" height="298"></iframe>' '<iframe src="' . esc_url( $video_map[ $video_key ]['url'] ) . '" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width="480" height="298"></iframe>'
) ); ) );
} }

View File

@ -81,6 +81,7 @@ class WC_Admin_Post_Types {
add_filter( 'enter_title_here', array( $this, 'enter_title_here' ), 1, 2 ); add_filter( 'enter_title_here', array( $this, 'enter_title_here' ), 1, 2 );
add_action( 'edit_form_after_title', array( $this, 'edit_form_after_title' ) ); add_action( 'edit_form_after_title', array( $this, 'edit_form_after_title' ) );
add_filter( 'media_view_strings', array( $this, 'change_insert_into_post' ) ); add_filter( 'media_view_strings', array( $this, 'change_insert_into_post' ) );
add_filter( 'default_hidden_meta_boxes', array( $this, 'hidden_meta_boxes' ), 10, 2 );
add_action( 'post_submitbox_misc_actions', array( $this, 'product_data_visibility' ) ); add_action( 'post_submitbox_misc_actions', array( $this, 'product_data_visibility' ) );
// Uploads // Uploads
@ -99,6 +100,12 @@ class WC_Admin_Post_Types {
// Disable DFW feature pointer // Disable DFW feature pointer
add_action( 'admin_footer', array( $this, '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 );
}
} }
/** /**
@ -260,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_status'] = '<span class="status_head tips" data-tip="' . esc_attr__( 'Status', 'woocommerce' ) . '">' . esc_attr__( 'Status', 'woocommerce' ) . '</span>';
$columns['order_title'] = __( 'Order', 'woocommerce' ); $columns['order_title'] = __( 'Order', 'woocommerce' );
$columns['order_items'] = __( 'Purchased', 'woocommerce' ); $columns['order_items'] = __( 'Purchased', 'woocommerce' );
$columns['billing_address'] = __( 'Billing', 'woocommerce' );
$columns['shipping_address'] = __( 'Ship to', '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['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>'; $columns['order_notes'] = '<span class="order-notes_head tips" data-tip="' . esc_attr__( 'Order Notes', 'woocommerce' ) . '">' . esc_attr__( 'Order Notes', 'woocommerce' ) . '</span>';
@ -657,6 +665,19 @@ class WC_Admin_Post_Types {
} else echo '&ndash;'; } else echo '&ndash;';
break; 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' : case 'shipping_address' :
if ( $address = $the_order->get_formatted_shipping_address() ) { if ( $address = $the_order->get_formatted_shipping_address() ) {
@ -699,11 +720,7 @@ class WC_Admin_Post_Types {
break; break;
case 'order_total' : case 'order_total' :
if ( $the_order->get_total_refunded() > 0 ) { echo $the_order->get_formatted_order_total();
echo '<del>' . strip_tags( $the_order->get_formatted_order_total() ) . '</del> <ins>' . wc_price( $the_order->get_total() - $the_order->get_total_refunded(), array( 'currency' => $the_order->get_order_currency() ) ) . '</ins>';
} else {
echo esc_html( strip_tags( $the_order->get_formatted_order_total() ) );
}
if ( $the_order->payment_method_title ) { if ( $the_order->payment_method_title ) {
echo '<small class="meta">' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->payment_method_title ) . '</small>'; echo '<small class="meta">' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->payment_method_title ) . '</small>';
@ -711,18 +728,6 @@ class WC_Admin_Post_Types {
break; break;
case 'order_title' : 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;
}
echo '<div class="tips" data-tip="' . wc_sanitize_tooltip( implode( "<br/>", $customer_tip ) ) . '">';
if ( $the_order->user_id ) { if ( $the_order->user_id ) {
$user_info = get_userdata( $the_order->user_id ); $user_info = get_userdata( $the_order->user_id );
} }
@ -753,7 +758,7 @@ class WC_Admin_Post_Types {
echo '<small class="meta email"><a href="' . esc_url( 'mailto:' . $the_order->billing_email ) . '">' . esc_html( $the_order->billing_email ) . '</a></small>'; echo '<small class="meta email"><a href="' . esc_url( 'mailto:' . $the_order->billing_email ) . '">' . esc_html( $the_order->billing_email ) . '</a></small>';
} }
echo '</div>'; echo '<button type="button" class="toggle-row"><span class="screen-reader-text">' . __( 'Show more details', 'woocommerce' ) . '</span></button>';
break; break;
case 'order_actions' : case 'order_actions' :
@ -1446,7 +1451,7 @@ class WC_Admin_Post_Types {
foreach ( $post_ids as $post_id ) { foreach ( $post_ids as $post_id ) {
$order = wc_get_order( $post_id ); $order = wc_get_order( $post_id );
$order->update_status( $new_status, __( 'Order status changed by bulk edit:', 'woocommerce' ) ); $order->update_status( $new_status, __( 'Order status changed by bulk edit:', 'woocommerce' ), true );
do_action( 'woocommerce_order_edit_status', $post_id, $new_status ); do_action( 'woocommerce_order_edit_status', $post_id, $new_status );
$changed++; $changed++;
} }
@ -2036,7 +2041,6 @@ class WC_Admin_Post_Types {
/** /**
* Change title boxes in admin. * Change title boxes in admin.
*
* @param string $text * @param string $text
* @param object $post * @param object $post
* @return string * @return string
@ -2055,11 +2059,10 @@ class WC_Admin_Post_Types {
} }
/** /**
* Print coupon description textarea field * Print coupon description textarea field.
*
* @param WP_Post $post * @param WP_Post $post
*/ */
public function edit_form_after_title( $post ) { public function edit_form_after_title( $post ) {
if ( 'shop_coupon' === $post->post_type ) { 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 esc_textarea( $post->post_excerpt ); ?></textarea>
@ -2069,8 +2072,7 @@ class WC_Admin_Post_Types {
/** /**
* Change label for insert buttons. * Change label for insert buttons.
* * @param array $strings
* @param array $strings
* @return array * @return array
*/ */
public function change_insert_into_post( $strings ) { public function change_insert_into_post( $strings ) {
@ -2086,6 +2088,20 @@ class WC_Admin_Post_Types {
return $strings; return $strings;
} }
/**
* Hidden default Meta-Boxes.
* @param array $hidden
* @param object $screen
* @return array
*/
public function hidden_meta_boxes( $hidden, $screen ) {
if ( 'product' === $screen->post_type && 'post' === $screen->base ) {
$hidden = array_merge( $hidden, array( 'postcustom' ) );
}
return $hidden;
}
/** /**
* Output product visibility options. * Output product visibility options.
*/ */
@ -2123,7 +2139,7 @@ class WC_Admin_Post_Types {
<input type="hidden" name="current_featured" id="current_featured" value="<?php echo esc_attr( $current_featured ); ?>" /> <input type="hidden" name="current_featured" id="current_featured" value="<?php echo esc_attr( $current_featured ); ?>" />
<?php <?php
echo '<p>' . __( 'Define the loops this product should be visible in. The product will still be accessible directly.', 'woocommerce' ) . '</p>'; echo '<p>' . __( 'Choose where this product should be displayed in your catalog. The product will always be accessible directly.', 'woocommerce' ) . '</p>';
foreach ( $visibility_options as $name => $label ) { foreach ( $visibility_options as $name => $label ) {
echo '<input type="radio" name="_visibility" id="_visibility_' . esc_attr( $name ) . '" value="' . esc_attr( $name ) . '" ' . checked( $current_visibility, $name, false ) . ' data-label="' . esc_attr( $label ) . '" /> <label for="_visibility_' . esc_attr( $name ) . '" class="selectit">' . esc_html( $label ) . '</label><br />'; echo '<input type="radio" name="_visibility" id="_visibility_' . esc_attr( $name ) . '" value="' . esc_attr( $name ) . '" ' . checked( $current_visibility, $name, false ) . ' data-label="' . esc_attr( $label ) . '" /> <label for="_visibility_' . esc_attr( $name ) . '" class="selectit">' . esc_html( $label ) . '</label><br />';
@ -2205,7 +2221,7 @@ class WC_Admin_Post_Types {
foreach ( $existing_permissions as $existing_permission ) { foreach ( $existing_permissions as $existing_permission ) {
$order = wc_get_order( $existing_permission->order_id ); $order = wc_get_order( $existing_permission->order_id );
if ( $order->id ) { if ( ! empty( $order->id ) ) {
// Remove permissions // Remove permissions
if ( ! empty( $removed_download_ids ) ) { if ( ! empty( $removed_download_ids ) ) {
foreach ( $removed_download_ids as $download_id ) { foreach ( $removed_download_ids as $download_id ) {
@ -2221,7 +2237,7 @@ class WC_Admin_Post_Types {
if ( apply_filters( 'woocommerce_process_product_file_download_paths_grant_access_to_new_file', true, $download_id, $product_id, $order ) ) { if ( apply_filters( 'woocommerce_process_product_file_download_paths_grant_access_to_new_file', true, $download_id, $product_id, $order ) ) {
// grant permission if it doesn't already exist // grant permission if it doesn't already exist
if ( ! $wpdb->get_var( $wpdb->prepare( "SELECT 1 FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions WHERE order_id = %d AND product_id = %d AND download_id = %s", $order->id, $product_id, $download_id ) ) ) { if ( ! $wpdb->get_var( $wpdb->prepare( "SELECT 1=1 FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions WHERE order_id = %d AND product_id = %d AND download_id = %s", $order->id, $product_id, $download_id ) ) ) {
wc_downloadable_file_permission( $download_id, $product_id, $order ); wc_downloadable_file_permission( $download_id, $product_id, $order );
} }
} }

View File

@ -690,6 +690,7 @@ class WC_Admin_Settings {
$value = array_filter( array_map( 'wc_clean', (array) $raw_value ) ); $value = array_filter( array_map( 'wc_clean', (array) $raw_value ) );
break; break;
case 'image_width' : case 'image_width' :
$value = array();
if ( isset( $raw_value['width'] ) ) { if ( isset( $raw_value['width'] ) ) {
$value['width'] = wc_clean( $raw_value['width'] ); $value['width'] = wc_clean( $raw_value['width'] );
$value['height'] = wc_clean( $raw_value['height'] ); $value['height'] = wc_clean( $raw_value['height'] );
@ -767,7 +768,7 @@ class WC_Admin_Settings {
public static function check_download_folder_protection() { public static function check_download_folder_protection() {
$upload_dir = wp_upload_dir(); $upload_dir = wp_upload_dir();
$downloads_url = $upload_dir['basedir'] . '/woocommerce_uploads'; $downloads_url = $upload_dir['basedir'] . '/woocommerce_uploads';
$download_method = get_option('woocommerce_file_download_method'); $download_method = get_option( 'woocommerce_file_download_method' );
if ( 'redirect' == $download_method ) { if ( 'redirect' == $download_method ) {

View File

@ -26,10 +26,8 @@ class WC_Admin_Setup_Wizard {
/** @var array Tweets user can optionally send after install */ /** @var array Tweets user can optionally send after install */
private $tweets = array( private $tweets = array(
'WooCommerce kickstarts online stores. It\'s free and has been downloaded over 6 million times.', 'Someone give me woo-t, I just set up a new store with #WordPress and @WooCommerce!',
'Building an online store? WooCommerce is the leading #eCommerce plugin for WordPress (and it\'s free).', 'Someone give me high five, I just set up a new store with #WordPress and @WooCommerce!'
'WooCommerce is a free #eCommerce plugin for #WordPress for selling #allthethings online, beautifully.',
'Ready to ship your idea? WooCommerce is the fastest growing #eCommerce plugin for WordPress on the web'
); );
/** /**
@ -91,6 +89,7 @@ class WC_Admin_Setup_Wizard {
$this->step = isset( $_GET['step'] ) ? sanitize_key( $_GET['step'] ) : current( array_keys( $this->steps ) ); $this->step = isset( $_GET['step'] ) ? sanitize_key( $_GET['step'] ) : current( array_keys( $this->steps ) );
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
wp_register_script( 'jquery-blockui', WC()->plugin_url() . '/assets/js/jquery-blockui/jquery.blockUI' . $suffix . '.js', array( 'jquery' ), '2.70', true );
wp_register_script( 'select2', WC()->plugin_url() . '/assets/js/select2/select2' . $suffix . '.js', array( 'jquery' ), '3.5.2' ); wp_register_script( 'select2', WC()->plugin_url() . '/assets/js/select2/select2' . $suffix . '.js', array( 'jquery' ), '3.5.2' );
wp_register_script( 'wc-enhanced-select', WC()->plugin_url() . '/assets/js/admin/wc-enhanced-select' . $suffix . '.js', array( 'jquery', 'select2' ), WC_VERSION ); wp_register_script( 'wc-enhanced-select', WC()->plugin_url() . '/assets/js/admin/wc-enhanced-select' . $suffix . '.js', array( 'jquery', 'select2' ), WC_VERSION );
wp_localize_script( 'wc-enhanced-select', 'wc_enhanced_select_params', array( wp_localize_script( 'wc-enhanced-select', 'wc_enhanced_select_params', array(
@ -113,7 +112,7 @@ class WC_Admin_Setup_Wizard {
wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION ); wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION );
wp_enqueue_style( 'wc-setup', WC()->plugin_url() . '/assets/css/wc-setup.css', array( 'dashicons', 'install' ), WC_VERSION ); wp_enqueue_style( 'wc-setup', WC()->plugin_url() . '/assets/css/wc-setup.css', array( 'dashicons', 'install' ), WC_VERSION );
wp_register_script( 'wc-setup', WC()->plugin_url() . '/assets/js/admin/wc-setup.min.js', array( 'jquery', 'wc-enhanced-select' ), WC_VERSION ); wp_register_script( 'wc-setup', WC()->plugin_url() . '/assets/js/admin/wc-setup.min.js', array( 'jquery', 'wc-enhanced-select', 'jquery-blockui' ), WC_VERSION );
wp_localize_script( 'wc-setup', 'wc_setup_params', array( wp_localize_script( 'wc-setup', 'wc_setup_params', array(
'locale_info' => json_encode( include( WC()->plugin_path() . '/i18n/locale-info.php' ) ) 'locale_info' => json_encode( include( WC()->plugin_path() . '/i18n/locale-info.php' ) )
) ); ) );
@ -132,7 +131,7 @@ class WC_Admin_Setup_Wizard {
public function get_next_step_link() { public function get_next_step_link() {
$keys = array_keys( $this->steps ); $keys = array_keys( $this->steps );
return add_query_arg( 'step', $keys[ array_search( $this->step, array_keys( $this->steps ) ) + 1 ] ); return add_query_arg( 'step', $keys[ array_search( $this->step, array_keys( $this->steps ) ) + 1 ], remove_query_arg( 'translation_updated' ) );
} }
/** /**
@ -147,7 +146,8 @@ class WC_Admin_Setup_Wizard {
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php _e( 'WooCommerce &rsaquo; Setup Wizard', 'woocommerce' ); ?></title> <title><?php _e( 'WooCommerce &rsaquo; Setup Wizard', 'woocommerce' ); ?></title>
<?php wp_print_scripts( 'wc-setup' ); ?> <?php wp_print_scripts( 'wc-setup' ); ?>
<?php do_action( 'admin_print_styles' ); ?> <?php do_action( 'admin_print_styles' ); ?>
<?php do_action( 'admin_head' ); ?>
</head> </head>
<body class="wc-setup wp-core-ui"> <body class="wc-setup wp-core-ui">
<h1 id="wc-logo"><a href="http://woothemes.com/woocommerce"><img src="<?php echo WC()->plugin_url(); ?>/assets/images/woocommerce_logo.png" alt="WooCommerce" /></a></h1> <h1 id="wc-logo"><a href="http://woothemes.com/woocommerce"><img src="<?php echo WC()->plugin_url(); ?>/assets/images/woocommerce_logo.png" alt="WooCommerce" /></a></h1>
@ -201,13 +201,27 @@ class WC_Admin_Setup_Wizard {
* Introduction step * Introduction step
*/ */
public function wc_setup_introduction() { 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> <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( '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><?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"> <p class="wc-setup-actions step">
<a href="<?php echo esc_url( $this->get_next_step_link() ); ?>" class="button-primary button button-large"><?php _e( 'Let\'s Go!', 'woocommerce' ); ?></a> <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( admin_url( 'plugins.php' ) ); ?>" class="button button-large"><?php _e( 'Not right now', '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>
</p> </p>
<?php <?php
} }
@ -254,8 +268,8 @@ class WC_Admin_Setup_Wizard {
<p><?php printf( __( 'Once created, these pages can be managed from your admin dashboard on the %sPages screen%s. You can control which pages are shown on your website via %sAppearance > Menus%s.', 'woocommerce' ), '<a href="' . esc_url( admin_url( 'edit.php?post_type=page' ) ) . '" target="_blank">', '</a>', '<a href="' . esc_url( admin_url( 'nav-menus.php' ) ) . '" target="_blank">', '</a>' ); ?></p> <p><?php printf( __( 'Once created, these pages can be managed from your admin dashboard on the %sPages screen%s. You can control which pages are shown on your website via %sAppearance > Menus%s.', 'woocommerce' ), '<a href="' . esc_url( admin_url( 'edit.php?post_type=page' ) ) . '" target="_blank">', '</a>', '<a href="' . esc_url( admin_url( 'nav-menus.php' ) ) . '" target="_blank">', '</a>' ); ?></p>
<p class="wc-setup-actions step"> <p class="wc-setup-actions step">
<input type="submit" class="button-primary button button-large" value="<?php esc_attr_e( 'Continue', 'woocommerce' ); ?>" name="save_step" /> <input type="submit" class="button-primary button button-large button-next" value="<?php esc_attr_e( 'Continue', 'woocommerce' ); ?>" name="save_step" />
<a href="<?php echo esc_url( $this->get_next_step_link() ); ?>" class="button button-large"><?php _e( 'Skip this step', 'woocommerce' ); ?></a> <a href="<?php echo esc_url( $this->get_next_step_link() ); ?>" class="button button-large button-next"><?php _e( 'Skip this step', 'woocommerce' ); ?></a>
<?php wp_nonce_field( 'wc-setup' ); ?> <?php wp_nonce_field( 'wc-setup' ); ?>
</p> </p>
</form> </form>
@ -269,7 +283,7 @@ class WC_Admin_Setup_Wizard {
check_admin_referer( 'wc-setup' ); check_admin_referer( 'wc-setup' );
WC_Install::create_pages(); WC_Install::create_pages();
wp_redirect( $this->get_next_step_link() ); wp_redirect( esc_url_raw( $this->get_next_step_link() ) );
exit; exit;
} }
@ -285,8 +299,8 @@ class WC_Admin_Setup_Wizard {
// Defaults // Defaults
$currency = get_option( 'woocommerce_currency', 'GBP' ); $currency = get_option( 'woocommerce_currency', 'GBP' );
$currency_pos = get_option( 'woocommerce_currency_pos', 'left' ); $currency_pos = get_option( 'woocommerce_currency_pos', 'left' );
$decimal_sep = get_option( 'woocommerce_decimal_sep', '.' ); $decimal_sep = get_option( 'woocommerce_price_decimal_sep', '.' );
$thousand_sep = get_option( 'woocommerce_thousand_sep', ',' ); $thousand_sep = get_option( 'woocommerce_price_thousand_sep', ',' );
$dimension_unit = get_option( 'woocommerce_dimension_unit', 'cm' ); $dimension_unit = get_option( 'woocommerce_dimension_unit', 'cm' );
$weight_unit = get_option( 'woocommerce_weight_unit', 'kg' ); $weight_unit = get_option( 'woocommerce_weight_unit', 'kg' );
?> ?>
@ -363,8 +377,8 @@ class WC_Admin_Setup_Wizard {
</tr> </tr>
</table> </table>
<p class="wc-setup-actions step"> <p class="wc-setup-actions step">
<input type="submit" class="button-primary button button-large" value="<?php esc_attr_e( 'Continue', 'woocommerce' ); ?>" name="save_step" /> <input type="submit" class="button-primary button button-large button-next" value="<?php esc_attr_e( 'Continue', 'woocommerce' ); ?>" name="save_step" />
<a href="<?php echo esc_url( $this->get_next_step_link() ); ?>" class="button button-large"><?php _e( 'Skip this step', 'woocommerce' ); ?></a> <a href="<?php echo esc_url( $this->get_next_step_link() ); ?>" class="button button-large button-next"><?php _e( 'Skip this step', 'woocommerce' ); ?></a>
<?php wp_nonce_field( 'wc-setup' ); ?> <?php wp_nonce_field( 'wc-setup' ); ?>
</p> </p>
</form> </form>
@ -388,12 +402,12 @@ class WC_Admin_Setup_Wizard {
update_option( 'woocommerce_default_country', $store_location ); update_option( 'woocommerce_default_country', $store_location );
update_option( 'woocommerce_currency', $currency_code ); update_option( 'woocommerce_currency', $currency_code );
update_option( 'woocommerce_currency_pos', $currency_pos ); update_option( 'woocommerce_currency_pos', $currency_pos );
update_option( 'woocommerce_decimal_sep', $decimal_sep ); update_option( 'woocommerce_price_decimal_sep', $decimal_sep );
update_option( 'woocommerce_thousand_sep', $thousand_sep ); update_option( 'woocommerce_price_thousand_sep', $thousand_sep );
update_option( 'woocommerce_weight_unit', $weight_unit ); update_option( 'woocommerce_weight_unit', $weight_unit );
update_option( 'woocommerce_dimension_unit', $dimension_unit ); update_option( 'woocommerce_dimension_unit', $dimension_unit );
wp_redirect( $this->get_next_step_link() ); wp_redirect( esc_url_raw( $this->get_next_step_link() ) );
exit; exit;
} }
@ -520,8 +534,8 @@ class WC_Admin_Setup_Wizard {
?> ?>
</table> </table>
<p class="wc-setup-actions step"> <p class="wc-setup-actions step">
<input type="submit" class="button-primary button button-large" value="<?php esc_attr_e( 'Continue', 'woocommerce' ); ?>" name="save_step" /> <input type="submit" class="button-primary button button-large button-next" value="<?php esc_attr_e( 'Continue', 'woocommerce' ); ?>" name="save_step" />
<a href="<?php echo esc_url( $this->get_next_step_link() ); ?>" class="button button-large"><?php _e( 'Skip this step', 'woocommerce' ); ?></a> <a href="<?php echo esc_url( $this->get_next_step_link() ); ?>" class="button button-large button-next"><?php _e( 'Skip this step', 'woocommerce' ); ?></a>
<?php wp_nonce_field( 'wc-setup' ); ?> <?php wp_nonce_field( 'wc-setup' ); ?>
</p> </p>
</form> </form>
@ -548,7 +562,7 @@ class WC_Admin_Setup_Wizard {
// Init rate and settings // Init rate and settings
$shipping_method = new WC_Shipping_Flat_Rate(); $shipping_method = new WC_Shipping_Flat_Rate();
$costs = array(); $costs = array();
$costs[] = woocommerce_format_decimal( sanitize_text_field( $_POST['shipping_cost_domestic'] ) ); $costs[] = wc_format_decimal( sanitize_text_field( $_POST['shipping_cost_domestic'] ) );
if ( $item_cost = sanitize_text_field( $_POST['shipping_cost_domestic_item'] ) ) { if ( $item_cost = sanitize_text_field( $_POST['shipping_cost_domestic_item'] ) ) {
$costs[] = $item_cost . ' * [qty]'; $costs[] = $item_cost . ' * [qty]';
} }
@ -568,7 +582,7 @@ class WC_Admin_Setup_Wizard {
// Init rate and settings // Init rate and settings
$shipping_method = new WC_Shipping_International_Delivery(); $shipping_method = new WC_Shipping_International_Delivery();
$costs = array(); $costs = array();
$costs[] = woocommerce_format_decimal( sanitize_text_field( $_POST['shipping_cost_international'] ) ); $costs[] = wc_format_decimal( sanitize_text_field( $_POST['shipping_cost_international'] ) );
if ( $item_cost = sanitize_text_field( $_POST['shipping_cost_international_item'] ) ) { if ( $item_cost = sanitize_text_field( $_POST['shipping_cost_international_item'] ) ) {
$costs[] = $item_cost . ' * [qty]'; $costs[] = $item_cost . ' * [qty]';
} }
@ -618,7 +632,7 @@ class WC_Admin_Setup_Wizard {
} }
} }
wp_redirect( $this->get_next_step_link() ); wp_redirect( esc_url_raw( $this->get_next_step_link() ) );
exit; exit;
} }
@ -633,7 +647,7 @@ class WC_Admin_Setup_Wizard {
?> ?>
<h1><?php _e( 'Payments', 'woocommerce' ); ?></h1> <h1><?php _e( 'Payments', 'woocommerce' ); ?></h1>
<form method="post"> <form method="post">
<p><?php printf( __( 'WooCommerce comes with some payment gateways pre-installed. %2$sAdditonal gateways%3$s can be installed later. Payment Gateways can be setup, enabled and disabled from the %1$scheckout settings%3$s screen.', 'woocommerce' ), '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=checkout' ) . '" target="_blank">', '<a href="' . admin_url( 'admin.php?page=wc-addons&view=payment-gateways' ) . '" target="_blank">', '</a>' ); ?></p> <p><?php printf( __( 'WooCommerce can accept both online and offline payments. %2$sAdditional payment methods%3$s can be installed later and managed from the %1$scheckout settings%3$s screen.', 'woocommerce' ), '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=checkout' ) . '" target="_blank">', '<a href="' . admin_url( 'admin.php?page=wc-addons&view=payment-gateways' ) . '" target="_blank">', '</a>' ); ?></p>
<table class="form-table"> <table class="form-table">
<tr class="section_title"> <tr class="section_title">
<td colspan="2"> <td colspan="2">
@ -673,8 +687,8 @@ class WC_Admin_Setup_Wizard {
</tr> </tr>
</table> </table>
<p class="wc-setup-actions step"> <p class="wc-setup-actions step">
<input type="submit" class="button-primary button button-large" value="<?php esc_attr_e( 'Continue', 'woocommerce' ); ?>" name="save_step" /> <input type="submit" class="button-primary button button-large button-next" value="<?php esc_attr_e( 'Continue', 'woocommerce' ); ?>" name="save_step" />
<a href="<?php echo esc_url( $this->get_next_step_link() ); ?>" class="button button-large"><?php _e( 'Skip this step', 'woocommerce' ); ?></a> <a href="<?php echo esc_url( $this->get_next_step_link() ); ?>" class="button button-large button-next"><?php _e( 'Skip this step', 'woocommerce' ); ?></a>
<?php wp_nonce_field( 'wc-setup' ); ?> <?php wp_nonce_field( 'wc-setup' ); ?>
</p> </p>
</form> </form>
@ -706,7 +720,7 @@ class WC_Admin_Setup_Wizard {
update_option( 'woocommerce_cod_settings', $cod_settings ); update_option( 'woocommerce_cod_settings', $cod_settings );
update_option( 'woocommerce_bacs_settings', $bacs_settings ); update_option( 'woocommerce_bacs_settings', $bacs_settings );
wp_redirect( $this->get_next_step_link() ); wp_redirect( esc_url_raw( $this->get_next_step_link() ) );
exit; exit;
} }

View File

@ -143,24 +143,7 @@ class WC_Admin_Status {
// Manual translation update messages // Manual translation update messages
if ( isset( $_GET['translation_updated'] ) ) { if ( isset( $_GET['translation_updated'] ) ) {
switch ( $_GET['translation_updated'] ) { WC_Language_Pack_Upgrader::language_update_messages();
case 2 :
echo '<div class="error"><p>' . __( 'Failed to install/update the translation:', 'woocommerce' ) . ' ' . __( 'Seems you don\'t have permission to do this!', 'woocommerce' ) . '</p></div>';
break;
case 3 :
echo '<div class="error"><p>' . __( 'Failed to install/update the translation:', 'woocommerce' ) . ' ' . sprintf( __( 'An authentication error occurred while updating the translation. Please try again or configure your %sUpgrade Constants%s.', 'woocommerce' ), '<a href="http://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants">', '</a>' ) . '</p></div>';
break;
case 4 :
echo '<div class="error"><p>' . __( 'Failed to install/update the translation:', 'woocommerce' ) . ' ' . __( 'Sorry but there is no translation available for your language =/', 'woocommerce' ) . '</p></div>';
break;
default :
// Force WordPress find for new updates and hide the WooCommerce translation update
set_site_transient( 'update_plugins', null );
echo '<div class="updated"><p>' . __( 'Translations installed/updated successfully!', 'woocommerce' ) . '</p></div>';
break;
}
} }
// Display message if settings settings have been saved // Display message if settings settings have been saved

View File

@ -140,7 +140,7 @@ class WC_Admin_Taxonomies {
var attachment = file_frame.state().get( 'selection' ).first().toJSON(); var attachment = file_frame.state().get( 'selection' ).first().toJSON();
jQuery( '#product_cat_thumbnail_id' ).val( attachment.id ); jQuery( '#product_cat_thumbnail_id' ).val( attachment.id );
jQuery( '#product_cat_thumbnail img' ).attr( 'src', attachment.sizes.thumbnail.url ); jQuery( '#product_cat_thumbnail' ).find( 'img' ).attr( 'src', attachment.sizes.thumbnail.url );
jQuery( '.remove_image_button' ).show(); jQuery( '.remove_image_button' ).show();
}); });
@ -149,7 +149,7 @@ class WC_Admin_Taxonomies {
}); });
jQuery( document ).on( 'click', '.remove_image_button', function() { jQuery( document ).on( 'click', '.remove_image_button', function() {
jQuery( '#product_cat_thumbnail img' ).attr( 'src', '<?php echo esc_js( wc_placeholder_img_src() ); ?>' ); jQuery( '#product_cat_thumbnail' ).find( 'img' ).attr( 'src', '<?php echo esc_js( wc_placeholder_img_src() ); ?>' );
jQuery( '#product_cat_thumbnail_id' ).val( '' ); jQuery( '#product_cat_thumbnail_id' ).val( '' );
jQuery( '.remove_image_button' ).hide(); jQuery( '.remove_image_button' ).hide();
return false; return false;
@ -231,7 +231,7 @@ class WC_Admin_Taxonomies {
var attachment = file_frame.state().get( 'selection' ).first().toJSON(); var attachment = file_frame.state().get( 'selection' ).first().toJSON();
jQuery( '#product_cat_thumbnail_id' ).val( attachment.id ); jQuery( '#product_cat_thumbnail_id' ).val( attachment.id );
jQuery( '#product_cat_thumbnail img' ).attr( 'src', attachment.sizes.thumbnail.url ); jQuery( '#product_cat_thumbnail' ).find( 'img' ).attr( 'src', attachment.sizes.thumbnail.url );
jQuery( '.remove_image_button' ).show(); jQuery( '.remove_image_button' ).show();
}); });
@ -240,7 +240,7 @@ class WC_Admin_Taxonomies {
}); });
jQuery( document ).on( 'click', '.remove_image_button', function() { jQuery( document ).on( 'click', '.remove_image_button', function() {
jQuery( '#product_cat_thumbnail img' ).attr( 'src', '<?php echo esc_js( wc_placeholder_img_src() ); ?>' ); jQuery( '#product_cat_thumbnail' ).find( 'img' ).attr( 'src', '<?php echo esc_js( wc_placeholder_img_src() ); ?>' );
jQuery( '#product_cat_thumbnail_id' ).val( '' ); jQuery( '#product_cat_thumbnail_id' ).val( '' );
jQuery( '.remove_image_button' ).hide(); jQuery( '.remove_image_button' ).hide();
return false; return false;

View File

@ -76,7 +76,7 @@ class WC_Tax_Rate_Importer extends WP_Importer {
gc_enable(); gc_enable();
} }
if ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) { if ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) {
set_time_limit( 0 ); @set_time_limit( 0 );
} }
@ob_flush(); @ob_flush();
@flush(); @flush();

View File

@ -164,7 +164,7 @@ class WC_Meta_Box_Order_Data {
<input name="post_status" type="hidden" value="<?php echo esc_attr( $post->post_status ); ?>" /> <input name="post_status" type="hidden" value="<?php echo esc_attr( $post->post_status ); ?>" />
<div id="order_data" class="panel"> <div id="order_data" class="panel">
<h2><?php echo esc_html( sprintf( __( '%s %s details', 'woocommerce' ), $order_type_object->labels->singular_name, $order->get_order_number() ) ); ?></h2> <h2><?php echo esc_html( sprintf( _x( '%s #%s details', 'Order #123 details', 'woocommerce' ), $order_type_object->labels->singular_name, $order->get_order_number() ) ); ?></h2>
<p class="order_number"><?php <p class="order_number"><?php
if ( $payment_method ) { if ( $payment_method ) {
@ -222,7 +222,7 @@ class WC_Meta_Box_Order_Data {
if ( ! empty( $order->customer_user ) ) { if ( ! empty( $order->customer_user ) ) {
$user_id = absint( $order->customer_user ); $user_id = absint( $order->customer_user );
$user = get_user_by( 'id', $user_id ); $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" id="customer_user" name="customer_user" data-placeholder="<?php esc_attr_e( 'Guest', 'woocommerce' ); ?>" data-selected="<?php echo htmlspecialchars( $user_string ); ?>" value="<?php echo $user_id; ?>" data-allow_clear="true" /> <input type="hidden" class="wc-customer-search" id="customer_user" name="customer_user" data-placeholder="<?php esc_attr_e( 'Guest', 'woocommerce' ); ?>" data-selected="<?php echo htmlspecialchars( $user_string ); ?>" value="<?php echo $user_id; ?>" data-allow_clear="true" />
@ -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 = strtotime( $_POST['order_date'] . ' ' . (int) $_POST['order_date_hour'] . ':' . (int) $_POST['order_date_minute'] . ':00' );
} }
// 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'] );
// Finally, set the date
$date = date_i18n( 'Y-m-d H:i:s', $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 ) ); $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 );
wc_delete_shop_order_transients( $post_id ); wc_delete_shop_order_transients( $post_id );
} }
} }

View File

@ -44,9 +44,10 @@ class WC_Meta_Box_Order_Notes {
foreach( $notes as $note ) { foreach( $notes as $note ) {
$note_classes = get_comment_meta( $note->comment_ID, 'is_customer_note', true ) ? array( 'customer-note', 'note' ) : array( 'note' ); $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 implode( ' ', $note_classes ); ?>"> <li rel="<?php echo absint( $note->comment_ID ) ; ?>" class="<?php echo esc_attr( implode( ' ', $note_classes ) ); ?>">
<div class="note_content"> <div class="note_content">
<?php echo wpautop( wptexturize( wp_kses_post( $note->comment_content ) ) ); ?> <?php echo wpautop( wptexturize( wp_kses_post( $note->comment_content ) ) ); ?>
</div> </div>

View File

@ -252,24 +252,35 @@ class WC_Meta_Box_Product_Data {
echo '<div class="options_group show_if_simple show_if_external show_if_variable">'; echo '<div class="options_group show_if_simple show_if_external show_if_variable">';
// Tax // Tax
woocommerce_wp_select( array( 'id' => '_tax_status', 'label' => __( 'Tax Status', 'woocommerce' ), 'options' => array( woocommerce_wp_select( array(
'taxable' => __( 'Taxable', 'woocommerce' ), 'id' => '_tax_status',
'shipping' => __( 'Shipping only', 'woocommerce' ), 'label' => __( 'Tax Status', 'woocommerce' ),
'none' => _x( 'None', 'Tax status', 'woocommerce' ) 'options' => array(
) ) ); 'taxable' => __( 'Taxable', 'woocommerce' ),
'shipping' => __( 'Shipping only', 'woocommerce' ),
'none' => _x( 'None', 'Tax status', 'woocommerce' )
),
'desc_tip' => 'true',
'description' => __( 'Define whether or not the entire product is taxable, or just the cost of shipping it.', 'woocommerce' )
) );
$tax_classes = WC_Tax::get_tax_classes(); $tax_classes = WC_Tax::get_tax_classes();
$classes_options = array(); $classes_options = array();
$classes_options[''] = __( 'Standard', 'woocommerce' ); $classes_options[''] = __( 'Standard', 'woocommerce' );
if ( ! empty( $tax_classes ) ) { if ( ! empty( $tax_classes ) ) {
foreach ( $tax_classes as $class ) { foreach ( $tax_classes as $class ) {
$classes_options[ sanitize_title( $class ) ] = esc_html( $class ); $classes_options[ sanitize_title( $class ) ] = esc_html( $class );
} }
} }
woocommerce_wp_select( array( 'id' => '_tax_class', 'label' => __( 'Tax Class', 'woocommerce' ), 'options' => $classes_options ) ); woocommerce_wp_select( array(
'id' => '_tax_class',
'label' => __( 'Tax Class', 'woocommerce' ),
'options' => $classes_options,
'desc_tip' => 'true',
'description' => __( 'Choose a tax class for this product. Tax classes are used to apply different tax rates specific to certain types of product.', 'woocommerce' )
) );
do_action( 'woocommerce_product_options_tax' ); do_action( 'woocommerce_product_options_tax' );
@ -403,14 +414,31 @@ class WC_Meta_Box_Product_Data {
</div> </div>
<div id="product_attributes" class="panel wc-metaboxes-wrapper"> <div id="product_attributes" class="panel wc-metaboxes-wrapper">
<div class="toolbar toolbar-top">
<span class="expand-close">
<a href="#" class="expand_all"><?php _e( 'Expand', 'woocommerce' ); ?></a> / <a href="#" class="close_all"><?php _e( 'Close', 'woocommerce' ); ?></a>
</span>
<select name="attribute_taxonomy" class="attribute_taxonomy">
<option value=""><?php _e( 'Custom product attribute', 'woocommerce' ); ?></option>
<?php
global $wc_product_attributes;
// Array of defined attribute taxonomies
$attribute_taxonomies = wc_get_attribute_taxonomies();
if ( $attribute_taxonomies ) {
foreach ( $attribute_taxonomies as $tax ) {
$attribute_taxonomy_name = wc_attribute_taxonomy_name( $tax->attribute_name );
$label = $tax->attribute_label ? $tax->attribute_label : $tax->attribute_name;
echo '<option value="' . esc_attr( $attribute_taxonomy_name ) . '">' . esc_html( $label ) . '</option>';
}
}
?>
</select>
<button type="button" class="button add_attribute"><?php _e( 'Add', 'woocommerce' ); ?></button>
</div>
<div class="product_attributes wc-metaboxes"> <div class="product_attributes wc-metaboxes">
<?php <?php
global $wc_product_attributes;
// Array of defined attribute taxonomies
$attribute_taxonomies = wc_get_attribute_taxonomies();
// Product attributes - taxonomies and custom, ordered, with visibility and variation attributes set // Product attributes - taxonomies and custom, ordered, with visibility and variation attributes set
$attributes = maybe_unserialize( get_post_meta( $thepostid, '_product_attributes', true ) ); $attributes = maybe_unserialize( get_post_meta( $thepostid, '_product_attributes', true ) );
@ -445,24 +473,12 @@ class WC_Meta_Box_Product_Data {
} }
?> ?>
</div> </div>
<div class="toolbar">
<p class="toolbar"> <span class="expand-close">
<button type="button" class="button button-primary add_attribute"><?php _e( 'Add', 'woocommerce' ); ?></button> <a href="#" class="expand_all"><?php _e( 'Expand', 'woocommerce' ); ?></a> / <a href="#" class="close_all"><?php _e( 'Close', 'woocommerce' ); ?></a>
<select name="attribute_taxonomy" class="attribute_taxonomy"> </span>
<option value=""><?php _e( 'Custom product attribute', 'woocommerce' ); ?></option> <button type="button" class="button save_attributes button-primary"><?php _e( 'Save Attributes', 'woocommerce' ); ?></button>
<?php </div>
if ( $attribute_taxonomies ) {
foreach ( $attribute_taxonomies as $tax ) {
$attribute_taxonomy_name = wc_attribute_taxonomy_name( $tax->attribute_name );
$label = $tax->attribute_label ? $tax->attribute_label : $tax->attribute_name;
echo '<option value="' . esc_attr( $attribute_taxonomy_name ) . '">' . esc_html( $label ) . '</option>';
}
}
?>
</select>
<button type="button" class="button save_attributes"><?php _e( 'Save attributes', 'woocommerce' ); ?></button>
</p>
<?php do_action( 'woocommerce_product_options_attributes' ); ?> <?php do_action( 'woocommerce_product_options_attributes' ); ?>
</div> </div>
<div id="linked_product_data" class="panel woocommerce_options_panel"> <div id="linked_product_data" class="panel woocommerce_options_panel">
@ -478,7 +494,7 @@ class WC_Meta_Box_Product_Data {
foreach ( $product_ids as $product_id ) { foreach ( $product_ids as $product_id ) {
$product = wc_get_product( $product_id ); $product = wc_get_product( $product_id );
if ( is_object( $product ) ) { if ( is_object( $product ) ) {
$json_ids[ $product_id ] = wp_kses_post( html_entity_decode( $product->get_formatted_name() ) ); $json_ids[ $product_id ] = wp_kses_post( html_entity_decode( $product->get_formatted_name(), ENT_QUOTES, get_bloginfo( 'charset' ) ) );
} }
} }
@ -495,7 +511,7 @@ class WC_Meta_Box_Product_Data {
foreach ( $product_ids as $product_id ) { foreach ( $product_ids as $product_id ) {
$product = wc_get_product( $product_id ); $product = wc_get_product( $product_id );
if ( is_object( $product ) ) { if ( is_object( $product ) ) {
$json_ids[ $product_id ] = wp_kses_post( html_entity_decode( $product->get_formatted_name() ) ); $json_ids[ $product_id ] = wp_kses_post( html_entity_decode( $product->get_formatted_name(), ENT_QUOTES, get_bloginfo( 'charset' ) ) );
} }
} }
@ -514,7 +530,7 @@ class WC_Meta_Box_Product_Data {
if ( $parent_id ) { if ( $parent_id ) {
$parent = wc_get_product( $parent_id ); $parent = wc_get_product( $parent_id );
if ( is_object( $parent ) ) { if ( is_object( $parent ) ) {
$parent_title = wp_kses_post( html_entity_decode( $parent->get_formatted_name() ) ); $parent_title = wp_kses_post( html_entity_decode( $parent->get_formatted_name(), ENT_QUOTES, get_bloginfo( 'charset' ) ) );
} }
echo esc_attr( $parent_title ); echo esc_attr( $parent_title );
@ -589,25 +605,26 @@ class WC_Meta_Box_Product_Data {
if ( $attributes ) { if ( $attributes ) {
foreach ( $attributes as $attribute ) { foreach ( $attributes as $attribute ) {
if ( isset( $attribute['is_variation'] ) ) { if ( ! empty( $attribute['is_variation'] ) ) {
$variation_attribute_found = true; $variation_attribute_found = true;
break; break;
} }
} }
} }
$variations_count = absint( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'product_variation'", $post->ID ) ) ); $variations_count = absint( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'product_variation' AND post_status IN ('publish', 'private')", $post->ID ) ) );
$variations_per_page = absint( apply_filters( 'woocommerce_admin_meta_boxes_variations_per_page', 10 ) ); $variations_per_page = absint( apply_filters( 'woocommerce_admin_meta_boxes_variations_per_page', 15 ) );
$variations_total_pages = ceil( $variations_count / $variations_per_page ); $variations_total_pages = ceil( $variations_count / $variations_per_page );
?> ?>
<div id="variable_product_options" class="panel wc-metaboxes-wrapper"><div id="variable_product_options_inner"> <div id="variable_product_options" class="panel wc-metaboxes-wrapper"><div id="variable_product_options_inner">
<?php if ( ! $variation_attribute_found ) : ?> <?php if ( ! $variation_attribute_found ) : ?>
<div id="message" class="inline woocommerce-message"> <div id="message" class="inline notice woocommerce-message">
<p><?php _e( 'Before adding variations, add and save some attributes on the <strong>Attributes</strong> tab.', 'woocommerce' ); ?></p> <p><?php _e( 'Before you can add a variation you need to add some variation attributes on the <strong>Attributes</strong> tab.', 'woocommerce' ); ?></p>
<p>
<p class="submit"><a class="button-primary" href="<?php echo esc_url( apply_filters( 'woocommerce_docs_url', 'http://docs.woothemes.com/document/variable-product/', 'product-variations' ) ); ?>" target="_blank"><?php _e( 'Learn more', 'woocommerce' ); ?></a></p> <a class="button-primary" href="<?php echo esc_url( apply_filters( 'woocommerce_docs_url', 'http://docs.woothemes.com/document/variable-product/', 'product-variations' ) ); ?>" target="_blank"><?php _e( 'Learn more', 'woocommerce' ); ?></a>
</p>
</div> </div>
<?php else : ?> <?php else : ?>
@ -658,8 +675,8 @@ class WC_Meta_Box_Product_Data {
<div class="toolbar toolbar-top"> <div class="toolbar toolbar-top">
<select id="field_to_edit" class="variation_actions"> <select id="field_to_edit" class="variation_actions">
<option value="add_variation"><?php _e( 'Add variation', 'woocommerce' ); ?></option> <option data-global="true" value="add_variation"><?php _e( 'Add variation', 'woocommerce' ); ?></option>
<option value="link_all_variations"><?php _e( 'Create variations from all attributes', 'woocommerce' ); ?></option> <option data-global="true" value="link_all_variations"><?php _e( 'Create variations from all attributes', 'woocommerce' ); ?></option>
<option value="delete_all"><?php _e( 'Delete all variations', 'woocommerce' ); ?></option> <option value="delete_all"><?php _e( 'Delete all variations', 'woocommerce' ); ?></option>
<optgroup label="<?php esc_attr_e( 'Status', 'woocommerce' ); ?>"> <optgroup label="<?php esc_attr_e( 'Status', 'woocommerce' ); ?>">
<option value="toggle_enabled"><?php _e( 'Toggle &quot;Enabled&quot;', 'woocommerce' ); ?></option> <option value="toggle_enabled"><?php _e( 'Toggle &quot;Enabled&quot;', 'woocommerce' ); ?></option>
@ -939,8 +956,9 @@ class WC_Meta_Box_Product_Data {
} elseif ( isset( $attribute_values[ $i ] ) ) { } elseif ( isset( $attribute_values[ $i ] ) ) {
// Text based, separate by pipe // Text based, possibly separated by pipes (WC_DELIMITER). Preserve line breaks in non-variation attributes.
$values = implode( ' ' . WC_DELIMITER . ' ', array_map( 'wc_clean', wc_get_text_attributes( $attribute_values[ $i ] ) ) ); $values = $is_variation ? wc_clean( $attribute_values[ $i ] ) : implode( "\n", array_map( 'wc_clean', explode( "\n", $attribute_values[ $i ] ) ) );
$values = implode( ' ' . WC_DELIMITER . ' ', wc_get_text_attributes( $values ) );
// Custom attribute - Add attribute to array and set the values // Custom attribute - Add attribute to array and set the values
$attributes[ sanitize_title( $attribute_names[ $i ] ) ] = array( $attributes[ sanitize_title( $attribute_names[ $i ] ) ] = array(
@ -1107,7 +1125,7 @@ class WC_Meta_Box_Product_Data {
update_post_meta( $post_id, '_stock', '' ); update_post_meta( $post_id, '_stock', '' );
} }
} else { } elseif ( 'variable' !== $product_type ) {
wc_update_product_stock_status( $post_id, wc_clean( $_POST['_stock_status'] ) ); wc_update_product_stock_status( $post_id, wc_clean( $_POST['_stock_status'] ) );
} }
@ -1136,7 +1154,7 @@ class WC_Meta_Box_Product_Data {
if ( isset( $_POST['_wc_file_urls'] ) ) { if ( isset( $_POST['_wc_file_urls'] ) ) {
$file_names = isset( $_POST['_wc_file_names'] ) ? $_POST['_wc_file_names'] : array(); $file_names = isset( $_POST['_wc_file_names'] ) ? $_POST['_wc_file_names'] : array();
$file_urls = isset( $_POST['_wc_file_urls'] ) ? array_map( 'trim', $_POST['_wc_file_urls'] ) : array(); $file_urls = isset( $_POST['_wc_file_urls'] ) ? wp_unslash( array_map( 'trim', $_POST['_wc_file_urls'] ) ) : array();
$file_url_size = sizeof( $file_urls ); $file_url_size = sizeof( $file_urls );
$allowed_file_types = apply_filters( 'woocommerce_downloadable_file_allowed_mime_types', get_allowed_mime_types() ); $allowed_file_types = apply_filters( 'woocommerce_downloadable_file_allowed_mime_types', get_allowed_mime_types() );
@ -1218,6 +1236,7 @@ class WC_Meta_Box_Product_Data {
if ( 'variable' == $product_type ) { if ( 'variable' == $product_type ) {
// Update parent if variable so price sorting works and stays in sync with the cheapest child // Update parent if variable so price sorting works and stays in sync with the cheapest child
WC_Product_Variable::sync( $post_id ); WC_Product_Variable::sync( $post_id );
WC_Product_Variable::sync_stock_status( $post_id );
} }
// Update version after saving // Update version after saving
@ -1308,6 +1327,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 ) ); $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 ); do_action( 'woocommerce_update_product_variation', $variation_id );
} }

View File

@ -32,7 +32,7 @@ if ( ! defined( 'ABSPATH' ) ) {
echo '<br/>' . wc_get_formatted_variation( $_product->variation_data, true ); echo '<br/>' . wc_get_formatted_variation( $_product->variation_data, true );
} }
?>"><?php echo $_product->get_image( 'shop_thumbnail', array( 'title' => '' ) ); ?></a> ?>"><?php echo apply_filters( 'woocommerce_admin_order_item_thumbnail', $_product->get_image( 'shop_thumbnail', array( 'title' => '' ) ), $item_id, $item ); ?></a>
<?php else : ?> <?php else : ?>
<?php echo wc_placeholder_img( 'shop_thumbnail' ); ?> <?php echo wc_placeholder_img( 'shop_thumbnail' ); ?>
<?php endif; ?> <?php endif; ?>

View File

@ -183,13 +183,7 @@ if ( wc_tax_enabled() ) {
<tr> <tr>
<td class="label"><?php _e( 'Order Total', 'woocommerce' ); ?>:</td> <td class="label"><?php _e( 'Order Total', 'woocommerce' ); ?>:</td>
<td class="total"> <td class="total">
<div class="view"><?php <div class="view"><?php echo $order->get_formatted_order_total(); ?></div>
if ( $order->get_total_refunded() > 0 ) {
echo '<del>' . strip_tags( $order->get_formatted_order_total() ) . '</del> <ins>' . wc_price( $order->get_total() - $order->get_total_refunded(), array( 'currency' => $order->get_order_currency() ) ) . '</ins>';
} else {
echo esc_html( strip_tags( $order->get_formatted_order_total() ) );
}
?></div>
<div class="edit" style="display: none;"> <div class="edit" style="display: none;">
<input type="text" class="wc_input_price" id="_order_total" name="_order_total" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $data['_order_total'][0] ) ) ? esc_attr( wc_format_localized_price( $data['_order_total'][0] ) ) : ''; ?>" /> <input type="text" class="wc_input_price" id="_order_total" name="_order_total" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $data['_order_total'][0] ) ) ? esc_attr( wc_format_localized_price( $data['_order_total'][0] ) ) : ''; ?>" />
<div class="clear"></div> <div class="clear"></div>
@ -306,7 +300,7 @@ if ( wc_tax_enabled() ) {
</div> </div>
<?php endif; ?> <?php endif; ?>
<script type="text/template" id="wc-modal-add-products"> <script type="text/template" id="tmpl-wc-modal-add-products">
<div class="wc-backbone-modal"> <div class="wc-backbone-modal">
<div class="wc-backbone-modal-content"> <div class="wc-backbone-modal-content">
<section class="wc-backbone-modal-main" role="main"> <section class="wc-backbone-modal-main" role="main">
@ -332,7 +326,7 @@ if ( wc_tax_enabled() ) {
<div class="wc-backbone-modal-backdrop modal-close"></div> <div class="wc-backbone-modal-backdrop modal-close"></div>
</script> </script>
<script type="text/template" id="wc-modal-add-tax"> <script type="text/template" id="tmpl-wc-modal-add-tax">
<div class="wc-backbone-modal"> <div class="wc-backbone-modal">
<div class="wc-backbone-modal-content"> <div class="wc-backbone-modal-content">
<section class="wc-backbone-modal-main" role="main"> <section class="wc-backbone-modal-main" role="main">

View File

@ -16,13 +16,13 @@ extract( $variation_data );
<h3> <h3>
<a href="#" class="remove_variation delete" rel="<?php echo esc_attr( $variation_id ); ?>"><?php _e( 'Remove', 'woocommerce' ); ?></a> <a href="#" class="remove_variation delete" rel="<?php echo esc_attr( $variation_id ); ?>"><?php _e( 'Remove', 'woocommerce' ); ?></a>
<div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'woocommerce' ); ?>"></div> <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'woocommerce' ); ?>"></div>
<div class="tips sort" data-tip="<?php esc_attr_e( 'Drag and drop, or click to set menu order manually', 'woocommerce' ); ?>"></div> <div class="tips sort" data-tip="<?php esc_attr_e( 'Drag and drop, or click to set admin variation order', 'woocommerce' ); ?>"></div>
<strong>#<?php echo esc_html( $variation_id ); ?>: </strong> <strong>#<?php echo esc_html( $variation_id ); ?>: </strong>
<?php <?php
foreach ( $parent_data['attributes'] as $attribute ) { foreach ( $parent_data['attributes'] as $attribute ) {
// Only deal with attributes that are variations // Only deal with attributes that are variations
if ( ! $attribute['is_variation'] ) { if ( ! $attribute['is_variation'] || 'false' === $attribute['is_variation'] ) {
continue; continue;
} }
@ -56,7 +56,7 @@ extract( $variation_data );
} }
?> ?>
<input type="hidden" name="variable_post_id[<?php echo $loop; ?>]" value="<?php echo esc_attr( $variation_id ); ?>" /> <input type="hidden" name="variable_post_id[<?php echo $loop; ?>]" value="<?php echo esc_attr( $variation_id ); ?>" />
<input type="hidden" class="variation_menu_order" name="variation_menu_order[<?php echo $loop; ?>]" value="<?php echo absint( $menu_order ); ?>" /> <input type="hidden" class="variation_menu_order" name="variation_menu_order[<?php echo $loop; ?>]" value="<?php echo isset( $menu_order ) ? absint( $menu_order ) : 0; ?>" />
</h3> </h3>
<div class="woocommerce_variable_attributes wc-metabox-content" style="display: none;"> <div class="woocommerce_variable_attributes wc-metabox-content" style="display: none;">
<div class="data"> <div class="data">
@ -108,6 +108,19 @@ 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])" /> <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> </p>
</div> </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> </div>
<?php if ( 'yes' == get_option( 'woocommerce_manage_stock' ) ) : ?> <?php if ( 'yes' == get_option( 'woocommerce_manage_stock' ) ) : ?>
@ -126,6 +139,19 @@ extract( $variation_data );
?> ?>
</select> </select>
</p> </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> </div>
<?php endif; ?> <?php endif; ?>
@ -162,6 +188,19 @@ extract( $variation_data );
<?php else : ?> <?php else : ?>
<p>&nbsp;</p> <p>&nbsp;</p>
<?php endif; ?> <?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> </div>
<?php endif; ?> <?php endif; ?>
<div> <div>
@ -189,6 +228,19 @@ extract( $variation_data );
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $key === $_tax_class, true, false ) . '>' . esc_html( $value ) . '</option>'; echo '<option value="' . esc_attr( $key ) . '" ' . selected( $key === $_tax_class, true, false ) . '>' . esc_html( $value ) . '</option>';
?></select> ?></select>
</p> </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; ?> <?php endif; ?>
<p class="form-row form-row-full"> <p class="form-row form-row-full">
@ -249,6 +301,19 @@ extract( $variation_data );
<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' ); ?> <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>
<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" /> <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> </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> </div>
<?php do_action( 'woocommerce_product_after_variable_attributes', $loop, $variation_data, $variation ); ?> <?php do_action( 'woocommerce_product_after_variable_attributes', $loop, $variation_data, $variation ); ?>
</div> </div>

View File

@ -350,13 +350,13 @@ 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>' ), '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' ), 'placeholder' => __( 'This is the sum of the order totals after any refunds and including shipping and taxes.', 'woocommerce' ),
'color' => $this->chart_colours['sales_amount'], 'color' => $this->chart_colours['sales_amount'],
'highlight_series' => 6 'highlight_series' => 5
); );
$legend[] = array( $legend[] = array(
'title' => sprintf( __( '%s net sales in this period', 'woocommerce' ), '<strong>' . wc_price( $data->net_sales ) . '</strong>' ), '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' ), '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'], 'color' => $this->chart_colours['net_sales_amount'],
'highlight_series' => 7 'highlight_series' => 6
); );
if ( $data->average_sales > 0 ) { if ( $data->average_sales > 0 ) {
$legend[] = array( $legend[] = array(
@ -377,14 +377,14 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
'highlight_series' => 0 'highlight_series' => 0
); );
$legend[] = array( $legend[] = array(
'title' => sprintf( _n( '%s refunded %d order', '%s refunded %d orders', $this->report_data->total_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 ) . ')', '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'], 'color' => $this->chart_colours['refund_amount'],
'highlight_series' => 4 'highlight_series' => 7
); );
$legend[] = array( $legend[] = array(
'title' => sprintf( __( '%s charged for shipping', 'woocommerce' ), '<strong>' . wc_price( $data->total_shipping ) . '</strong>' ), 'title' => sprintf( __( '%s charged for shipping', 'woocommerce' ), '<strong>' . wc_price( $data->total_shipping ) . '</strong>' ),
'color' => $this->chart_colours['shipping_amount'], 'color' => $this->chart_colours['shipping_amount'],
'highlight_series' => 5 'highlight_series' => 4
); );
$legend[] = array( $legend[] = array(
'title' => sprintf( __( '%s worth of coupons used', 'woocommerce' ), '<strong>' . wc_price( $data->total_coupons ) . '</strong>' ), 'title' => sprintf( __( '%s worth of coupons used', 'woocommerce' ), '<strong>' . wc_price( $data->total_coupons ) . '</strong>' ),

View File

@ -112,8 +112,8 @@ class WC_Settings_General extends WC_Settings_Page {
'desc' => '', 'desc' => '',
'id' => 'woocommerce_demo_store_notice', 'id' => 'woocommerce_demo_store_notice',
'default' => __( 'This is a demo store for testing purposes &mdash; no orders shall be fulfilled.', 'woocommerce' ), 'default' => __( 'This is a demo store for testing purposes &mdash; no orders shall be fulfilled.', 'woocommerce' ),
'type' => 'text', 'type' => 'textarea',
'css' => 'min-width:300px;', 'css' => 'width:350px; height: 65px;',
'autoload' => false 'autoload' => false
), ),

View File

@ -289,12 +289,14 @@ class WC_Settings_Products extends WC_Settings_Page {
), ),
array( array(
'title' => __( 'Notification Recipient', 'woocommerce' ), 'title' => __( 'Notification Recipient(s)', 'woocommerce' ),
'desc' => '', 'desc' => __( 'Enter recipients (comma separated) that will receive this notification.', 'woocommerce' ),
'id' => 'woocommerce_stock_email_recipient', 'id' => 'woocommerce_stock_email_recipient',
'type' => 'email', 'type' => 'text',
'default' => get_option( 'admin_email' ), 'default' => get_option( 'admin_email' ),
'autoload' => false 'css' => 'width: 250px;',
'autoload' => false,
'desc_tip' => true
), ),
array( array(

View File

@ -158,7 +158,7 @@ if ( ! defined( 'ABSPATH' ) ) {
__( 'Tax Class', 'woocommerce' ), __( 'Tax Class', 'woocommerce' ),
) ) ); ?>\n"; ) ) ); ?>\n";
jQuery('#rates tr:visible').each(function() { jQuery('#rates').find('tr:visible').each(function() {
var row = ''; var row = '';
jQuery(this).find('td:not(.sort) input').each(function() { jQuery(this).find('td:not(.sort) input').each(function() {

View File

@ -167,10 +167,10 @@ if ( ! defined( 'ABSPATH' ) ) {
<script type="text/javascript"> <script type="text/javascript">
jQuery( function ( $ ) { jQuery( function ( $ ) {
$( '#webhook-options #webhook_topic' ).on( 'change', function() { $( '#webhook-options' ).find( '#webhook_topic' ).on( 'change', function() {
var current = $( this ).val(), var current = $( this ).val(),
action_event_field = $( '#webhook-options #webhook-action-event-wrap' ), action_event_field = $( '#webhook-options' ).find( '#webhook-action-event-wrap' ),
custom_topic_field = $( '#webhook-options #webhook-custom-topic-wrap' ); custom_topic_field = $( '#webhook-options' ).find( '#webhook-custom-topic-wrap' );
action_event_field.hide(); action_event_field.hide();
custom_topic_field.hide(); custom_topic_field.hide();

View File

@ -322,7 +322,8 @@ if ( ! defined( 'ABSPATH' ) ) {
$active_plugins = (array) get_option( 'active_plugins', array() ); $active_plugins = (array) get_option( 'active_plugins', array() );
if ( is_multisite() ) { if ( is_multisite() ) {
$active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) ); $network_activated_plugins = array_keys( get_site_option( 'active_sitewide_plugins', array() ) );
$active_plugins = array_merge( $active_plugins, $network_activated_plugins );
} }
foreach ( $active_plugins as $plugin ) { foreach ( $active_plugins as $plugin ) {
@ -776,7 +777,7 @@ if ( ! defined( 'ABSPATH' ) ) {
try { try {
jQuery( '#debug-report' ).slideDown(); jQuery( '#debug-report' ).slideDown();
jQuery( '#debug-report textarea' ).val( report ).focus().select(); jQuery( '#debug-report' ).find( 'textarea' ).val( report ).focus().select();
jQuery( this ).fadeOut(); jQuery( this ).fadeOut();
return false; return false;
} catch( e ){ } catch( e ){
@ -797,7 +798,7 @@ if ( ! defined( 'ABSPATH' ) ) {
$( document.body ).on( 'copy', '#copy-for-support', function( e ) { $( document.body ).on( 'copy', '#copy-for-support', function( e ) {
e.clipboardData.clearData(); e.clipboardData.clearData();
e.clipboardData.setData( 'text/plain', $( '#debug-report textarea' ).val() ); e.clipboardData.setData( 'text/plain', $( '#debug-report' ).find( 'textarea' ).val() );
e.preventDefault(); e.preventDefault();
}); });

View File

@ -65,49 +65,51 @@ if ( ! defined( 'ABSPATH' ) ) {
</label> </label>
</div> </div>
<label> <?php if ( wc_tax_enabled() ) : ?>
<span class="title"><?php _e( 'Tax Status', 'woocommerce' ); ?></span> <label>
<span class="input-text-wrap"> <span class="title"><?php _e( 'Tax Status', 'woocommerce' ); ?></span>
<select class="tax_status" name="_tax_status"> <span class="input-text-wrap">
<?php <select class="tax_status" name="_tax_status">
$options = array( <?php
'' => __( '— No Change —', 'woocommerce' ), $options = array(
'taxable' => __( 'Taxable', 'woocommerce' ), '' => __( '— No Change —', 'woocommerce' ),
'shipping' => __( 'Shipping only', 'woocommerce' ), 'taxable' => __( 'Taxable', 'woocommerce' ),
'none' => _x( 'None', 'Tax status', 'woocommerce' ) 'shipping' => __( 'Shipping only', 'woocommerce' ),
); 'none' => _x( 'None', 'Tax status', 'woocommerce' )
foreach ($options as $key => $value) { );
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>'; foreach ($options as $key => $value) {
} echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
?>
</select>
</span>
</label>
<label>
<span class="title"><?php _e( 'Tax Class', 'woocommerce' ); ?></span>
<span class="input-text-wrap">
<select class="tax_class" name="_tax_class">
<?php
$options = array(
'' => __( '— No Change —', 'woocommerce' ),
'standard' => __( 'Standard', 'woocommerce' )
);
$tax_classes = WC_Tax::get_tax_classes();
if ( $tax_classes )
foreach ( $tax_classes as $class ) {
$options[ sanitize_title( $class ) ] = esc_html( $class );
} }
?>
</select>
</span>
</label>
foreach ( $options as $key => $value ) { <label>
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>'; <span class="title"><?php _e( 'Tax Class', 'woocommerce' ); ?></span>
} <span class="input-text-wrap">
?> <select class="tax_class" name="_tax_class">
</select> <?php
</span> $options = array(
</label> '' => __( '— No Change —', 'woocommerce' ),
'standard' => __( 'Standard', 'woocommerce' )
);
$tax_classes = WC_Tax::get_tax_classes();
if ( $tax_classes )
foreach ( $tax_classes as $class ) {
$options[ sanitize_title( $class ) ] = esc_html( $class );
}
foreach ( $options as $key => $value ) {
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
}
?>
</select>
</span>
</label>
<?php endif; ?>
<?php if ( wc_product_weight_enabled() ) : ?> <?php if ( wc_product_weight_enabled() ) : ?>
<div class="inline-edit-group"> <div class="inline-edit-group">

View File

@ -45,48 +45,50 @@ if ( ! defined( 'ABSPATH' ) ) {
<br class="clear" /> <br class="clear" />
</div> </div>
<label class="alignleft"> <?php if ( wc_tax_enabled() ) : ?>
<span class="title"><?php _e( 'Tax Status', 'woocommerce' ); ?></span> <label class="alignleft">
<span class="input-text-wrap"> <span class="title"><?php _e( 'Tax Status', 'woocommerce' ); ?></span>
<select class="tax_status" name="_tax_status"> <span class="input-text-wrap">
<?php <select class="tax_status" name="_tax_status">
$options = array( <?php
'taxable' => __( 'Taxable', 'woocommerce' ), $options = array(
'shipping' => __( 'Shipping only', 'woocommerce' ), 'taxable' => __( 'Taxable', 'woocommerce' ),
'none' => _x( 'None', 'Tax status', 'woocommerce' ) 'shipping' => __( 'Shipping only', 'woocommerce' ),
); 'none' => _x( 'None', 'Tax status', 'woocommerce' )
foreach ( $options as $key => $value ) { );
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>'; foreach ( $options as $key => $value ) {
} echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
?>
</select>
</span>
</label>
<br class="clear" />
<label class="alignleft">
<span class="title"><?php _e( 'Tax Class', 'woocommerce' ); ?></span>
<span class="input-text-wrap">
<select class="tax_class" name="_tax_class">
<?php
$options = array(
'' => __( 'Standard', 'woocommerce' )
);
$tax_classes = WC_Tax::get_tax_classes();
if ( $tax_classes )
foreach ( $tax_classes as $class ) {
$options[ sanitize_title( $class ) ] = esc_html( $class );
} }
?>
</select>
</span>
</label>
<br class="clear" />
<label class="alignleft">
<span class="title"><?php _e( 'Tax Class', 'woocommerce' ); ?></span>
<span class="input-text-wrap">
<select class="tax_class" name="_tax_class">
<?php
$options = array(
'' => __( 'Standard', 'woocommerce' )
);
foreach ( $options as $key => $value ) { $tax_classes = WC_Tax::get_tax_classes();
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
} if ( $tax_classes )
?> foreach ( $tax_classes as $class ) {
</select> $options[ sanitize_title( $class ) ] = esc_html( $class );
</span> }
</label>
<br class="clear" /> foreach ( $options as $key => $value ) {
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
}
?>
</select>
</span>
</label>
<br class="clear" />
<?php endif; ?>
<?php if ( wc_product_weight_enabled() || wc_product_dimensions_enabled() ) : ?> <?php if ( wc_product_weight_enabled() || wc_product_dimensions_enabled() ) : ?>
<div class="dimension_fields"> <div class="dimension_fields">

View File

@ -61,40 +61,50 @@ function wc_create_page( $slug, $option = '', $page_title = '', $page_content =
global $wpdb; global $wpdb;
$option_value = get_option( $option ); $option_value = get_option( $option );
$page_found_trash = false;
if ( $option_value > 0 && ( $page_object = get_post( $option_value ) ) ) { if ( $option_value > 0 ) {
if ( 'trash' != $page_object->post_status ) { $page_object = get_post( $option_value );
return -1;
} else { if ( 'page' === $page_object->post_type && ! in_array( $page_object->post_status, array( 'pending', 'trash', 'future', 'auto-draft' ) ) ) {
$page_found_trash = true; // Valid page is already in place
return $page_object->ID;
} }
} }
if ( strlen( $page_content ) > 0 ) { if ( strlen( $page_content ) > 0 ) {
// Search for an existing page with the specified page content (typically a shortcode) // Search for an existing page with the specified page content (typically a shortcode)
$page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content LIKE %s LIMIT 1;", "%{$page_content}%" ) ); $valid_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status NOT IN ( 'pending', 'trash', 'future', 'auto-draft' ) AND post_content LIKE %s LIMIT 1;", "%{$page_content}%" ) );
} else { } else {
// Search for an existing page with the specified page slug // Search for an existing page with the specified page slug
$page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_name = %s LIMIT 1;", $slug ) ); $valid_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status NOT IN ( 'pending', 'trash', 'future', 'auto-draft' ) AND post_name = %s LIMIT 1;", $slug ) );
} }
$page_found = apply_filters( 'woocommerce_create_page_id', $page_found, $slug, $page_content ); $valid_page_found = apply_filters( 'woocommerce_create_page_id', $valid_page_found, $slug, $page_content );
if ( $valid_page_found ) {
if ( $page_found && ! $page_found_trash ) { if ( $option ) {
if ( ! $option_value ) { update_option( $option, $valid_page_found );
update_option( $option, $page_found );
} }
return $valid_page_found;
return $page_found;
}
elseif ( ! $page_found && $page_found_trash ) {
// Page was found in trash but it did not have the correct shortcode (so just recreate it)
$page_found_trash = false;
} }
if ( ! $page_found_trash ) { // Search for a matching valid trashed page
if ( strlen( $page_content ) > 0 ) {
// Search for an existing page with the specified page content (typically a shortcode)
$trashed_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = 'trash' AND post_content LIKE %s LIMIT 1;", "%{$page_content}%" ) );
} else {
// Search for an existing page with the specified page slug
$trashed_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = 'trash' AND post_name = %s LIMIT 1;", $slug ) );
}
if ( $trashed_page_found ) {
$page_id = $trashed_page_found;
$page_data = array(
'ID' => $page_id,
'post_status' => 'publish',
);
wp_update_post( $page_data );
} else {
$page_data = array( $page_data = array(
'post_status' => 'publish', 'post_status' => 'publish',
'post_type' => 'page', 'post_type' => 'page',
@ -105,13 +115,7 @@ function wc_create_page( $slug, $option = '', $page_title = '', $page_content =
'post_parent' => $post_parent, 'post_parent' => $post_parent,
'comment_status' => 'closed' 'comment_status' => 'closed'
); );
$page_id = wp_insert_post( $page_data ); $page_id = wp_insert_post( $page_data );
} else {
$page_data = array(
'ID' => $page_found,
'post_status' => 'publish',
);
$page_id = wp_update_post( $page_data );
} }
if ( $option ) { if ( $option ) {
@ -249,8 +253,7 @@ function wc_save_order_items( $order_id, $items ) {
// Delele blank item meta entries // Delele blank item meta entries
if ( $meta_key === '' && $meta_value === '' ) { if ( $meta_key === '' && $meta_value === '' ) {
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}woocommerce_order_itemmeta WHERE meta_id = %d", $id ) ); $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}woocommerce_order_itemmeta WHERE meta_id = %d", $id ) );
} } else {
else {
$wpdb->update( $wpdb->update(
$wpdb->prefix . 'woocommerce_order_itemmeta', $wpdb->prefix . 'woocommerce_order_itemmeta',
@ -273,7 +276,7 @@ function wc_save_order_items( $order_id, $items ) {
foreach ( $items['shipping_method_id'] as $item_id ) { foreach ( $items['shipping_method_id'] as $item_id ) {
$item_id = absint( $item_id ); $item_id = absint( $item_id );
$method_id = isset( $items['shipping_method'][ $item_id ] ) ? wc_clean( $items['shipping_method'][ $item_id ] ) : ''; $method_id = isset( $items['shipping_method'][ $item_id ] ) ? wc_clean( $items['shipping_method'][ $item_id ] ) : '';
$method_title = isset( $items['shipping_method_title'][ $item_id ] ) ? wc_clean( $items['shipping_method_title'][ $item_id ] ) : ''; $method_title = isset( $items['shipping_method_title'][ $item_id ] ) ? wc_clean( wp_unslash( $items['shipping_method_title'][ $item_id ] ) ) : '';
$cost = isset( $items['shipping_cost'][ $item_id ] ) ? wc_format_decimal( $items['shipping_cost'][ $item_id ] ) : ''; $cost = isset( $items['shipping_cost'][ $item_id ] ) ? wc_format_decimal( $items['shipping_cost'][ $item_id ] ) : '';
$ship_taxes = isset( $items['shipping_taxes'][ $item_id ] ) ? array_map( 'wc_format_decimal', $items['shipping_taxes'][ $item_id ] ) : array(); $ship_taxes = isset( $items['shipping_taxes'][ $item_id ] ) ? array_map( 'wc_format_decimal', $items['shipping_taxes'][ $item_id ] ) : array();

View File

@ -241,7 +241,7 @@ class WC_API_Customers extends WC_API_Resource {
$query = $this->query_customers( $filter ); $query = $this->query_customers( $filter );
return array( 'count' => count( $query->get_results() ) ); return array( 'count' => $query->get_total() );
} catch ( WC_API_Exception $e ) { } catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) ); return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
} }
@ -461,37 +461,20 @@ class WC_API_Customers extends WC_API_Resource {
* @since 2.1 * @since 2.1
* @param int $id the customer ID * @param int $id the customer ID
* @param string $fields fields to include in response * @param string $fields fields to include in response
* @param array $filter filters
* @return array * @return array
*/ */
public function get_customer_orders( $id, $fields = null ) { public function get_customer_orders( $id, $fields = null, $filter = array() ) {
global $wpdb;
$id = $this->validate_request( $id, 'customer', 'read' ); $id = $this->validate_request( $id, 'customer', 'read' );
if ( is_wp_error( $id ) ) { if ( is_wp_error( $id ) ) {
return $id; return $id;
} }
$order_ids = $wpdb->get_col( $wpdb->prepare( "SELECT id $filter['customer_id'] = $id;
FROM $wpdb->posts AS posts $orders = WC()->api->WC_API_Orders->get_orders( $fields, $filter, null, -1 );
LEFT JOIN {$wpdb->postmeta} AS meta on posts.ID = meta.post_id
WHERE meta.meta_key = '_customer_user'
AND meta.meta_value = '%s'
AND posts.post_type = 'shop_order'
AND posts.post_status IN ( '" . implode( "','", array_keys( wc_get_order_statuses() ) ) . "' )
", $id ) );
if ( empty( $order_ids ) ) { return $orders;
return array( 'orders' => array() );
}
$orders = array();
foreach ( $order_ids as $order_id ) {
$orders[] = current( WC()->api->WC_API_Orders->get_order( $order_id, $fields ) );
}
return array( 'orders' => apply_filters( 'woocommerce_api_customer_orders_response', $orders, $id, $fields, $order_ids, $this->server ) );
} }
/** /**
@ -548,6 +531,11 @@ class WC_API_Customers extends WC_API_Resource {
// Custom Role // Custom Role
if ( ! empty( $args['role'] ) ) { if ( ! empty( $args['role'] ) ) {
$query_args['role'] = $args['role']; $query_args['role'] = $args['role'];
// Show users on all roles
if ( 'all' === $query_args['role'] ) {
unset( $query_args['role'] );
}
} }
// Search // Search

View File

@ -232,7 +232,7 @@ class WC_API_Orders extends WC_API_Resource {
foreach ( $meta->get_formatted( $hideprefix ) as $meta_key => $formatted_meta ) { foreach ( $meta->get_formatted( $hideprefix ) as $meta_key => $formatted_meta ) {
$item_meta[] = array( $item_meta[] = array(
'key' => $meta_key, 'key' => $formatted_meta['key'],
'label' => $formatted_meta['label'], 'label' => $formatted_meta['label'],
'value' => $formatted_meta['value'], 'value' => $formatted_meta['value'],
); );
@ -470,12 +470,6 @@ class WC_API_Orders extends WC_API_Resource {
update_post_meta( $order->id, '_order_currency', $data['currency'] ); 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 // set order meta
if ( isset( $data['order_meta'] ) && is_array( $data['order_meta'] ) ) { if ( isset( $data['order_meta'] ) && is_array( $data['order_meta'] ) ) {
$this->set_order_meta( $order->id, $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'] ); 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 items have changed, recalculate order totals
if ( $update_totals ) { if ( $update_totals ) {
$order->calculate_totals(); $order->calculate_totals();
@ -711,13 +699,21 @@ class WC_API_Orders extends WC_API_Resource {
// add status argument // add status argument
if ( ! empty( $args['status'] ) ) { if ( ! empty( $args['status'] ) ) {
$statuses = 'wc-' . str_replace( ',', ',wc-', $args['status'] ); $statuses = 'wc-' . str_replace( ',', ',wc-', $args['status'] );
$statuses = explode( ',', $statuses ); $statuses = explode( ',', $statuses );
$query_args['post_status'] = $statuses; $query_args['post_status'] = $statuses;
unset( $args['status'] ); unset( $args['status'] );
}
if ( ! empty( $args['customer_id'] ) ) {
$query_args['meta_query'] = array(
array(
'key' => '_customer_user',
'value' => absint( $args['customer_id'] ),
'compare' => '='
)
);
} }
$query_args = $this->merge_query_args( $query_args, $args ); $query_args = $this->merge_query_args( $query_args, $args );
@ -1555,18 +1551,19 @@ class WC_API_Orders extends WC_API_Resource {
} }
$line_items[] = array( $line_items[] = array(
'id' => $item_id, 'id' => $item_id,
'subtotal' => wc_format_decimal( $order->get_line_subtotal( $item ), 2 ), 'subtotal' => wc_format_decimal( $order->get_line_subtotal( $item ), 2 ),
'subtotal_tax' => wc_format_decimal( $item['line_subtotal_tax'], 2 ), 'subtotal_tax' => wc_format_decimal( $item['line_subtotal_tax'], 2 ),
'total' => wc_format_decimal( $order->get_line_total( $item ), 2 ), 'total' => wc_format_decimal( $order->get_line_total( $item ), 2 ),
'total_tax' => wc_format_decimal( $order->get_line_tax( $item ), 2 ), 'total_tax' => wc_format_decimal( $order->get_line_tax( $item ), 2 ),
'price' => wc_format_decimal( $order->get_item_total( $item ), 2 ), 'price' => wc_format_decimal( $order->get_item_total( $item ), 2 ),
'quantity' => (int) $item['qty'], 'quantity' => (int) $item['qty'],
'tax_class' => ( ! empty( $item['tax_class'] ) ) ? $item['tax_class'] : null, 'tax_class' => ( ! empty( $item['tax_class'] ) ) ? $item['tax_class'] : null,
'name' => $item['name'], 'name' => $item['name'],
'product_id' => ( isset( $product->variation_id ) ) ? $product->variation_id : $product->id, 'product_id' => ( isset( $product->variation_id ) ) ? $product->variation_id : $product->id,
'sku' => is_object( $product ) ? $product->get_sku() : null, 'sku' => is_object( $product ) ? $product->get_sku() : null,
'meta' => $item_meta, 'meta' => $item_meta,
'refunded_item_id' => (int) $item['refunded_item_id'],
); );
} }

View File

@ -61,14 +61,43 @@ class WC_API_Products extends WC_API_Resource {
array( array( $this, 'get_product_orders' ), WC_API_Server::READABLE ), array( array( $this, 'get_product_orders' ), WC_API_Server::READABLE ),
); );
# GET /products/categories # GET/POST /products/categories
$routes[ $this->base . '/categories' ] = array( $routes[ $this->base . '/categories' ] = array(
array( array( $this, 'get_product_categories' ), WC_API_Server::READABLE ), array( array( $this, 'get_product_categories' ), WC_API_Server::READABLE ),
array( array( $this, 'create_product_category' ), WC_API_Server::CREATABLE | WC_API_Server::ACCEPT_DATA ),
); );
# GET /products/categories/<id> # GET/PUT/DELETE /products/categories/<id>
$routes[ $this->base . '/categories/(?P<id>\d+)' ] = array( $routes[ $this->base . '/categories/(?P<id>\d+)' ] = array(
array( array( $this, 'get_product_category' ), WC_API_Server::READABLE ), array( array( $this, 'get_product_category' ), WC_API_Server::READABLE ),
array( array( $this, 'edit_product_category' ), WC_API_Server::EDITABLE | WC_API_Server::ACCEPT_DATA ),
array( array( $this, 'delete_product_category' ), WC_API_Server::DELETABLE ),
);
# GET/POST /products/tags
$routes[ $this->base . '/tags' ] = array(
array( array( $this, 'get_product_tags' ), WC_API_Server::READABLE ),
array( array( $this, 'create_product_tag' ), WC_API_Server::CREATABLE | WC_API_Server::ACCEPT_DATA ),
);
# GET/PUT/DELETE /products/tags/<id>
$routes[ $this->base . '/tags/(?P<id>\d+)' ] = array(
array( array( $this, 'get_product_tag' ), WC_API_Server::READABLE ),
array( array( $this, 'edit_product_tag' ), WC_API_Server::EDITABLE | WC_API_Server::ACCEPT_DATA ),
array( array( $this, 'delete_product_tag' ), WC_API_Server::DELETABLE ),
);
# GET/POST /products/shipping_classes
$routes[ $this->base . '/shipping_classes' ] = array(
array( array( $this, 'get_product_shipping_classes' ), WC_API_Server::READABLE ),
array( array( $this, 'create_product_shipping_class' ), WC_API_Server::CREATABLE | WC_API_Server::ACCEPT_DATA ),
);
# GET/PUT/DELETE /products/shipping_classes/<id>
$routes[ $this->base . '/shipping_classes/(?P<id>\d+)' ] = array(
array( array( $this, 'get_product_shipping_class' ), WC_API_Server::READABLE ),
array( array( $this, 'edit_product_shipping_class' ), WC_API_Server::EDITABLE | WC_API_Server::ACCEPT_DATA ),
array( array( $this, 'delete_product_shipping_class' ), WC_API_Server::DELETABLE ),
); );
# GET/POST /products/attributes # GET/POST /products/attributes
@ -151,16 +180,24 @@ class WC_API_Products extends WC_API_Resource {
// add variations to variable products // add variations to variable products
if ( $product->is_type( 'variable' ) && $product->has_child() ) { if ( $product->is_type( 'variable' ) && $product->has_child() ) {
$product_data['variations'] = $this->get_variation_data( $product ); $product_data['variations'] = $this->get_variation_data( $product );
} }
// add the parent product data to an individual variation // add the parent product data to an individual variation
if ( $product->is_type( 'variation' ) && $product->parent ) { if ( $product->is_type( 'variation' ) && $product->parent ) {
$product_data['parent'] = $this->get_product_data( $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 ) ); return array( 'product' => apply_filters( 'woocommerce_api_product_response', $product_data, $product, $fields, $this->server ) );
} }
@ -557,6 +594,388 @@ class WC_API_Products extends WC_API_Resource {
} }
} }
/**
* Create a new product category.
*
* @since 2.5.0
* @param array $data Posted data
* @return array|WP_Error Product category if succeed, otherwise WP_Error
* will be returned
*/
public function create_product_category( $data ) {
global $wpdb;
try {
if ( ! isset( $data['product_category'] ) ) {
throw new WC_API_Exception( 'woocommerce_api_missing_product_category_data', sprintf( __( 'No %1$s data specified to create %1$s', 'woocommerce' ), 'product_category' ), 400 );
}
// Check permissions
if ( ! current_user_can( 'manage_product_terms' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_product_category', __( 'You do not have permission to create product categories', 'woocommerce' ), 401 );
}
$defaults = array(
'name' => '',
'slug' => '',
'description' => '',
'parent' => 0,
'display' => 'default',
'image' => '',
);
$data = wp_parse_args( $data['product_category'], $defaults );
$data = apply_filters( 'woocommerce_api_create_product_category_data', $data, $this );
$name = $data['name'];
unset( $data['name'] );
// Check parent.
$data['parent'] = absint( $data['parent'] );
if ( $data['parent'] ) {
$parent = get_term_by( 'term_taxonomy_id', $data['parent'], 'product_cat' );
if ( ! $parent ) {
throw new WC_API_Exception( 'woocommerce_api_invalid_product_category_parent', __( 'Product category parent is invalid', 'woocommerce' ), 400 );
}
}
$display_type = $data['display'];
unset( $data['display'] );
// If value of image is numeric, assume value as image_id.
$image = $data['image'];
if ( is_numeric( $image ) ) {
$image_id = absint( $image );
} else if ( ! empty( $image ) ) {
$upload = $this->upload_product_image( esc_url_raw( $image ) );
$image_id = $this->set_product_category_image_as_attachment( $upload );
}
unset( $data['image'] );
$insert = wp_insert_term( $name, 'product_cat', $data );
if ( is_wp_error( $insert ) ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_create_product_category', $insert->get_error_message(), 400 );
}
update_woocommerce_term_meta( $insert['term_taxonomy_id'], 'display_type', esc_attr( $display_type ) );
// Check if image_id is a valid image attachment before updating the term meta.
if ( wp_attachment_is_image( $image_id ) ) {
update_woocommerce_term_meta( $insert['term_taxonomy_id'], 'thumbnail_id', $image_id );
}
do_action( 'woocommerce_api_create_product_category', $insert['term_taxonomy_id'], $data );
$this->server->send_status( 201 );
return $this->get_product_category( $insert['term_taxonomy_id'] );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Edit a product category.
*
* @since 2.5.0
* @param int $id Product category term ID
* @param array $data Posted data
* @return array|WP_Error Product category if succeed, otherwise WP_Error
* will be returned
*/
public function edit_product_category( $id, $data ) {
global $wpdb;
try {
if ( ! isset( $data['product_category'] ) ) {
throw new WC_API_Exception( 'woocommerce_api_missing_product_category', sprintf( __( 'No %1$s data specified to edit %1$s', 'woocommerce' ), 'product_category' ), 400 );
}
$id = absint( $id );
$data = $data['product_category'];
// Check permissions.
if ( ! current_user_can( 'manage_product_terms' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_edit_product_category', __( 'You do not have permission to edit product categories', 'woocommerce' ), 401 );
}
$data = apply_filters( 'woocommerce_api_edit_product_category_data', $data, $this );
$category = $this->get_product_category( $id );
if ( is_wp_error( $category ) ) {
return $category;
}
$display_type = '';
if ( isset( $data['display'] ) ) {
$display_type = $data['display'];
unset( $data['display'] );
}
if ( isset( $data['image'] ) ) {
// If value of image is numeric, assume value as image_id.
$image = $data['image'];
if ( is_numeric( $image ) ) {
$image_id = absint( $image );
} else if ( ! empty( $image ) ) {
$upload = $this->upload_product_image( esc_url_raw( $image ) );
$image_id = $this->set_product_category_image_as_attachment( $upload );
}
// In case client supplies invalid image or wants to unset category
// image.
if ( ! wp_attachment_is_image( $image_id ) ) {
$image_id = '';
}
unset( $data['image'] );
}
$update = wp_update_term( $id, 'product_cat', $data );
if ( is_wp_error( $update ) ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_edit_product_catgory', __( 'Could not edit the category', 'woocommerce' ), 400 );
}
if ( ! empty( $display_type ) ) {
update_woocommerce_term_meta( $update['term_taxonomy_id'], 'display_type', esc_attr( $display_type ) );
}
if ( isset( $image_id ) ) {
update_woocommerce_term_meta( $update['term_taxonomy_id'], 'thumbnail_id', $image_id );
}
do_action( 'woocommerce_api_edit_product_category', $id, $data );
return $this->get_product_category( $id );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Delete a product category.
*
* @since 2.5.0
* @param int $id Product category term ID
* @return array|WP_Error Success message if succeed, otherwise WP_Error
* will be returned
*/
public function delete_product_category( $id ) {
global $wpdb;
try {
// Check permissions
if ( ! current_user_can( 'manage_product_terms' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_delete_product_category', __( 'You do not have permission to delete product category', 'woocommerce' ), 401 );
}
$id = absint( $id );
$deleted = wp_delete_term( $id, 'product_cat' );
if ( ! $deleted || is_wp_error( $deleted ) ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_delete_product_category', __( 'Could not delete the category', 'woocommerce' ), 401 );
}
// When a term is deleted, delete its meta.
$wpdb->delete( $wpdb->woocommerce_termmeta, array( 'woocommerce_term_id' => $id ), array( '%d' ) );
do_action( 'woocommerce_api_delete_product_category', $id, $this );
return array( 'message' => sprintf( __( 'Deleted %s', 'woocommerce' ), 'product_category' ) );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Get a listing of product tags.
*
* @since 2.5.0
* @param string|null $fields Fields to limit response to
* @return array Product tags
*/
public function get_product_tags( $fields = null ) {
try {
// Permissions check
if ( ! current_user_can( 'manage_product_terms' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_read_product_tags', __( 'You do not have permission to read product tags', 'woocommerce' ), 401 );
}
$product_tags = array();
$terms = get_terms( 'product_tag', array( 'hide_empty' => false, 'fields' => 'ids' ) );
foreach ( $terms as $term_id ) {
$product_tags[] = current( $this->get_product_tag( $term_id, $fields ) );
}
return array( 'product_tags' => apply_filters( 'woocommerce_api_product_tags_response', $product_tags, $terms, $fields, $this ) );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Get the product tag for the given ID.
*
* @since 2.5.0
* @param string $id Product tag term ID
* @param string|null $fields Fields to limit response to
* @return array Product tag
*/
public function get_product_tag( $id, $fields = null ) {
try {
$id = absint( $id );
// Validate ID
if ( empty( $id ) ) {
throw new WC_API_Exception( 'woocommerce_api_invalid_product_tag_id', __( 'Invalid product tag ID', 'woocommerce' ), 400 );
}
// Permissions check
if ( ! current_user_can( 'manage_product_terms' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_read_product_tags', __( 'You do not have permission to read product tags', 'woocommerce' ), 401 );
}
$term = get_term( $id, 'product_tag' );
if ( is_wp_error( $term ) || is_null( $term ) ) {
throw new WC_API_Exception( 'woocommerce_api_invalid_product_tag_id', __( 'A product tag with the provided ID could not be found', 'woocommerce' ), 404 );
}
$term_id = intval( $term->term_id );
$tag = array(
'id' => $term_id,
'name' => $term->name,
'slug' => $term->slug,
'description' => $term->description,
'count' => intval( $term->count )
);
return array( 'product_tag' => apply_filters( 'woocommerce_api_product_tag_response', $tag, $id, $fields, $term, $this ) );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Create a new product tag.
*
* @since 2.5.0
* @param array $data Posted data
* @return array|WP_Error Product tag if succeed, otherwise WP_Error
* will be returned
*/
public function create_product_tag( $data ) {
try {
if ( ! isset( $data['product_tag'] ) ) {
throw new WC_API_Exception( 'woocommerce_api_missing_product_tag_data', sprintf( __( 'No %1$s data specified to create %1$s', 'woocommerce' ), 'product_tag' ), 400 );
}
// Check permissions
if ( ! current_user_can( 'manage_product_terms' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_product_tag', __( 'You do not have permission to create product tags', 'woocommerce' ), 401 );
}
$defaults = array(
'name' => '',
'slug' => '',
'description' => '',
);
$data = wp_parse_args( $data['product_tag'], $defaults );
$data = apply_filters( 'woocommerce_api_create_product_tag_data', $data, $this );
$name = $data['name'];
unset( $data['name'] );
$insert = wp_insert_term( $name, 'product_tag', $data );
if ( is_wp_error( $insert ) ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_create_product_tag', $insert->get_error_message(), 400 );
}
do_action( 'woocommerce_api_create_product_tag', $insert['term_taxonomy_id'], $data );
$this->server->send_status( 201 );
return $this->get_product_tag( $insert['term_taxonomy_id'] );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Edit a product tag.
*
* @since 2.5.0
* @param int $id Product tag term ID
* @param array $data Posted data
* @return array|WP_Error Product tag if succeed, otherwise WP_Error
* will be returned
*/
public function edit_product_tag( $id, $data ) {
try {
if ( ! isset( $data['product_tag'] ) ) {
throw new WC_API_Exception( 'woocommerce_api_missing_product_tag', sprintf( __( 'No %1$s data specified to edit %1$s', 'woocommerce' ), 'product_tag' ), 400 );
}
$id = absint( $id );
$data = $data['product_tag'];
// Check permissions.
if ( ! current_user_can( 'manage_product_terms' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_edit_product_tag', __( 'You do not have permission to edit product tags', 'woocommerce' ), 401 );
}
$data = apply_filters( 'woocommerce_api_edit_product_tag_data', $data, $this );
$tag = $this->get_product_tag( $id );
if ( is_wp_error( $tag ) ) {
return $tag;
}
$update = wp_update_term( $id, 'product_tag', $data );
if ( is_wp_error( $update ) ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_edit_product_tag', __( 'Could not edit the tag', 'woocommerce' ), 400 );
}
do_action( 'woocommerce_api_edit_product_tag', $id, $data );
return $this->get_product_tag( $id );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Delete a product tag.
*
* @since 2.5.0
* @param int $id Product tag term ID
* @return array|WP_Error Success message if succeed, otherwise WP_Error
* will be returned
*/
public function delete_product_tag( $id ) {
try {
// Check permissions
if ( ! current_user_can( 'manage_product_terms' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_delete_product_tag', __( 'You do not have permission to delete product tag', 'woocommerce' ), 401 );
}
$id = absint( $id );
$deleted = wp_delete_term( $id, 'product_tag' );
if ( ! $deleted || is_wp_error( $deleted ) ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_delete_product_tag', __( 'Could not delete the tag', 'woocommerce' ), 401 );
}
do_action( 'woocommerce_api_delete_product_tag', $id, $this );
return array( 'message' => sprintf( __( 'Deleted %s', 'woocommerce' ), 'product_tag' ) );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/** /**
* Helper method to get product post objects * Helper method to get product post objects
* *
@ -574,24 +993,40 @@ class WC_API_Products extends WC_API_Resource {
'meta_query' => array(), 'meta_query' => array(),
); );
if ( ! empty( $args['type'] ) ) { // Taxonomy query to filter products by type, category, tag, shipping class, and
// attribute.
$tax_query = array();
$types = explode( ',', $args['type'] ); // Map between taxonomy name and arg's key.
$taxonomies_arg_map = array(
'product_type' => 'type',
'product_cat' => 'category',
'product_tag' => 'tag',
'product_shipping_class' => 'shipping_class',
);
$query_args['tax_query'] = array( // Add attribute taxonomy names into the map.
array( foreach ( wc_get_attribute_taxonomy_names() as $attribute_name ) {
'taxonomy' => 'product_type', $taxonomies_arg_map[ $attribute_name ] = $attribute_name;
'field' => 'slug',
'terms' => $types,
),
);
unset( $args['type'] );
} }
// Filter products by category // Set tax_query for each passed arg.
if ( ! empty( $args['category'] ) ) { foreach ( $taxonomies_arg_map as $tax_name => $arg ) {
$query_args['product_cat'] = $args['category']; if ( ! empty( $args[ $arg ] ) ) {
$terms = explode( ',', $args[ $arg ] );
$tax_query[] = array(
'taxonomy' => $tax_name,
'field' => 'slug',
'terms' => $terms,
);
unset( $args[ $arg ] );
}
}
if ( ! empty( $tax_query ) ) {
$query_args['tax_query'] = $tax_query;
} }
// Filter by specific sku // Filter by specific sku
@ -676,7 +1111,7 @@ class WC_API_Products extends WC_API_Resource {
'categories' => wp_get_post_terms( $product->id, 'product_cat', array( 'fields' => 'names' ) ), 'categories' => wp_get_post_terms( $product->id, 'product_cat', array( 'fields' => 'names' ) ),
'tags' => wp_get_post_terms( $product->id, 'product_tag', array( 'fields' => 'names' ) ), 'tags' => wp_get_post_terms( $product->id, 'product_tag', array( 'fields' => 'names' ) ),
'images' => $this->get_images( $product ), '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 ), 'attributes' => $this->get_attributes( $product ),
'downloads' => $this->get_downloads( $product ), 'downloads' => $this->get_downloads( $product ),
'download_limit' => (int) $product->download_limit, 'download_limit' => (int) $product->download_limit,
@ -686,6 +1121,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, 'total_sales' => metadata_exists( 'post', $product->id, 'total_sales' ) ? (int) get_post_meta( $product->id, 'total_sales', true ) : 0,
'variations' => array(), 'variations' => array(),
'parent' => array(), 'parent' => array(),
'grouped_products' => array(),
); );
} }
@ -749,6 +1185,31 @@ class WC_API_Products extends WC_API_Resource {
return $variations; 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 * Save product meta
* *
@ -859,7 +1320,7 @@ class WC_API_Products extends WC_API_Resource {
// Text based attributes - Posted values are term names - don't change to slugs // Text based attributes - Posted values are term names - don't change to slugs
} else { } else {
$values = array_map( 'stripslashes', array_map( 'strip_tags', explode( WC_DELIMITER, $attribute['options'] ) ) ); $values = array_map( 'wc_sanitize_term_text_based', explode( WC_DELIMITER, $attribute['options'] ) );
} }
$values = array_filter( $values, 'strlen' ); $values = array_filter( $values, 'strlen' );
@ -1091,7 +1552,12 @@ class WC_API_Products extends WC_API_Resource {
// Stock quantity // Stock quantity
if ( isset( $data['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 { } else {
@ -1349,6 +1815,11 @@ class WC_API_Products extends WC_API_Resource {
if ( isset( $variation['stock_quantity'] ) ) { if ( isset( $variation['stock_quantity'] ) ) {
wc_update_product_stock( $variation_id, wc_stock_amount( $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 { } else {
delete_post_meta( $variation_id, '_backorders' ); delete_post_meta( $variation_id, '_backorders' );
@ -1450,13 +1921,16 @@ class WC_API_Products extends WC_API_Resource {
continue; continue;
} }
$taxonomy = sanitize_title( $attribute['name'] );
$_attribute = array(); $_attribute = array();
if ( isset( $attribute['slug'] ) ) { if ( isset( $attribute['slug'] ) ) {
$taxonomy = $this->get_attribute_taxonomy_by_slug( $attribute['slug'] ); $taxonomy = $this->get_attribute_taxonomy_by_slug( $attribute['slug'] );
} }
if ( ! $taxonomy ) {
$taxonomy = sanitize_title( $attribute['name'] );
}
if ( isset( $attributes[ $taxonomy ] ) ) { if ( isset( $attributes[ $taxonomy ] ) ) {
$_attribute = $attributes[ $taxonomy ]; $_attribute = $attributes[ $taxonomy ];
} }
@ -1768,6 +2242,16 @@ class WC_API_Products extends WC_API_Resource {
$gallery[] = $attachment_id; $gallery[] = $attachment_id;
} }
} }
// Set the image alt if present.
if ( ! empty( $image['alt'] ) ) {
update_post_meta( $attachment_id, '_wp_attachment_image_alt', wc_clean( $image['alt'] ) );
}
// Set the image title if present.
if ( ! empty( $image['title'] ) ) {
wp_update_post( array( 'ID' => $attachment_id, 'post_title' => $image['title'] ) );
}
} }
if ( ! empty( $gallery ) ) { if ( ! empty( $gallery ) ) {
@ -1787,13 +2271,38 @@ class WC_API_Products extends WC_API_Resource {
* @return int|WP_Error attachment id * @return int|WP_Error attachment id
*/ */
public function upload_product_image( $image_url ) { public function upload_product_image( $image_url ) {
return $this->upload_image_from_url( $image_url );
}
/**
* Upload product category image from URL.
*
* @since 2.5.0
* @param string $image_url
* @return int|WP_Error attachment id
*/
public function upload_product_category_image( $image_url ) {
return $this->upload_image_from_url( $image_url, 'product_category_image' );
}
/**
* Upload image from URL.
*
* @throws WC_API_Exception
*
* @since 2.5.0
* @param string $image_url
* @param string $upload_for
* @return int|WP_Error Attachment id
*/
protected function upload_image_from_url( $image_url, $upload_for = 'product_image' ) {
$file_name = basename( current( explode( '?', $image_url ) ) ); $file_name = basename( current( explode( '?', $image_url ) ) );
$wp_filetype = wp_check_filetype( $file_name, null ); $wp_filetype = wp_check_filetype( $file_name, null );
$parsed_url = @parse_url( $image_url ); $parsed_url = @parse_url( $image_url );
// Check parsed URL // Check parsed URL.
if ( ! $parsed_url || ! is_array( $parsed_url ) ) { if ( ! $parsed_url || ! is_array( $parsed_url ) ) {
throw new WC_API_Exception( 'woocommerce_api_invalid_product_image', sprintf( __( 'Invalid URL %s', 'woocommerce' ), $image_url ), 400 ); throw new WC_API_Exception( 'woocommerce_api_invalid_' . $upload_for, sprintf( __( 'Invalid URL %s', 'woocommerce' ), $image_url ), 400 );
} }
// Ensure url is valid // Ensure url is valid
@ -1805,7 +2314,7 @@ class WC_API_Products extends WC_API_Resource {
) ); ) );
if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) { if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
throw new WC_API_Exception( 'woocommerce_api_invalid_remote_product_image', sprintf( __( 'Error getting remote image %s', 'woocommerce' ), $image_url ), 400 ); throw new WC_API_Exception( 'woocommerce_api_invalid_remote_' . $upload_for, sprintf( __( 'Error getting remote image %s', 'woocommerce' ), $image_url ), 400 );
} }
// Ensure we have a file name and type // Ensure we have a file name and type
@ -1825,7 +2334,7 @@ class WC_API_Products extends WC_API_Resource {
$upload = wp_upload_bits( $file_name, '', wp_remote_retrieve_body( $response ) ); $upload = wp_upload_bits( $file_name, '', wp_remote_retrieve_body( $response ) );
if ( $upload['error'] ) { if ( $upload['error'] ) {
throw new WC_API_Exception( 'woocommerce_api_product_image_upload_error', $upload['error'], 400 ); throw new WC_API_Exception( 'woocommerce_api_' . $upload_for . '_upload_error', $upload['error'], 400 );
} }
// Get filesize // Get filesize
@ -1834,7 +2343,7 @@ class WC_API_Products extends WC_API_Resource {
if ( 0 == $filesize ) { if ( 0 == $filesize ) {
@unlink( $upload['file'] ); @unlink( $upload['file'] );
unset( $upload ); unset( $upload );
throw new WC_API_Exception( 'woocommerce_api_product_image_upload_file_error', __( 'Zero size file downloaded', 'woocommerce' ), 400 ); throw new WC_API_Exception( 'woocommerce_api_' . $upload_for . '_upload_file_error', __( 'Zero size file downloaded', 'woocommerce' ), 400 );
} }
unset( $response ); unset( $response );
@ -1843,7 +2352,7 @@ class WC_API_Products extends WC_API_Resource {
} }
/** /**
* Get product image as attachment * Sets product image as attachment and returns the attachment ID.
* *
* @since 2.2 * @since 2.2
* @param integer $upload * @param integer $upload
@ -1851,6 +2360,29 @@ class WC_API_Products extends WC_API_Resource {
* @return int * @return int
*/ */
protected function set_product_image_as_attachment( $upload, $id ) { protected function set_product_image_as_attachment( $upload, $id ) {
return $this->set_uploaded_image_as_attachment( $upload, $id );
}
/**
* Sets uploaded category image as attachment and returns the attachment ID.
*
* @since 2.5.0
* @param integer $upload Upload information from wp_upload_bits
* @return int Attachment ID
*/
protected function set_product_category_image_as_attachment( $upload ) {
return $this->set_uploaded_image_as_attachment( $upload );
}
/**
* Set uploaded image as attachment.
*
* @since 2.5.0
* @param array $upload Upload information from wp_upload_bits
* @param int $id Post ID. Default to 0.
* @return int Attachment ID
*/
protected function set_uploaded_image_as_attachment( $upload, $id = 0 ) {
$info = wp_check_filetype( $upload['file'] ); $info = wp_check_filetype( $upload['file'] );
$title = ''; $title = '';
$content = ''; $content = '';
@ -2394,4 +2926,211 @@ class WC_API_Products extends WC_API_Resource {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) ); return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
} }
} }
/**
* Get a listing of product shipping classes.
*
* @since 2.5.0
* @param string|null $fields Fields to limit response to
* @return array|WP_Error List of product shipping classes if succeed,
* otherwise WP_Error will be returned
*/
public function get_product_shipping_classes( $fields = null ) {
try {
// Permissions check
if ( ! current_user_can( 'manage_product_terms' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_read_product_shipping_classes', __( 'You do not have permission to read product shipping classes', 'woocommerce' ), 401 );
}
$product_shipping_classes = array();
$terms = get_terms( 'product_shipping_class', array( 'hide_empty' => false, 'fields' => 'ids' ) );
foreach ( $terms as $term_id ) {
$product_shipping_classes[] = current( $this->get_product_shipping_class( $term_id, $fields ) );
}
return array( 'product_shipping_classes' => apply_filters( 'woocommerce_api_product_shipping_classes_response', $product_shipping_classes, $terms, $fields, $this ) );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Get the product shipping class for the given ID.
*
* @since 2.5.0
* @param string $id Product shipping class term ID
* @param string|null $fields Fields to limit response to
* @return array|WP_Error Product shipping class if succeed, otherwise
* WP_Error will be returned
*/
public function get_product_shipping_class( $id, $fields = null ) {
try {
$id = absint( $id );
if ( ! $id ) {
throw new WC_API_Exception( 'woocommerce_api_invalid_product_shipping_class_id', __( 'Invalid product shipping class ID', 'woocommerce' ), 400 );
}
// Permissions check
if ( ! current_user_can( 'manage_product_terms' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_read_product_shipping_classes', __( 'You do not have permission to read product shipping classes', 'woocommerce' ), 401 );
}
$term = get_term( $id, 'product_shipping_class' );
if ( is_wp_error( $term ) || is_null( $term ) ) {
throw new WC_API_Exception( 'woocommerce_api_invalid_product_shipping_class_id', __( 'A product shipping class with the provided ID could not be found', 'woocommerce' ), 404 );
}
$term_id = intval( $term->term_id );
$product_shipping_class = array(
'id' => $term_id,
'name' => $term->name,
'slug' => $term->slug,
'parent' => $term->parent,
'description' => $term->description,
'count' => intval( $term->count )
);
return array( 'product_shipping_class' => apply_filters( 'woocommerce_api_product_shipping_class_response', $product_shipping_class, $id, $fields, $term, $this ) );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Create a new product shipping class.
*
* @since 2.5.0
* @param array $data Posted data
* @return array|WP_Error Product shipping class if succeed, otherwise
* WP_Error will be returned
*/
public function create_product_shipping_class( $data ) {
global $wpdb;
try {
if ( ! isset( $data['product_shipping_class'] ) ) {
throw new WC_API_Exception( 'woocommerce_api_missing_product_shipping_class_data', sprintf( __( 'No %1$s data specified to create %1$s', 'woocommerce' ), 'product_shipping_class' ), 400 );
}
// Check permissions
if ( ! current_user_can( 'manage_product_terms' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_product_shipping_class', __( 'You do not have permission to create product shipping classes', 'woocommerce' ), 401 );
}
$defaults = array(
'name' => '',
'slug' => '',
'description' => '',
'parent' => 0,
);
$data = wp_parse_args( $data['product_shipping_class'], $defaults );
$data = apply_filters( 'woocommerce_api_create_product_shipping_class_data', $data, $this );
$name = $data['name'];
unset( $data['name'] );
// Check parent.
$data['parent'] = absint( $data['parent'] );
if ( $data['parent'] ) {
$parent = get_term_by( 'term_taxonomy_id', $data['parent'], 'product_shipping_class' );
if ( ! $parent ) {
throw new WC_API_Exception( 'woocommerce_api_invalid_product_shipping_class_parent', __( 'Product shipping class parent is invalid', 'woocommerce' ), 400 );
}
}
$insert = wp_insert_term( $name, 'product_shipping_class', $data );
if ( is_wp_error( $insert ) ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_create_product_shipping_class', $insert->get_error_message(), 400 );
}
do_action( 'woocommerce_api_create_product_shipping_class', $insert['term_taxonomy_id'], $data );
$this->server->send_status( 201 );
return $this->get_product_shipping_class( $insert['term_taxonomy_id'] );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Edit a product shipping class.
*
* @since 2.5.0
* @param int $id Product shipping class term ID
* @param array $data Posted data
* @return array|WP_Error Product shipping class if succeed, otherwise
* WP_Error will be returned
*/
public function edit_product_shipping_class( $id, $data ) {
global $wpdb;
try {
if ( ! isset( $data['product_shipping_class'] ) ) {
throw new WC_API_Exception( 'woocommerce_api_missing_product_shipping_class', sprintf( __( 'No %1$s data specified to edit %1$s', 'woocommerce' ), 'product_shipping_class' ), 400 );
}
$id = absint( $id );
$data = $data['product_shipping_class'];
// Check permissions
if ( ! current_user_can( 'manage_product_terms' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_edit_product_shipping_class', __( 'You do not have permission to edit product shipping classes', 'woocommerce' ), 401 );
}
$data = apply_filters( 'woocommerce_api_edit_product_shipping_class_data', $data, $this );
$shipping_class = $this->get_product_shipping_class( $id );
if ( is_wp_error( $shipping_class ) ) {
return $shipping_class;
}
$update = wp_update_term( $id, 'product_shipping_class', $data );
if ( is_wp_error( $update ) ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_edit_product_shipping_class', __( 'Could not edit the shipping class', 'woocommerce' ), 400 );
}
do_action( 'woocommerce_api_edit_product_shipping_class', $id, $data );
return $this->get_product_shipping_class( $id );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
/**
* Delete a product shipping class.
*
* @since 2.5.0
* @param int $id Product shipping class term ID
* @return array|WP_Error Success message if succeed, otherwise WP_Error
* will be returned
*/
public function delete_product_shipping_class( $id ) {
global $wpdb;
try {
// Check permissions
if ( ! current_user_can( 'manage_product_terms' ) ) {
throw new WC_API_Exception( 'woocommerce_api_user_cannot_delete_product_shipping_class', __( 'You do not have permission to delete product shipping classes', 'woocommerce' ), 401 );
}
$id = absint( $id );
$deleted = wp_delete_term( $id, 'product_shipping_class' );
if ( ! $deleted || is_wp_error( $deleted ) ) {
throw new WC_API_Exception( 'woocommerce_api_cannot_delete_product_shipping_class', __( 'Could not delete the shipping class', 'woocommerce' ), 401 );
}
do_action( 'woocommerce_api_delete_product_shipping_class', $id, $this );
return array( 'message' => sprintf( __( 'Deleted %s', 'woocommerce' ), 'product_shipping_class' ) );
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
}
}
} }

View File

@ -646,6 +646,11 @@ class WC_API_Server {
* @return string * @return string
*/ */
public function get_raw_data() { public function get_raw_data() {
// $HTTP_RAW_POST_DATA is deprecated on PHP 5.6
if ( function_exists( 'phpversion' ) && version_compare( phpversion(), '5.6', '>=' ) ) {
return file_get_contents( 'php://input' );
}
global $HTTP_RAW_POST_DATA; global $HTTP_RAW_POST_DATA;
// A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default, // A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,

View File

@ -609,11 +609,16 @@ class WC_API_Server {
* @return string * @return string
*/ */
public function get_raw_data() { public function get_raw_data() {
// $HTTP_RAW_POST_DATA is deprecated on PHP 5.6
if ( function_exists( 'phpversion' ) && version_compare( phpversion(), '5.6', '>=' ) ) {
return file_get_contents( 'php://input' );
}
global $HTTP_RAW_POST_DATA; global $HTTP_RAW_POST_DATA;
// A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default, // A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,
// but we can do it ourself. // but we can do it ourself.
if ( !isset( $HTTP_RAW_POST_DATA ) ) { if ( ! isset( $HTTP_RAW_POST_DATA ) ) {
$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' ); $HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
} }

View File

@ -241,7 +241,7 @@ class WC_API_Customers extends WC_API_Resource {
$query = $this->query_customers( $filter ); $query = $this->query_customers( $filter );
return array( 'count' => count( $query->get_results() ) ); return array( 'count' => $query->get_total() );
} catch ( WC_API_Exception $e ) { } catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) ); return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
} }

View File

@ -232,7 +232,7 @@ class WC_API_Orders extends WC_API_Resource {
foreach ( $meta->get_formatted( $hideprefix ) as $meta_key => $formatted_meta ) { foreach ( $meta->get_formatted( $hideprefix ) as $meta_key => $formatted_meta ) {
$item_meta[] = array( $item_meta[] = array(
'key' => $meta_key, 'key' => $formatted_meta['key'],
'label' => $formatted_meta['label'], 'label' => $formatted_meta['label'],
'value' => $formatted_meta['value'], 'value' => $formatted_meta['value'],
); );
@ -470,12 +470,6 @@ class WC_API_Orders extends WC_API_Resource {
update_post_meta( $order->id, '_order_currency', $data['currency'] ); 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 // set order meta
if ( isset( $data['order_meta'] ) && is_array( $data['order_meta'] ) ) { if ( isset( $data['order_meta'] ) && is_array( $data['order_meta'] ) ) {
$this->set_order_meta( $order->id, $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'] ); 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 items have changed, recalculate order totals
if ( $update_totals ) { if ( $update_totals ) {
$order->calculate_totals(); $order->calculate_totals();
@ -1554,18 +1542,19 @@ class WC_API_Orders extends WC_API_Resource {
} }
$line_items[] = array( $line_items[] = array(
'id' => $item_id, 'id' => $item_id,
'subtotal' => wc_format_decimal( $order->get_line_subtotal( $item ), 2 ), 'subtotal' => wc_format_decimal( $order->get_line_subtotal( $item ), 2 ),
'subtotal_tax' => wc_format_decimal( $item['line_subtotal_tax'], 2 ), 'subtotal_tax' => wc_format_decimal( $item['line_subtotal_tax'], 2 ),
'total' => wc_format_decimal( $order->get_line_total( $item ), 2 ), 'total' => wc_format_decimal( $order->get_line_total( $item ), 2 ),
'total_tax' => wc_format_decimal( $order->get_line_tax( $item ), 2 ), 'total_tax' => wc_format_decimal( $order->get_line_tax( $item ), 2 ),
'price' => wc_format_decimal( $order->get_item_total( $item ), 2 ), 'price' => wc_format_decimal( $order->get_item_total( $item ), 2 ),
'quantity' => (int) $item['qty'], 'quantity' => (int) $item['qty'],
'tax_class' => ( ! empty( $item['tax_class'] ) ) ? $item['tax_class'] : null, 'tax_class' => ( ! empty( $item['tax_class'] ) ) ? $item['tax_class'] : null,
'name' => $item['name'], 'name' => $item['name'],
'product_id' => ( isset( $product->variation_id ) ) ? $product->variation_id : $product->id, 'product_id' => ( isset( $product->variation_id ) ) ? $product->variation_id : $product->id,
'sku' => is_object( $product ) ? $product->get_sku() : null, 'sku' => is_object( $product ) ? $product->get_sku() : null,
'meta' => $item_meta, 'meta' => $item_meta,
'refunded_item_id' => (int) $item['refunded_item_id'],
); );
} }

View File

@ -681,7 +681,7 @@ class WC_API_Products extends WC_API_Resource {
'categories' => wp_get_post_terms( $product->id, 'product_cat', array( 'fields' => 'names' ) ), 'categories' => wp_get_post_terms( $product->id, 'product_cat', array( 'fields' => 'names' ) ),
'tags' => wp_get_post_terms( $product->id, 'product_tag', array( 'fields' => 'names' ) ), 'tags' => wp_get_post_terms( $product->id, 'product_tag', array( 'fields' => 'names' ) ),
'images' => $this->get_images( $product ), '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 ), 'attributes' => $this->get_attributes( $product ),
'downloads' => $this->get_downloads( $product ), 'downloads' => $this->get_downloads( $product ),
'download_limit' => (int) $product->download_limit, 'download_limit' => (int) $product->download_limit,
@ -864,7 +864,7 @@ class WC_API_Products extends WC_API_Resource {
// Text based attributes - Posted values are term names - don't change to slugs // Text based attributes - Posted values are term names - don't change to slugs
} else { } else {
$values = array_map( 'stripslashes', array_map( 'strip_tags', explode( WC_DELIMITER, $attribute['options'] ) ) ); $values = array_map( 'wc_sanitize_term_text_based', explode( WC_DELIMITER, $attribute['options'] ) );
} }
$values = array_filter( $values, 'strlen' ); $values = array_filter( $values, 'strlen' );
@ -1455,13 +1455,16 @@ class WC_API_Products extends WC_API_Resource {
continue; continue;
} }
$taxonomy = sanitize_title( $attribute['name'] );
$_attribute = array(); $_attribute = array();
if ( isset( $attribute['slug'] ) ) { if ( isset( $attribute['slug'] ) ) {
$taxonomy = $this->get_attribute_taxonomy_by_slug( $attribute['slug'] ); $taxonomy = $this->get_attribute_taxonomy_by_slug( $attribute['slug'] );
} }
if ( ! $taxonomy ) {
$taxonomy = sanitize_title( $attribute['name'] );
}
if ( isset( $attributes[ $taxonomy ] ) ) { if ( isset( $attributes[ $taxonomy ] ) ) {
$_attribute = $attributes[ $taxonomy ]; $_attribute = $attributes[ $taxonomy ];
} }

View File

@ -646,6 +646,11 @@ class WC_API_Server {
* @return string * @return string
*/ */
public function get_raw_data() { public function get_raw_data() {
// $HTTP_RAW_POST_DATA is deprecated on PHP 5.6
if ( function_exists( 'phpversion' ) && version_compare( phpversion(), '5.6', '>=' ) ) {
return file_get_contents( 'php://input' );
}
global $HTTP_RAW_POST_DATA; global $HTTP_RAW_POST_DATA;
// A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default, // A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,

View File

@ -36,7 +36,7 @@ class WC_AJAX {
} }
/** /**
* Set AJAX defines. * Set WC AJAX constant and headers.
*/ */
public static function define_ajax() { public static function define_ajax() {
if ( ! empty( $_GET['wc-ajax'] ) ) { if ( ! empty( $_GET['wc-ajax'] ) ) {
@ -50,6 +50,12 @@ class WC_AJAX {
if ( ! WP_DEBUG || ( WP_DEBUG && ! WP_DEBUG_DISPLAY ) ) { if ( ! WP_DEBUG || ( WP_DEBUG && ! WP_DEBUG_DISPLAY ) ) {
@ini_set( 'display_errors', 0 ); @ini_set( 'display_errors', 0 );
} }
// Send headers like admin-ajax.php
send_origin_headers();
@header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
@header( 'X-Robots-Tag: noindex' );
send_nosniff_header();
nocache_headers();
} }
} }
@ -483,7 +489,7 @@ class WC_AJAX {
if ( wc_is_order_status( 'wc-' . $status ) && $order_id ) { if ( wc_is_order_status( 'wc-' . $status ) && $order_id ) {
$order = wc_get_order( $order_id ); $order = wc_get_order( $order_id );
$order->update_status( $status ); $order->update_status( $status, '', true );
do_action( 'woocommerce_order_edit_status', $order_id, $status ); do_action( 'woocommerce_order_edit_status', $order_id, $status );
} }
} }
@ -646,7 +652,7 @@ class WC_AJAX {
// Text based attributes - Posted values are term names, wp_set_object_terms wants ids or slugs. // Text based attributes - Posted values are term names, wp_set_object_terms wants ids or slugs.
} else { } else {
$values = array(); $values = array();
$raw_values = array_map( 'stripslashes', array_map( 'strip_tags', explode( WC_DELIMITER, $attribute_values[ $i ] ) ) ); $raw_values = array_map( 'wc_sanitize_term_text_based', explode( WC_DELIMITER, $attribute_values[ $i ] ) );
foreach ( $raw_values as $value ) { foreach ( $raw_values as $value ) {
$term = get_term_by( 'name', $value, $attribute_names[ $i ] ); $term = get_term_by( 'name', $value, $attribute_names[ $i ] );
@ -688,8 +694,9 @@ class WC_AJAX {
} elseif ( isset( $attribute_values[ $i ] ) ) { } elseif ( isset( $attribute_values[ $i ] ) ) {
// Text based, separate by pipe // Text based, possibly separated by pipes (WC_DELIMITER). Preserve line breaks in non-variation attributes.
$values = implode( ' ' . WC_DELIMITER . ' ', array_map( 'wc_clean', explode( WC_DELIMITER, wp_unslash( $attribute_values[ $i ] ) ) ) ); $values = $is_variation ? wc_clean( $attribute_values[ $i ] ) : implode( "\n", array_map( 'wc_clean', explode( "\n", $attribute_values[ $i ] ) ) );
$values = implode( ' ' . WC_DELIMITER . ' ', wc_get_text_attributes( $values ) );
// Custom attribute - Add attribute to array and set the values // Custom attribute - Add attribute to array and set the values
$attributes[ sanitize_title( $attribute_names[ $i ] ) ] = array( $attributes[ sanitize_title( $attribute_names[ $i ] ) ] = array(
@ -753,75 +760,111 @@ class WC_AJAX {
do_action( 'woocommerce_create_product_variation', $variation_id ); do_action( 'woocommerce_create_product_variation', $variation_id );
if ( $variation_id ) { if ( $variation_id ) {
$variation = get_post( $variation_id );
$variation_meta = get_post_meta( $variation_id );
$variation_data = array();
$shipping_classes = get_the_terms( $variation_id, 'product_shipping_class' );
$variation_fields = array(
'_sku' => '',
'_stock' => '',
'_regular_price' => '',
'_sale_price' => '',
'_weight' => '',
'_length' => '',
'_width' => '',
'_height' => '',
'_download_limit' => '',
'_download_expiry' => '',
'_downloadable_files' => '',
'_downloadable' => '',
'_virtual' => '',
'_thumbnail_id' => '',
'_sale_price_dates_from' => '',
'_sale_price_dates_to' => '',
'_manage_stock' => '',
'_stock_status' => '',
'_backorders' => null,
'_tax_class' => null,
'_variation_description' => ''
);
$variation_post_status = 'publish'; foreach ( $variation_fields as $field => $value ) {
$variation_data = get_post_meta( $variation_id ); $variation_data[ $field ] = isset( $variation_meta[ $field ][0] ) ? maybe_unserialize( $variation_meta[ $field ][0] ) : $value;
$variation_data['variation_post_id'] = $variation_id; }
// Get attributes // Add the variation attributes
$attributes = (array) maybe_unserialize( get_post_meta( $post_id, '_product_attributes', true ) ); $variation_data = array_merge( $variation_data, wc_get_product_variation_attributes( $variation_id ) );
// Formatting
$variation_data['_regular_price'] = wc_format_localized_price( $variation_data['_regular_price'] );
$variation_data['_sale_price'] = wc_format_localized_price( $variation_data['_sale_price'] );
$variation_data['_weight'] = wc_format_localized_decimal( $variation_data['_weight'] );
$variation_data['_length'] = wc_format_localized_decimal( $variation_data['_length'] );
$variation_data['_width'] = wc_format_localized_decimal( $variation_data['_width'] );
$variation_data['_height'] = wc_format_localized_decimal( $variation_data['_height'] );
$variation_data['_thumbnail_id'] = absint( $variation_data['_thumbnail_id'] );
$variation_data['image'] = $variation_data['_thumbnail_id'] ? wp_get_attachment_thumb_url( $variation_data['_thumbnail_id'] ) : '';
$variation_data['shipping_class'] = $shipping_classes && ! is_wp_error( $shipping_classes ) ? current( $shipping_classes )->term_id : '';
$variation_data['menu_order'] = $variation->menu_order;
$variation_data['_stock'] = wc_stock_amount( $variation_data['_stock'] );
// Get tax classes // Get tax classes
$tax_classes = WC_Tax::get_tax_classes(); $tax_classes = WC_Tax::get_tax_classes();
$tax_class_options = array(); $tax_class_options = array();
$tax_class_options[''] = __( 'Standard', 'woocommerce' ); $tax_class_options[''] = __( 'Standard', 'woocommerce' );
if ( $tax_classes ) { if ( ! empty( $tax_classes ) ) {
foreach ( $tax_classes as $class ) { foreach ( $tax_classes as $class ) {
$tax_class_options[ sanitize_title( $class ) ] = $class; $tax_class_options[ sanitize_title( $class ) ] = esc_attr( $class );
} }
} }
// Set backorder options
$backorder_options = array( $backorder_options = array(
'no' => __( 'Do not allow', 'woocommerce' ), 'no' => __( 'Do not allow', 'woocommerce' ),
'notify' => __( 'Allow, but notify customer', 'woocommerce' ), 'notify' => __( 'Allow, but notify customer', 'woocommerce' ),
'yes' => __( 'Allow', 'woocommerce' ) 'yes' => __( 'Allow', 'woocommerce' )
); );
// set stock status options
$stock_status_options = array( $stock_status_options = array(
'instock' => __( 'In stock', 'woocommerce' ), 'instock' => __( 'In stock', 'woocommerce' ),
'outofstock' => __( 'Out of stock', 'woocommerce' ) 'outofstock' => __( 'Out of stock', 'woocommerce' )
); );
// Get parent data // Get attributes
$attributes = (array) maybe_unserialize( get_post_meta( $post_id, '_product_attributes', true ) );
$parent_data = array( $parent_data = array(
'id' => $post_id, 'id' => $post_id,
'attributes' => $attributes, 'attributes' => $attributes,
'tax_class_options' => $tax_class_options, 'tax_class_options' => $tax_class_options,
'sku' => get_post_meta( $post_id, '_sku', true ), 'sku' => get_post_meta( $post_id, '_sku', true ),
'weight' => get_post_meta( $post_id, '_weight', true ), 'weight' => wc_format_localized_decimal( get_post_meta( $post_id, '_weight', true ) ),
'length' => get_post_meta( $post_id, '_length', true ), 'length' => wc_format_localized_decimal( get_post_meta( $post_id, '_length', true ) ),
'width' => get_post_meta( $post_id, '_width', true ), 'width' => wc_format_localized_decimal( get_post_meta( $post_id, '_width', true ) ),
'height' => get_post_meta( $post_id, '_height', true ), 'height' => wc_format_localized_decimal( get_post_meta( $post_id, '_height', true ) ),
'tax_class' => get_post_meta( $post_id, '_tax_class', true ), 'tax_class' => get_post_meta( $post_id, '_tax_class', true ),
'backorder_options' => $backorder_options, 'backorder_options' => $backorder_options,
'stock_status_options' => $stock_status_options 'stock_status_options' => $stock_status_options
); );
if ( ! $parent_data['weight'] ) { if ( ! $parent_data['weight'] ) {
$parent_data['weight'] = '0.00'; $parent_data['weight'] = wc_format_localized_decimal( 0 );
} }
if ( ! $parent_data['length'] ) { if ( ! $parent_data['length'] ) {
$parent_data['length'] = '0'; $parent_data['length'] = wc_format_localized_decimal( 0 );
} }
if ( ! $parent_data['width'] ) { if ( ! $parent_data['width'] ) {
$parent_data['width'] = '0'; $parent_data['width'] = wc_format_localized_decimal( 0 );
} }
if ( ! $parent_data['height'] ) { if ( ! $parent_data['height'] ) {
$parent_data['height'] = '0'; $parent_data['height'] = wc_format_localized_decimal( 0 );
} }
$_tax_class = null;
$_downloadable_files = '';
$_stock_status = '';
$_backorders = '';
$image_id = 0;
$_thumbnail_id = '';
$variation = get_post( $variation_id ); // Get the variation object
include( 'admin/meta-boxes/views/html-variation-admin.php' ); include( 'admin/meta-boxes/views/html-variation-admin.php' );
} }
@ -844,7 +887,7 @@ class WC_AJAX {
} }
if ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) { if ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) {
set_time_limit( 0 ); @set_time_limit( 0 );
} }
$post_id = intval( $_POST['post_id'] ); $post_id = intval( $_POST['post_id'] );
@ -2326,7 +2369,7 @@ class WC_AJAX {
} }
$key_id = absint( $_POST['key_id'] ); $key_id = absint( $_POST['key_id'] );
$description = sanitize_text_field( $_POST['description'] ); $description = sanitize_text_field( wp_unslash( $_POST['description'] ) );
$permissions = ( in_array( $_POST['permissions'], array( 'read', 'write', 'read_write' ) ) ) ? sanitize_text_field( $_POST['permissions'] ) : 'read'; $permissions = ( in_array( $_POST['permissions'], array( 'read', 'write', 'read_write' ) ) ) ? sanitize_text_field( $_POST['permissions'] ) : 'read';
$user_id = absint( $_POST['user'] ); $user_id = absint( $_POST['user'] );
@ -2425,7 +2468,7 @@ class WC_AJAX {
$posted_attributes = wp_unslash( $_POST['attributes'] ); $posted_attributes = wp_unslash( $_POST['attributes'] );
foreach ( $posted_attributes as $key => $value ) { foreach ( $posted_attributes as $key => $value ) {
$attributes[ wc_clean( $key ) ] = array_map( 'wc_clean', $value ); $attributes[ $key ] = array_map( 'wc_clean', $value );
} }
// Get tax classes // Get tax classes
@ -2661,8 +2704,8 @@ class WC_AJAX {
private static function variation_bulk_action_toggle_manage_stock( $variations, $data ) { private static function variation_bulk_action_toggle_manage_stock( $variations, $data ) {
foreach ( $variations as $variation_id ) { foreach ( $variations as $variation_id ) {
$_manage_stock = get_post_meta( $variation_id, '_manage_stock', true ); $_manage_stock = get_post_meta( $variation_id, '_manage_stock', true );
$is_manage_stock = 'no' === $_manage_stock ? 'yes' : 'no'; $is_manage_stock = 'no' === $_manage_stock || '' === $_manage_stock ? 'yes' : 'no';
update_post_meta( $variation_id, '_manage_stock', wc_clean( $is_manage_stock ) ); update_post_meta( $variation_id, '_manage_stock', $is_manage_stock );
} }
} }
@ -2673,7 +2716,7 @@ class WC_AJAX {
* @param array $data * @param array $data
*/ */
private static function variation_bulk_action_variable_regular_price( $variations, $data ) { private static function variation_bulk_action_variable_regular_price( $variations, $data ) {
if ( empty( $data['value'] ) ) { if ( ! isset( $data['value'] ) ) {
return; return;
} }
@ -2699,7 +2742,7 @@ class WC_AJAX {
* @param array $data * @param array $data
*/ */
private static function variation_bulk_action_variable_sale_price( $variations, $data ) { private static function variation_bulk_action_variable_sale_price( $variations, $data ) {
if ( empty( $data['value'] ) ) { if ( ! isset( $data['value'] ) ) {
return; return;
} }
@ -2725,19 +2768,17 @@ class WC_AJAX {
* @param array $data * @param array $data
*/ */
private static function variation_bulk_action_variable_stock( $variations, $data ) { private static function variation_bulk_action_variable_stock( $variations, $data ) {
if ( empty( $data['value'] ) ) { if ( ! isset( $data['value'] ) ) {
return; return;
} }
$value = wc_clean( $data['value'] ); $value = wc_clean( $data['value'] );
if ( $value ) { foreach ( $variations as $variation_id ) {
foreach ( $variations as $variation_id ) { if ( 'yes' === get_post_meta( $variation_id, '_manage_stock', true ) ) {
if ( 'yes' === get_post_meta( $variation_id, '_manage_stock', true ) ) { wc_update_product_stock( $variation_id, wc_stock_amount( $value ) );
wc_update_product_stock( $variation_id, wc_stock_amount( $value ) ); } else {
} else { delete_post_meta( $variation_id, '_stock' );
delete_post_meta( $variation_id, '_stock' );
}
} }
} }
} }

View File

@ -241,7 +241,7 @@ class WC_Auth {
'body' => json_encode( $consumer_data ), 'body' => json_encode( $consumer_data ),
'timeout' => 60, 'timeout' => 60,
'headers' => array( 'headers' => array(
'Content-Type' => 'application/xml;charset=' . get_bloginfo( 'charset' ), 'Content-Type' => 'application/json;charset=' . get_bloginfo( 'charset' ),
) )
); );

View File

@ -78,6 +78,8 @@ class WC_Autoloader {
$path = $this->include_path . 'admin/meta-boxes/'; $path = $this->include_path . 'admin/meta-boxes/';
} elseif ( strpos( $class, 'wc_admin' ) === 0 ) { } elseif ( strpos( $class, 'wc_admin' ) === 0 ) {
$path = $this->include_path . 'admin/'; $path = $this->include_path . 'admin/';
} elseif ( strpos( $class, 'wc_cli_' ) === 0 ) {
$path = $this->include_path . 'cli/';
} }
if ( empty( $path ) || ( ! $this->load_file( $path . $file ) && strpos( $class, 'wc_' ) === 0 ) ) { if ( empty( $path ) || ( ! $this->load_file( $path . $file ) && strpos( $class, 'wc_' ) === 0 ) ) {

View File

@ -70,7 +70,8 @@ class WC_Breadcrumb {
'is_category', 'is_category',
'is_tag', 'is_tag',
'is_author', 'is_author',
'is_date' 'is_date',
'is_tax'
); );
if ( ( ! is_front_page() && ! ( is_post_type_archive() && get_option( 'page_on_front' ) == wc_get_page_id( 'shop' ) ) ) || is_paged() ) { if ( ( ! is_front_page() && ! ( is_post_type_archive() && get_option( 'page_on_front' ) == wc_get_page_id( 'shop' ) ) ) || is_paged() ) {
@ -276,6 +277,23 @@ class WC_Breadcrumb {
} }
} }
/**
* Add crumbs for date based archives
*/
private function add_crumbs_tax() {
$this_term = $GLOBALS['wp_query']->get_queried_object();
$taxonomy = get_taxonomy( $this_term->taxonomy );
$this->add_crumb( $taxonomy->labels->name );
if ( 0 != $this_term->parent ) {
$this->term_ancestors( $this_term->parent, 'post_category' );
$this->add_crumb( $this_term->name, get_term_link( $this_term->term_id, $this_term->taxonomy ) );
}
$this->add_crumb( single_term_title( '', false ), get_term_link( $this_term->term_id, $this_term->taxonomy ) );
}
/** /**
* Add a breadcrumb for author archives * Add a breadcrumb for author archives
*/ */

View File

@ -45,7 +45,7 @@ class WC_Cache_Helper {
* This prevents caching of the wrong data for this request. * This prevents caching of the wrong data for this request.
*/ */
public static function geolocation_ajax_redirect() { public static function geolocation_ajax_redirect() {
if ( 'geolocation_ajax' === get_option( 'woocommerce_default_customer_address' ) && ! is_checkout() && ! is_ajax() ) { if ( 'geolocation_ajax' === get_option( 'woocommerce_default_customer_address' ) && ! is_checkout() && ! is_cart() && ! is_account_page() && ! is_ajax() && empty( $_POST ) ) {
$location_hash = self::geolocation_ajax_get_location_hash(); $location_hash = self::geolocation_ajax_get_location_hash();
$current_hash = isset( $_GET['v'] ) ? wc_clean( $_GET['v'] ) : ''; $current_hash = isset( $_GET['v'] ) ? wc_clean( $_GET['v'] ) : '';
if ( empty( $current_hash ) || $current_hash !== $location_hash ) { if ( empty( $current_hash ) || $current_hash !== $location_hash ) {
@ -53,6 +53,10 @@ class WC_Cache_Helper {
$redirect_url = trailingslashit( home_url( $wp->request ) ); $redirect_url = trailingslashit( home_url( $wp->request ) );
if ( ! empty( $_SERVER['QUERY_STRING'] ) ) {
$redirect_url = add_query_arg( $_SERVER['QUERY_STRING'], '', $redirect_url );
}
if ( ! get_option( 'permalink_structure' ) ) { if ( ! get_option( 'permalink_structure' ) ) {
$redirect_url = add_query_arg( $wp->query_string, '', $redirect_url ); $redirect_url = add_query_arg( $wp->query_string, '', $redirect_url );
} }
@ -107,7 +111,7 @@ class WC_Cache_Helper {
if ( ! wp_using_ext_object_cache() && ! empty( $version ) ) { if ( ! wp_using_ext_object_cache() && ! empty( $version ) ) {
global $wpdb; global $wpdb;
$limit = 1000; $limit = apply_filters( 'woocommerce_delete_version_transients_limit', 1000 );
$affected = $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s ORDER BY option_id LIMIT %d;", "\_transient\_%" . $version, $limit ) ); $affected = $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s ORDER BY option_id LIMIT %d;", "\_transient\_%" . $version, $limit ) );
// If affected rows is equal to limit, there are more rows to delete. Delete in 10 secs. // If affected rows is equal to limit, there are more rows to delete. Delete in 10 secs.
@ -147,7 +151,7 @@ class WC_Cache_Helper {
self::nocache(); self::nocache();
} elseif ( is_array( $wc_page_uris ) ) { } elseif ( is_array( $wc_page_uris ) ) {
foreach( $wc_page_uris as $uri ) { foreach( $wc_page_uris as $uri ) {
if ( strstr( $_SERVER['REQUEST_URI'], $uri ) ) { if ( stristr( $_SERVER['REQUEST_URI'], $uri ) ) {
self::nocache(); self::nocache();
break; break;
} }

View File

@ -169,7 +169,7 @@ class WC_Cart {
* Will set cart cookies if needed, once, during WP hook * Will set cart cookies if needed, once, during WP hook
*/ */
public function maybe_set_cart_cookies() { public function maybe_set_cart_cookies() {
if ( ! headers_sent() ) { if ( ! headers_sent() && did_action( 'wp_loaded' ) ) {
if ( ! $this->is_empty() ) { if ( ! $this->is_empty() ) {
$this->set_cart_cookies( true ); $this->set_cart_cookies( true );
} elseif ( isset( $_COOKIE['woocommerce_items_in_cart'] ) ) { } elseif ( isset( $_COOKIE['woocommerce_items_in_cart'] ) ) {
@ -1054,6 +1054,21 @@ class WC_Cart {
do_action( 'woocommerce_cart_reset', $this, $unset_session ); do_action( 'woocommerce_cart_reset', $this, $unset_session );
} }
/**
* Sort by subtotal
* @param array $a
* @param array $b
* @return int
*/
private function sort_by_subtotal( $a, $b ) {
$first_item_subtotal = isset( $a['line_subtotal'] ) ? $a['line_subtotal'] : 0;
$second_item_subtotal = isset( $b['line_subtotal'] ) ? $b['line_subtotal'] : 0;
if ( $first_item_subtotal === $second_item_subtotal ) {
return 0;
}
return ( $first_item_subtotal < $second_item_subtotal ) ? 1 : -1;
}
/** /**
* Calculate totals for the items in the cart. * Calculate totals for the items in the cart.
*/ */
@ -1070,11 +1085,12 @@ class WC_Cart {
$tax_rates = array(); $tax_rates = array();
$shop_tax_rates = array(); $shop_tax_rates = array();
$cart = $this->get_cart();
/** /**
* Calculate subtotals for items. This is done first so that discount logic can use the values. * Calculate subtotals for items. This is done first so that discount logic can use the values.
*/ */
foreach ( $this->get_cart() as $cart_item_key => $values ) { foreach ( $cart as $cart_item_key => $values ) {
$_product = $values['data']; $_product = $values['data'];
@ -1126,8 +1142,12 @@ class WC_Cart {
/** /**
* ADJUST TAX - Calculations when base tax is not equal to the item tax * ADJUST TAX - Calculations when base tax is not equal to the item tax
*/ *
if ( $item_tax_rates !== $base_tax_rates ) { * The woocommerce_adjust_non_base_location_prices filter can stop base taxes being taken off when dealing with out of base locations.
* e.g. If a product costs 10 including tax, all users will pay 10 regardless of location and taxes.
* This feature is experimental @since 2.4.7 and may change in the future. Use at your risk.
*/
if ( $item_tax_rates !== $base_tax_rates && apply_filters( 'woocommerce_adjust_non_base_location_prices', true ) ) {
// Work out a new base price without the shop's base tax // Work out a new base price without the shop's base tax
$taxes = WC_Tax::calc_tax( $line_price, $base_tax_rates, true, true ); $taxes = WC_Tax::calc_tax( $line_price, $base_tax_rates, true, true );
@ -1176,10 +1196,13 @@ class WC_Cart {
$this->subtotal_ex_tax += $line_subtotal; $this->subtotal_ex_tax += $line_subtotal;
} }
// Order cart items by price so coupon logic is 'fair' for customers and not based on order added to cart.
uasort( $cart, array( $this, 'sort_by_subtotal' ) );
/** /**
* Calculate totals for items * Calculate totals for items
*/ */
foreach ( $this->get_cart() as $cart_item_key => $values ) { foreach ( $cart as $cart_item_key => $values ) {
$_product = $values['data']; $_product = $values['data'];
@ -1213,8 +1236,12 @@ class WC_Cart {
/** /**
* ADJUST TAX - Calculations when base tax is not equal to the item tax * ADJUST TAX - Calculations when base tax is not equal to the item tax
*/ *
if ( $item_tax_rates !== $base_tax_rates ) { * The woocommerce_adjust_non_base_location_prices filter can stop base taxes being taken off when dealing with out of base locations.
* e.g. If a product costs 10 including tax, all users will pay 10 regardless of location and taxes.
* This feature is experimental @since 2.4.7 and may change in the future. Use at your risk.
*/
if ( $item_tax_rates !== $base_tax_rates && apply_filters( 'woocommerce_adjust_non_base_location_prices', true ) ) {
// Work out a new base price without the shop's base tax // Work out a new base price without the shop's base tax
$taxes = WC_Tax::calc_tax( $line_price, $base_tax_rates, true, true ); $taxes = WC_Tax::calc_tax( $line_price, $base_tax_rates, true, true );
@ -1588,7 +1615,7 @@ class WC_Cart {
// Usage limits per user - check against billing and user email and user ID // Usage limits per user - check against billing and user email and user ID
if ( $coupon->usage_limit_per_user > 0 ) { if ( $coupon->usage_limit_per_user > 0 ) {
$check_emails = array(); $check_emails = array();
$used_by = array_filter( (array) get_post_meta( $coupon->id, '_used_by' ) ); $used_by = $coupon->get_used_by();
if ( is_user_logged_in() ) { if ( is_user_logged_in() ) {
$current_user = wp_get_current_user(); $current_user = wp_get_current_user();
@ -1872,12 +1899,12 @@ class WC_Cart {
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
/** /**
* add_fee function. * Add additional fee to the cart
* *
* @param mixed $name * @param string $name Unique name for the fee. Multiple fees of the same name cannot be added.
* @param mixed $amount * @param float $amount Fee amount.
* @param bool $taxable (default: false) * @param bool $taxable (default: false) Is the fee taxable?
* @param string $tax_class (default: '') * @param string $tax_class (default: '') The tax class for the fee if taxable. A blank string is standard tax class.
*/ */
public function add_fee( $name, $amount, $taxable = false, $tax_class = '' ) { public function add_fee( $name, $amount, $taxable = false, $tax_class = '' ) {

22
includes/class-wc-cli.php Normal file
View File

@ -0,0 +1,22 @@
<?php
/**
* Manage WooCommerce from CLI.
*
* @class WC_CLI
* @version 2.5.0
* @package WooCommerce/CLI
* @category CLI
* @author WooThemes
*/
class WC_CLI extends WP_CLI_Command {
}
WP_CLI::add_command( 'wc', 'WC_CLI' );
WP_CLI::add_command( 'wc coupon', 'WC_CLI_Coupon' );
WP_CLI::add_command( 'wc customer', 'WC_CLI_Customer' );
WP_CLI::add_command( 'wc order', 'WC_CLI_Order' );
WP_CLI::add_command( 'wc product', 'WC_CLI_Product' );
WP_CLI::add_command( 'wc product category', 'WC_CLI_Product_Category' );
WP_CLI::add_command( 'wc report', 'WC_CLI_Report' );
WP_CLI::add_command( 'wc tool', 'WC_CLI_Tool' );

View File

@ -250,6 +250,7 @@ class WC_Countries {
if ( 'eu_vat' === $type ) { if ( 'eu_vat' === $type ) {
$countries[] = 'MC'; $countries[] = 'MC';
$countries[] = 'IM'; $countries[] = 'IM';
$countries[] = 'CH';
} }
return $countries; return $countries;

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