Merge remote-tracking branch 'woocommerce/master'
This commit is contained in:
commit
dc14abd117
12
README.md
12
README.md
|
@ -1,4 +1,14 @@
|
|||
# [WooCommerce](https://woocommerce.com/) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) [![Build Status](https://travis-ci.org/woocommerce/woocommerce.svg?branch=master)](https://travis-ci.org/woocommerce/woocommerce) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/woocommerce/woocommerce/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/woocommerce/woocommerce/?branch=master) [![codecov](https://codecov.io/gh/woocommerce/woocommerce/branch/master/graph/badge.svg)](https://codecov.io/gh/woocommerce/woocommerce)
|
||||
<p align="center"><a href="https://woocommerce.com/"><img src="https://woocommerce.com/wp-content/themes/woo/images/logo-woocommerce@2x.png" alt="WooCommerce"></a></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://packagist.org/packages/woocommerce/woocommerce"><img src="https://poser.pugx.org/woocommerce/woocommerce/license" alt="license"></a>
|
||||
<a href="https://packagist.org/packages/woocommerce/woocommerce"><img src="https://poser.pugx.org/woocommerce/woocommerce/v/stable" alt="Latest Stable Version"></a>
|
||||
<img src="https://img.shields.io/wordpress/plugin/dt/woocommerce.svg" alt="WordPress.org downloads">
|
||||
<img src="https://img.shields.io/wordpress/plugin/r/woocommerce.svg" alt="WordPress.org rating">
|
||||
<a href="https://travis-ci.org/woocommerce/woocommerce"><img src="https://travis-ci.org/woocommerce/woocommerce.svg?branch=master" alt="Build Status"></a>
|
||||
<a href="https://scrutinizer-ci.com/g/woocommerce/woocommerce/?branch=master"><img src="https://scrutinizer-ci.com/g/woocommerce/woocommerce/badges/quality-score.png?b=master" alt="Scrutinizer Code Quality"></a>
|
||||
<a href="https://codecov.io/gh/woocommerce/woocommerce"><img src="https://codecov.io/gh/woocommerce/woocommerce/branch/master/graph/badge.svg" alt="codecov"></a>
|
||||
</p>
|
||||
|
||||
Welcome to the WooCommerce repository on GitHub. Here you can browse the source, look at open issues and keep track of development. We recommend all developers to follow the [WooCommerce development blog](https://woocommerce.wordpress.com/) to stay up to date about everything happening in the project. You can also [follow @DevelopWC](https://twitter.com/DevelopWC) on Twitter for the latest development updates.
|
||||
|
||||
|
|
|
@ -179,7 +179,6 @@
|
|||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
margin: 0;
|
||||
text-indent: 0;
|
||||
position: absolute;
|
||||
|
|
|
@ -1 +1 @@
|
|||
div.woocommerce-message{overflow:hidden;position:relative;border-right-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}.woocommerce-message .button-primary,p.woocommerce-actions .button-primary{background:#bb77ae;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,-1px 0 1px #a36597,0 1px 1px #a36597,1px 0 1px #a36597}.woocommerce-message .button-primary:active,.woocommerce-message .button-primary:focus,.woocommerce-message .button-primary:hover,p.woocommerce-actions .button-primary:active,p.woocommerce-actions .button-primary:focus,p.woocommerce-actions .button-primary:hover{background:#a36597;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:absolute;top:0;left:0;padding:10px 21px 10px 15px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:absolute;top:8px;right:0;transition:all .1s ease-in-out}.woocommerce-message .button-primary,.woocommerce-message .button-secondary,p.woocommerce-actions .button-primary,p.woocommerce-actions .button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-right:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;left:12px;position:absolute}
|
||||
div.woocommerce-message{overflow:hidden;position:relative;border-right-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}.woocommerce-message .button-primary,p.woocommerce-actions .button-primary{background:#bb77ae;border-color:#a36597;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,-1px 0 1px #a36597,0 1px 1px #a36597,1px 0 1px #a36597}.woocommerce-message .button-primary:active,.woocommerce-message .button-primary:focus,.woocommerce-message .button-primary:hover,p.woocommerce-actions .button-primary:active,p.woocommerce-actions .button-primary:focus,p.woocommerce-actions .button-primary:hover{background:#a36597;border-color:#a36597;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:absolute;top:0;left:0;padding:10px 21px 10px 15px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:absolute;top:8px;right:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.woocommerce-message .button-primary,.woocommerce-message .button-secondary,p.woocommerce-actions .button-primary,p.woocommerce-actions .button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-right:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;left:12px;position:absolute}
|
|
@ -1 +1 @@
|
|||
div.woocommerce-message{overflow:hidden;position:relative;border-left-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}.woocommerce-message .button-primary,p.woocommerce-actions .button-primary{background:#bb77ae;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,1px 0 1px #a36597,0 1px 1px #a36597,-1px 0 1px #a36597}.woocommerce-message .button-primary:active,.woocommerce-message .button-primary:focus,.woocommerce-message .button-primary:hover,p.woocommerce-actions .button-primary:active,p.woocommerce-actions .button-primary:focus,p.woocommerce-actions .button-primary:hover{background:#a36597;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:absolute;top:0;right:0;padding:10px 15px 10px 21px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:absolute;top:8px;left:0;transition:all .1s ease-in-out}.woocommerce-message .button-primary,.woocommerce-message .button-secondary,p.woocommerce-actions .button-primary,p.woocommerce-actions .button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;right:12px;position:absolute}
|
||||
div.woocommerce-message{overflow:hidden;position:relative;border-left-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}.woocommerce-message .button-primary,p.woocommerce-actions .button-primary{background:#bb77ae;border-color:#a36597;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,1px 0 1px #a36597,0 1px 1px #a36597,-1px 0 1px #a36597}.woocommerce-message .button-primary:active,.woocommerce-message .button-primary:focus,.woocommerce-message .button-primary:hover,p.woocommerce-actions .button-primary:active,p.woocommerce-actions .button-primary:focus,p.woocommerce-actions .button-primary:hover{background:#a36597;border-color:#a36597;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:absolute;top:0;right:0;padding:10px 15px 10px 21px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:absolute;top:8px;left:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.woocommerce-message .button-primary,.woocommerce-message .button-secondary,p.woocommerce-actions .button-primary,p.woocommerce-actions .button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;right:12px;position:absolute}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1165,7 +1165,6 @@ ul.wc_coupon_list_block {
|
|||
line-height: 14px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
}
|
||||
a.edit_address::after {
|
||||
|
@ -1946,9 +1945,22 @@ ul.wc_coupon_list_block {
|
|||
padding: 0 !important;
|
||||
height: 2em !important;
|
||||
width: 2em;
|
||||
overflow: hidden;
|
||||
|
||||
&::after {
|
||||
@include icon_dashicons;
|
||||
font-family: 'Dashicons';
|
||||
speak: none;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
margin: 0;
|
||||
text-indent: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
line-height: 1.85;
|
||||
}
|
||||
|
||||
|
@ -2218,6 +2230,7 @@ ul.wc_coupon_list_block {
|
|||
float: left;
|
||||
padding: 1.5em;
|
||||
box-sizing: border-box;
|
||||
word-wrap: break-word;
|
||||
|
||||
h2 {
|
||||
margin-top: 0;
|
||||
|
@ -2497,8 +2510,17 @@ table.wp-list-table {
|
|||
color: #999;
|
||||
}
|
||||
|
||||
.column-sku {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.column-price {
|
||||
width: 10ch;
|
||||
}
|
||||
|
||||
.column-is_in_stock {
|
||||
text-align: left !important;
|
||||
width: 12ch;
|
||||
}
|
||||
|
||||
span.wc-image,
|
||||
|
@ -5110,6 +5132,12 @@ img.ui-datepicker-trigger {
|
|||
margin-left: 4px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-left: .5em;
|
||||
font-weight: normal;
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
body{background:#f1f1f1;box-shadow:none;margin:100px auto 24px;padding:0}#wc-logo{border:0;margin:0 0 24px;padding:0;text-align:center}#wc-logo img{max-width:50%}.wc-auth-content{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.13);overflow:hidden;padding:24px 24px 0;zoom:1}.wc-auth-content h1,.wc-auth-content h2,.wc-auth-content h3,.wc-auth-content table{border:0;clear:none;color:#666;margin:0 0 24px;padding:0}.wc-auth-content p,.wc-auth-content ul{color:#666;font-size:1em;line-height:1.75em;margin:0 0 24px}.wc-auth-content p{padding:0}.wc-auth-content a{color:#a16696}.wc-auth-content a:focus,.wc-auth-content a:hover{color:#111}.wc-auth-content .wc-auth-login label{color:#999;display:block;margin-bottom:.5em}.wc-auth-content .wc-auth-login input{box-sizing:border-box;font-size:1.3em;padding:.5em;width:100%}.wc-auth-content .wc-auth-login .wc-auth-actions{padding:0}.wc-auth-content .wc-auth-login .wc-auth-actions .wc-auth-login-button{float:none;width:100%}.wc-auth-permissions{list-style:disc inside;padding:0}.wc-auth-permissions li{font-size:1em}.wc-auth-logged-in-as{background:#f5f5f5;border-bottom:2px solid #eee;line-height:70px;margin:0 0 24px;padding:0 0 0 1em}.wc-auth-logged-in-as p{margin:0;line-height:70px}.wc-auth-logged-in-as img{float:right;height:70px;margin:0 0 0 1em}.wc-auth-logged-in-as .wc-auth-logout{float:left}.wc-auth .wc-auth-actions{overflow:hidden;padding-right:24px}.wc-auth .wc-auth-actions .button{background:#f7f7f7;border-bottom-width:2px;border:1px solid #d7d7d7;box-sizing:border-box;color:#777;float:left;font-size:1.25em;height:auto;line-height:1em;padding:1em 2em;text-align:center;width:50%}.wc-auth .wc-auth-actions .button:focus,.wc-auth .wc-auth-actions .button:hover{background:#fcfcfc}.wc-auth .wc-auth-actions .button-primary{background:#ad6ea1;border-color:#a16696;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);color:#fff;float:left;opacity:1;text-shadow:0 -1px 1px #8a4f7f,-1px 0 1px #8a4f7f,0 1px 1px #8a4f7f,1px 0 1px #8a4f7f}.wc-auth .wc-auth-actions .button-primary:focus,.wc-auth .wc-auth-actions .button-primary:hover{background:#b472a8;color:#fff}.wc-auth .wc-auth-actions .wc-auth-approve{float:left}.wc-auth .wc-auth-actions .wc-auth-deny{float:right;margin-right:-24px}
|
||||
body{background:#f1f1f1;-webkit-box-shadow:none;box-shadow:none;margin:100px auto 24px;padding:0}#wc-logo{border:0;margin:0 0 24px;padding:0;text-align:center}#wc-logo img{max-width:50%}.wc-auth-content{background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13);overflow:hidden;padding:24px 24px 0;zoom:1}.wc-auth-content h1,.wc-auth-content h2,.wc-auth-content h3,.wc-auth-content table{border:0;clear:none;color:#666;margin:0 0 24px;padding:0}.wc-auth-content p,.wc-auth-content ul{color:#666;font-size:1em;line-height:1.75em;margin:0 0 24px}.wc-auth-content p{padding:0}.wc-auth-content a{color:#a16696}.wc-auth-content a:focus,.wc-auth-content a:hover{color:#111}.wc-auth-content .wc-auth-login label{color:#999;display:block;margin-bottom:.5em}.wc-auth-content .wc-auth-login input{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:1.3em;padding:.5em;width:100%}.wc-auth-content .wc-auth-login .wc-auth-actions{padding:0}.wc-auth-content .wc-auth-login .wc-auth-actions .wc-auth-login-button{float:none;width:100%}.wc-auth-permissions{list-style:disc inside;padding:0}.wc-auth-permissions li{font-size:1em}.wc-auth-logged-in-as{background:#f5f5f5;border-bottom:2px solid #eee;line-height:70px;margin:0 0 24px;padding:0 0 0 1em}.wc-auth-logged-in-as p{margin:0;line-height:70px}.wc-auth-logged-in-as img{float:right;height:70px;margin:0 0 0 1em}.wc-auth-logged-in-as .wc-auth-logout{float:left}.wc-auth .wc-auth-actions{overflow:hidden;padding-right:24px}.wc-auth .wc-auth-actions .button{background:#f7f7f7;border-bottom-width:2px;border:1px solid #d7d7d7;-webkit-box-sizing:border-box;box-sizing:border-box;color:#777;float:left;font-size:1.25em;height:auto;line-height:1em;padding:1em 2em;text-align:center;width:50%}.wc-auth .wc-auth-actions .button:focus,.wc-auth .wc-auth-actions .button:hover{background:#fcfcfc}.wc-auth .wc-auth-actions .button-primary{background:#ad6ea1;border-color:#a16696;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);color:#fff;float:left;opacity:1;text-shadow:0 -1px 1px #8a4f7f,-1px 0 1px #8a4f7f,0 1px 1px #8a4f7f,1px 0 1px #8a4f7f}.wc-auth .wc-auth-actions .button-primary:focus,.wc-auth .wc-auth-actions .button-primary:hover{background:#b472a8;color:#fff}.wc-auth .wc-auth-actions .wc-auth-approve{float:left}.wc-auth .wc-auth-actions .wc-auth-deny{float:right;margin-right:-24px}
|
|
@ -1 +1 @@
|
|||
body{background:#f1f1f1;box-shadow:none;margin:100px auto 24px;padding:0}#wc-logo{border:0;margin:0 0 24px;padding:0;text-align:center}#wc-logo img{max-width:50%}.wc-auth-content{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.13);overflow:hidden;padding:24px 24px 0;zoom:1}.wc-auth-content h1,.wc-auth-content h2,.wc-auth-content h3,.wc-auth-content table{border:0;clear:none;color:#666;margin:0 0 24px;padding:0}.wc-auth-content p,.wc-auth-content ul{color:#666;font-size:1em;line-height:1.75em;margin:0 0 24px}.wc-auth-content p{padding:0}.wc-auth-content a{color:#a16696}.wc-auth-content a:focus,.wc-auth-content a:hover{color:#111}.wc-auth-content .wc-auth-login label{color:#999;display:block;margin-bottom:.5em}.wc-auth-content .wc-auth-login input{box-sizing:border-box;font-size:1.3em;padding:.5em;width:100%}.wc-auth-content .wc-auth-login .wc-auth-actions{padding:0}.wc-auth-content .wc-auth-login .wc-auth-actions .wc-auth-login-button{float:none;width:100%}.wc-auth-permissions{list-style:disc inside;padding:0}.wc-auth-permissions li{font-size:1em}.wc-auth-logged-in-as{background:#f5f5f5;border-bottom:2px solid #eee;line-height:70px;margin:0 0 24px;padding:0 1em 0 0}.wc-auth-logged-in-as p{margin:0;line-height:70px}.wc-auth-logged-in-as img{float:left;height:70px;margin:0 1em 0 0}.wc-auth-logged-in-as .wc-auth-logout{float:right}.wc-auth .wc-auth-actions{overflow:hidden;padding-left:24px}.wc-auth .wc-auth-actions .button{background:#f7f7f7;border-bottom-width:2px;border:1px solid #d7d7d7;box-sizing:border-box;color:#777;float:right;font-size:1.25em;height:auto;line-height:1em;padding:1em 2em;text-align:center;width:50%}.wc-auth .wc-auth-actions .button:focus,.wc-auth .wc-auth-actions .button:hover{background:#fcfcfc}.wc-auth .wc-auth-actions .button-primary{background:#ad6ea1;border-color:#a16696;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);color:#fff;float:right;opacity:1;text-shadow:0 -1px 1px #8a4f7f,1px 0 1px #8a4f7f,0 1px 1px #8a4f7f,-1px 0 1px #8a4f7f}.wc-auth .wc-auth-actions .button-primary:focus,.wc-auth .wc-auth-actions .button-primary:hover{background:#b472a8;color:#fff}.wc-auth .wc-auth-actions .wc-auth-approve{float:right}.wc-auth .wc-auth-actions .wc-auth-deny{float:left;margin-left:-24px}
|
||||
body{background:#f1f1f1;-webkit-box-shadow:none;box-shadow:none;margin:100px auto 24px;padding:0}#wc-logo{border:0;margin:0 0 24px;padding:0;text-align:center}#wc-logo img{max-width:50%}.wc-auth-content{background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13);overflow:hidden;padding:24px 24px 0;zoom:1}.wc-auth-content h1,.wc-auth-content h2,.wc-auth-content h3,.wc-auth-content table{border:0;clear:none;color:#666;margin:0 0 24px;padding:0}.wc-auth-content p,.wc-auth-content ul{color:#666;font-size:1em;line-height:1.75em;margin:0 0 24px}.wc-auth-content p{padding:0}.wc-auth-content a{color:#a16696}.wc-auth-content a:focus,.wc-auth-content a:hover{color:#111}.wc-auth-content .wc-auth-login label{color:#999;display:block;margin-bottom:.5em}.wc-auth-content .wc-auth-login input{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:1.3em;padding:.5em;width:100%}.wc-auth-content .wc-auth-login .wc-auth-actions{padding:0}.wc-auth-content .wc-auth-login .wc-auth-actions .wc-auth-login-button{float:none;width:100%}.wc-auth-permissions{list-style:disc inside;padding:0}.wc-auth-permissions li{font-size:1em}.wc-auth-logged-in-as{background:#f5f5f5;border-bottom:2px solid #eee;line-height:70px;margin:0 0 24px;padding:0 1em 0 0}.wc-auth-logged-in-as p{margin:0;line-height:70px}.wc-auth-logged-in-as img{float:left;height:70px;margin:0 1em 0 0}.wc-auth-logged-in-as .wc-auth-logout{float:right}.wc-auth .wc-auth-actions{overflow:hidden;padding-left:24px}.wc-auth .wc-auth-actions .button{background:#f7f7f7;border-bottom-width:2px;border:1px solid #d7d7d7;-webkit-box-sizing:border-box;box-sizing:border-box;color:#777;float:right;font-size:1.25em;height:auto;line-height:1em;padding:1em 2em;text-align:center;width:50%}.wc-auth .wc-auth-actions .button:focus,.wc-auth .wc-auth-actions .button:hover{background:#fcfcfc}.wc-auth .wc-auth-actions .button-primary{background:#ad6ea1;border-color:#a16696;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);color:#fff;float:right;opacity:1;text-shadow:0 -1px 1px #8a4f7f,1px 0 1px #8a4f7f,0 1px 1px #8a4f7f,-1px 0 1px #8a4f7f}.wc-auth .wc-auth-actions .button-primary:focus,.wc-auth .wc-auth-actions .button-primary:hover{background:#b472a8;color:#fff}.wc-auth .wc-auth-actions .wc-auth-approve{float:right}.wc-auth .wc-auth-actions .wc-auth-deny{float:left;margin-left:-24px}
|
|
@ -1 +1 @@
|
|||
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;text-align:center;float:right;font-size:.8em;border-right:1px solid #fff;border-left:1px solid #ececec;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-right:0}ul.woocommerce_stats li:last-child{border-left:0}ul.woocommerce_stats strong{font-family:Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:right;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:left;position:absolute;left:0;top:50%;margin-left:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;right:0;width:100%;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:right;margin-left:12px;margin-bottom:12px}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a::before{font-family:Dashicons;content:'\f185'}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a::before{content:'\e006'}#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-left:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.processing-orders a::before{content:'\e011';color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a::before{content:'\e033';color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock{border-left:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a::before{content:'\e016';color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a::before{content:'\e013';color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:right;margin:0 0 5px 10px}#woocommerce_dashboard_recent_reviews .star-rating{float:left;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-right:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating::before{content:'\e021\e021\e021\e021\e021';color:#b3b2b2;float:right;top:0;right:0;position:absolute;letter-spacing:.1em}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:right;top:0;right:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span::before{content:'\e020\e020\e020\e020\e020';top:0;position:absolute;right:0;letter-spacing:.1em;color:#9c5d90}#dash-right-now li.product-count a::before{font-family:WooCommerce;content:'\e01d'}
|
||||
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;text-align:center;float:right;font-size:.8em;border-right:1px solid #fff;border-left:1px solid #ececec;-webkit-box-sizing:border-box;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-right:0}ul.woocommerce_stats li:last-child{border-left:0}ul.woocommerce_stats strong{font-family:Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:right;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;-webkit-transition:all ease .5s;transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:left;position:absolute;left:0;top:50%;margin-left:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;margin:0;text-indent:0;position:absolute;top:0;right:0;width:100%;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:right;margin-left:12px;margin-bottom:12px}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a::before{font-family:Dashicons;content:'\f185'}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a::before{content:'\e006'}#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-left:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.processing-orders a::before{content:'\e011';color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a::before{content:'\e033';color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock{border-left:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a::before{content:'\e016';color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a::before{content:'\e013';color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:right;margin:0 0 5px 10px}#woocommerce_dashboard_recent_reviews .star-rating{float:left;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-right:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating::before{content:'\e021\e021\e021\e021\e021';color:#b3b2b2;float:right;top:0;right:0;position:absolute;letter-spacing:.1em}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:right;top:0;right:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span::before{content:'\e020\e020\e020\e020\e020';top:0;position:absolute;right:0;letter-spacing:.1em;color:#9c5d90}#dash-right-now li.product-count a::before{font-family:WooCommerce;content:'\e01d'}
|
|
@ -1 +1 @@
|
|||
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;text-align:center;float:left;font-size:.8em;border-left:1px solid #fff;border-right:1px solid #ececec;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-left:0}ul.woocommerce_stats li:last-child{border-right:0}ul.woocommerce_stats strong{font-family:Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:left;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:right;position:absolute;right:0;top:50%;margin-right:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:left;margin-right:12px;margin-bottom:12px}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a::before{font-family:Dashicons;content:'\f185'}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a::before{content:'\e006'}#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-right:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.processing-orders a::before{content:'\e011';color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a::before{content:'\e033';color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock{border-right:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a::before{content:'\e016';color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a::before{content:'\e013';color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:left;margin:0 10px 5px 0}#woocommerce_dashboard_recent_reviews .star-rating{float:right;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-left:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating::before{content:'\e021\e021\e021\e021\e021';color:#b3b2b2;float:left;top:0;left:0;position:absolute;letter-spacing:.1em}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span::before{content:'\e020\e020\e020\e020\e020';top:0;position:absolute;left:0;letter-spacing:.1em;color:#9c5d90}#dash-right-now li.product-count a::before{font-family:WooCommerce;content:'\e01d'}
|
||||
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;text-align:center;float:left;font-size:.8em;border-left:1px solid #fff;border-right:1px solid #ececec;-webkit-box-sizing:border-box;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-left:0}ul.woocommerce_stats li:last-child{border-right:0}ul.woocommerce_stats strong{font-family:Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:left;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;-webkit-transition:all ease .5s;transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:right;position:absolute;right:0;top:50%;margin-right:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:left;margin-right:12px;margin-bottom:12px}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a::before{font-family:Dashicons;content:'\f185'}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a::before{content:'\e006'}#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-right:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.processing-orders a::before{content:'\e011';color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a::before{content:'\e033';color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock{border-right:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a::before{content:'\e016';color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a::before{content:'\e013';color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:left;margin:0 10px 5px 0}#woocommerce_dashboard_recent_reviews .star-rating{float:right;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-left:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating::before{content:'\e021\e021\e021\e021\e021';color:#b3b2b2;float:left;top:0;left:0;position:absolute;letter-spacing:.1em}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span::before{content:'\e020\e020\e020\e020\e020';top:0;position:absolute;left:0;letter-spacing:.1em;color:#9c5d90}#dash-right-now li.product-count a::before{font-family:WooCommerce;content:'\e01d'}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -65,8 +65,6 @@ span.mce_woocommerce_shortcodes_button {
|
|||
font: 400 18px/1 dashicons;
|
||||
speak: none;
|
||||
margin: 0 8px 0 -2px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
|
|
|
@ -416,7 +416,6 @@ a.pswp__share--download:hover {
|
|||
*/
|
||||
/* root element of UI */
|
||||
.pswp__ui {
|
||||
-webkit-font-smoothing: auto;
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
z-index: 1550; }
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
*{background:0 0!important;color:#000!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-right:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-right:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-right:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;box-shadow:none!important;border-bottom:1px solid gray!important}
|
||||
*{background:0 0!important;color:#000!important;text-shadow:none!important;-webkit-filter:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;-webkit-transition:none!important;transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-right:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-right:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-right:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;-webkit-box-shadow:none!important;box-shadow:none!important;border-bottom:1px solid gray!important}
|
|
@ -1 +1 @@
|
|||
*{background:0 0!important;color:#000!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-left:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-left:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-left:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;box-shadow:none!important;border-bottom:1px solid gray!important}
|
||||
*{background:0 0!important;color:#000!important;text-shadow:none!important;-webkit-filter:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;-webkit-transition:none!important;transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-left:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-left:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-left:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;-webkit-box-shadow:none!important;box-shadow:none!important;border-bottom:1px solid gray!important}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -282,8 +282,6 @@ body {
|
|||
padding: 0 10px 0 0;
|
||||
top: 1px;
|
||||
position: relative;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-decoration: none !important;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
@ -491,6 +489,7 @@ body {
|
|||
padding: 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
color: #666;
|
||||
align-items: center;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: 0;
|
||||
|
@ -508,7 +507,7 @@ body {
|
|||
padding: 2em 0;
|
||||
align-self: stretch;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: baseline;
|
||||
justify-content: center;
|
||||
|
||||
img {
|
||||
|
@ -516,8 +515,13 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
&.stripe-logo .wc-wizard-service-name img {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
&.paypal-logo .wc-wizard-service-name img {
|
||||
max-width: 87px;
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
&.klarna-logo .wc-wizard-service-name {
|
||||
|
@ -525,6 +529,7 @@ body {
|
|||
|
||||
img {
|
||||
max-width: 87px;
|
||||
padding: 12px 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -533,12 +538,13 @@ body {
|
|||
|
||||
img {
|
||||
max-width: 95px;
|
||||
padding: 12px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.wc-wizard-service-description {
|
||||
flex-grow: 1;
|
||||
padding: 2em 20px;
|
||||
padding: 20px;
|
||||
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
|
@ -562,6 +568,8 @@ body {
|
|||
cursor: pointer;
|
||||
padding: 2em 0;
|
||||
position: relative;
|
||||
max-height: 1.5em;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.wc-wizard-service-toggle {
|
||||
|
@ -1036,10 +1044,10 @@ p.jetpack-terms {
|
|||
}
|
||||
}
|
||||
|
||||
.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_api_subject {
|
||||
.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_email {
|
||||
margin-top: 0.75em;
|
||||
|
||||
label.stripe_email, label.ppec_paypal_api_subject {
|
||||
label.stripe_email, label.ppec_paypal_email {
|
||||
position: absolute;
|
||||
margin: -1px;
|
||||
padding: 0;
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -518,7 +518,6 @@ p.demo_store,
|
|||
background-color: $highlight;
|
||||
color: $highlightext;
|
||||
font-size: 0.857em;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
|
@ -695,7 +694,6 @@ p.demo_store,
|
|||
font-family: 'WooCommerce';
|
||||
content: '\e01c';
|
||||
vertical-align: top;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-weight: 400;
|
||||
position: absolute;
|
||||
top: 0.618em;
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 27 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -22,19 +22,27 @@
|
|||
*/
|
||||
productExportForm.prototype.onSubmit = function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
var currentDate = new Date(),
|
||||
day = currentDate.getDate(),
|
||||
month = currentDate.getMonth() + 1,
|
||||
year = currentDate.getFullYear(),
|
||||
timestamp = currentDate.getTime(),
|
||||
filename = 'wc-product-export-' + day + '-' + month + '-' + year + '-' + timestamp + '.csv';
|
||||
|
||||
event.data.productExportForm.$form.addClass( 'woocommerce-exporter__exporting' );
|
||||
event.data.productExportForm.$form.find('.woocommerce-exporter-progress').val( 0 );
|
||||
event.data.productExportForm.$form.find('.woocommerce-exporter-button').prop( 'disabled', true );
|
||||
event.data.productExportForm.processStep( 1, $( this ).serialize(), '' );
|
||||
event.data.productExportForm.processStep( 1, $( this ).serialize(), '', filename );
|
||||
};
|
||||
|
||||
/**
|
||||
* Process the current export step.
|
||||
*/
|
||||
productExportForm.prototype.processStep = function( step, data, columns ) {
|
||||
var $this = this,
|
||||
productExportForm.prototype.processStep = function( step, data, columns, filename ) {
|
||||
var $this = this,
|
||||
selected_columns = $( '.woocommerce-exporter-columns' ).val(),
|
||||
export_meta = $( '#woocommerce-exporter-meta:checked' ).length ? 1 : 0,
|
||||
export_meta = $( '#woocommerce-exporter-meta:checked' ).length ? 1: 0,
|
||||
export_types = $( '.woocommerce-exporter-types' ).val();
|
||||
|
||||
$.ajax( {
|
||||
|
@ -48,6 +56,7 @@
|
|||
selected_columns : selected_columns,
|
||||
export_meta : export_meta,
|
||||
export_types : export_types,
|
||||
filename : filename,
|
||||
security : wc_product_export_params.export_nonce
|
||||
},
|
||||
dataType: 'json',
|
||||
|
@ -62,7 +71,7 @@
|
|||
}, 2000 );
|
||||
} else {
|
||||
$this.$form.find('.woocommerce-exporter-progress').val( response.data.percentage );
|
||||
$this.processStep( parseInt( response.data.step, 10 ), data, response.data.columns );
|
||||
$this.processStep( parseInt( response.data.step, 10 ), data, response.data.columns, filename );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
!function(o,e){var r=function(o){this.$form=o,this.xhr=!1,this.$form.find(".woocommerce-exporter-progress").val(0),this.processStep=this.processStep.bind(this),o.on("submit",{productExportForm:this},this.onSubmit)};r.prototype.onSubmit=function(e){e.preventDefault(),e.data.productExportForm.$form.addClass("woocommerce-exporter__exporting"),e.data.productExportForm.$form.find(".woocommerce-exporter-progress").val(0),e.data.productExportForm.$form.find(".woocommerce-exporter-button").prop("disabled",!0),e.data.productExportForm.processStep(1,o(this).serialize(),"")},r.prototype.processStep=function(r,t,c){var p=this,s=o(".woocommerce-exporter-columns").val(),a=o("#woocommerce-exporter-meta:checked").length?1:0,m=o(".woocommerce-exporter-types").val();o.ajax({type:"POST",url:ajaxurl,data:{form:t,action:"woocommerce_do_ajax_product_export",step:r,columns:c,selected_columns:s,export_meta:a,export_types:m,security:wc_product_export_params.export_nonce},dataType:"json",success:function(o){o.success&&("done"===o.data.step?(p.$form.find(".woocommerce-exporter-progress").val(o.data.percentage),e.location=o.data.url,setTimeout(function(){p.$form.removeClass("woocommerce-exporter__exporting"),p.$form.find(".woocommerce-exporter-button").prop("disabled",!1)},2e3)):(p.$form.find(".woocommerce-exporter-progress").val(o.data.percentage),p.processStep(parseInt(o.data.step,10),t,o.data.columns)))}}).fail(function(o){e.console.log(o)})},o.fn.wc_product_export_form=function(){return new r(this),this},o(".woocommerce-exporter").wc_product_export_form()}(jQuery,window);
|
||||
!function(o,e){var r=function(o){this.$form=o,this.xhr=!1,this.$form.find(".woocommerce-exporter-progress").val(0),this.processStep=this.processStep.bind(this),o.on("submit",{productExportForm:this},this.onSubmit)};r.prototype.onSubmit=function(e){e.preventDefault();var r=new Date,t="wc-product-export-"+r.getDate()+"-"+(r.getMonth()+1)+"-"+r.getFullYear()+"-"+r.getTime()+".csv";e.data.productExportForm.$form.addClass("woocommerce-exporter__exporting"),e.data.productExportForm.$form.find(".woocommerce-exporter-progress").val(0),e.data.productExportForm.$form.find(".woocommerce-exporter-button").prop("disabled",!0),e.data.productExportForm.processStep(1,o(this).serialize(),"",t)},r.prototype.processStep=function(r,t,c,p){var s=this,a=o(".woocommerce-exporter-columns").val(),m=o("#woocommerce-exporter-meta:checked").length?1:0,n=o(".woocommerce-exporter-types").val();o.ajax({type:"POST",url:ajaxurl,data:{form:t,action:"woocommerce_do_ajax_product_export",step:r,columns:c,selected_columns:a,export_meta:m,export_types:n,filename:p,security:wc_product_export_params.export_nonce},dataType:"json",success:function(o){o.success&&("done"===o.data.step?(s.$form.find(".woocommerce-exporter-progress").val(o.data.percentage),e.location=o.data.url,setTimeout(function(){s.$form.removeClass("woocommerce-exporter__exporting"),s.$form.find(".woocommerce-exporter-button").prop("disabled",!1)},2e3)):(s.$form.find(".woocommerce-exporter-progress").val(o.data.percentage),s.processStep(parseInt(o.data.step,10),t,o.data.columns,p)))}}).fail(function(o){e.console.log(o)})},o.fn.wc_product_export_form=function(){return new r(this),this},o(".woocommerce-exporter").wc_product_export_form()}(jQuery,window);
|
|
@ -130,14 +130,14 @@ jQuery( function( $ ) {
|
|||
.find( 'input.payment-email-input' )
|
||||
.prop( 'required', true );
|
||||
$( this ).closest( '.wc-wizard-service-settings' )
|
||||
.find( '.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_api_subject' )
|
||||
.find( '.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_email' )
|
||||
.show();
|
||||
} else {
|
||||
$( this ).closest( '.wc-wizard-service-settings' )
|
||||
.find( 'input.payment-email-input' )
|
||||
.prop( 'required', false );
|
||||
$( this ).closest( '.wc-wizard-service-settings' )
|
||||
.find( '.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_api_subject' )
|
||||
.find( '.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_email' )
|
||||
.hide();
|
||||
}
|
||||
} ).find( 'input#stripe_create_account, input#ppec_paypal_reroute_requests' ).change();
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(function(e){function i(){e(".wc-setup-content").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}function s(){e("form.activate-jetpack").submit()}function t(){wp.ajax.post("setup_wizard_check_jetpack").then(function(e){if(!e||!e.is_active||"yes"===e.is_active)return s();setTimeout(t,3e3)}).fail(function(){s()})}e(".button-next").on("click",function(){var s=e(this).parents("form").get(0);return("function"!=typeof s.checkValidity||s.checkValidity())&&i(),!0}),e(".wc-wizard-services").on("change",".wc-wizard-service-enable input",function(){e(this).is(":checked")?(e(this).closest(".wc-wizard-service-toggle").removeClass("disabled"),e(this).closest(".wc-wizard-service-item").addClass("checked"),e(this).closest(".wc-wizard-service-item").find(".wc-wizard-service-settings").removeClass("hide")):(e(this).closest(".wc-wizard-service-toggle").addClass("disabled"),e(this).closest(".wc-wizard-service-item").removeClass("checked"),e(this).closest(".wc-wizard-service-item").find(".wc-wizard-service-settings").addClass("hide"))}),e(".wc-wizard-services").on("click",".wc-wizard-service-enable",function(i){if(e(i.target).is("input"))i.stopPropagation();else{var s=e(this).find('input[type="checkbox"]');s.prop("checked",!s.prop("checked")).change()}}),e(".wc-wizard-services-list-toggle").on("change",".wc-wizard-service-enable input",function(){e(this).closest(".wc-wizard-services-list-toggle").toggleClass("closed"),e(this).closest(".wc-wizard-services").find(".wc-wizard-service-item").slideToggle().css("display","flex")}),e(".wc-wizard-services").on("change",".wc-wizard-shipping-method-select .method",function(i){var s=e(this).closest(".wc-wizard-service-description"),t=i.target.value,c=s.find(".shipping-method-descriptions");c.find(".shipping-method-description").addClass("hide"),c.find("."+t).removeClass("hide");var r=s.find(".shipping-method-settings");r.find(".shipping-method-setting").addClass("hide").find(".shipping-method-required-field").prop("required",!1),r.find("."+t).removeClass("hide").find(".shipping-method-required-field").prop("required",!0)}),e(".wc-wizard-services").on("change",".wc-wizard-shipping-method-enable",function(){var i=e(this).is(":checked");e(this).closest(".wc-wizard-service-item").find(".shipping-method-required-field").prop("required",i)}),e(".activate-jetpack").on("click",".button-primary",function(e){if(i(),"no"===wc_setup_params.pending_jetpack_install)return!0;e.preventDefault(),t()}),e(".wc-wizard-services").on("change","input#stripe_create_account, input#ppec_paypal_reroute_requests",function(){e(this).is(":checked")?(e(this).closest(".wc-wizard-service-settings").find("input.payment-email-input").prop("required",!0),e(this).closest(".wc-wizard-service-settings").find(".wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_api_subject").show()):(e(this).closest(".wc-wizard-service-settings").find("input.payment-email-input").prop("required",!1),e(this).closest(".wc-wizard-service-settings").find(".wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_api_subject").hide())}).find("input#stripe_create_account, input#ppec_paypal_reroute_requests").change(),e("select#store_country_state").on("change",function(){var i=this.value.split(":")[0];e("select#currency_code").val(wc_setup_currencies[i]).change()})});
|
||||
jQuery(function(e){function i(){e(".wc-setup-content").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}function s(){e("form.activate-jetpack").submit()}function t(){wp.ajax.post("setup_wizard_check_jetpack").then(function(e){if(!e||!e.is_active||"yes"===e.is_active)return s();setTimeout(t,3e3)}).fail(function(){s()})}e(".button-next").on("click",function(){var s=e(this).parents("form").get(0);return("function"!=typeof s.checkValidity||s.checkValidity())&&i(),!0}),e(".wc-wizard-services").on("change",".wc-wizard-service-enable input",function(){e(this).is(":checked")?(e(this).closest(".wc-wizard-service-toggle").removeClass("disabled"),e(this).closest(".wc-wizard-service-item").addClass("checked"),e(this).closest(".wc-wizard-service-item").find(".wc-wizard-service-settings").removeClass("hide")):(e(this).closest(".wc-wizard-service-toggle").addClass("disabled"),e(this).closest(".wc-wizard-service-item").removeClass("checked"),e(this).closest(".wc-wizard-service-item").find(".wc-wizard-service-settings").addClass("hide"))}),e(".wc-wizard-services").on("click",".wc-wizard-service-enable",function(i){if(e(i.target).is("input"))i.stopPropagation();else{var s=e(this).find('input[type="checkbox"]');s.prop("checked",!s.prop("checked")).change()}}),e(".wc-wizard-services-list-toggle").on("change",".wc-wizard-service-enable input",function(){e(this).closest(".wc-wizard-services-list-toggle").toggleClass("closed"),e(this).closest(".wc-wizard-services").find(".wc-wizard-service-item").slideToggle().css("display","flex")}),e(".wc-wizard-services").on("change",".wc-wizard-shipping-method-select .method",function(i){var s=e(this).closest(".wc-wizard-service-description"),t=i.target.value,c=s.find(".shipping-method-descriptions");c.find(".shipping-method-description").addClass("hide"),c.find("."+t).removeClass("hide");var r=s.find(".shipping-method-settings");r.find(".shipping-method-setting").addClass("hide").find(".shipping-method-required-field").prop("required",!1),r.find("."+t).removeClass("hide").find(".shipping-method-required-field").prop("required",!0)}),e(".wc-wizard-services").on("change",".wc-wizard-shipping-method-enable",function(){var i=e(this).is(":checked");e(this).closest(".wc-wizard-service-item").find(".shipping-method-required-field").prop("required",i)}),e(".activate-jetpack").on("click",".button-primary",function(e){if(i(),"no"===wc_setup_params.pending_jetpack_install)return!0;e.preventDefault(),t()}),e(".wc-wizard-services").on("change","input#stripe_create_account, input#ppec_paypal_reroute_requests",function(){e(this).is(":checked")?(e(this).closest(".wc-wizard-service-settings").find("input.payment-email-input").prop("required",!0),e(this).closest(".wc-wizard-service-settings").find(".wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_email").show()):(e(this).closest(".wc-wizard-service-settings").find("input.payment-email-input").prop("required",!1),e(this).closest(".wc-wizard-service-settings").find(".wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_email").hide())}).find("input#stripe_create_account, input#ppec_paypal_reroute_requests").change(),e("select#store_country_state").on("change",function(){var i=this.value.split(":")[0];e("select#currency_code").val(wc_setup_currencies[i]).change()})});
|
|
@ -178,6 +178,10 @@ jQuery( function ( $ ) {
|
|||
ui.item.removeAttr( 'style' );
|
||||
}
|
||||
});
|
||||
// Focus on inputs within the table if clicked instead of trying to sort.
|
||||
$( '.wc_input_table.sortable tbody input' ).on( 'click', function() {
|
||||
$( this ).focus();
|
||||
} );
|
||||
|
||||
$( '.wc_input_table .remove_rows' ).click( function() {
|
||||
var $tbody = $( this ).closest( '.wc_input_table' ).find( 'tbody' );
|
||||
|
@ -297,12 +301,4 @@ jQuery( function ( $ ) {
|
|||
|
||||
// Attribute term table
|
||||
$( 'table.attributes-table tbody tr:nth-child(odd)' ).addClass( 'alternate' );
|
||||
|
||||
// Load videos when help button is clicked.
|
||||
$( '#contextual-help-link' ).on( 'click', function() {
|
||||
$( '.wc-guided-tour-embed' ).each( function() {
|
||||
var video_id = $( this ).data( 'video_id' );
|
||||
$( this ).replaceWith( '<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/' + video_id + '" frameborder="0" allowfullscreen></iframe>' );
|
||||
} );
|
||||
});
|
||||
});
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -166,7 +166,7 @@ jQuery( function( $ ) {
|
|||
}
|
||||
} ).each( function() {
|
||||
if ( this.complete ) {
|
||||
$( this ).load();
|
||||
$( this ).trigger( 'load' );
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
@ -200,9 +200,9 @@ jQuery( function( $ ) {
|
|||
|
||||
// But only zoom if the img is larger than its container.
|
||||
if ( zoomEnabled ) {
|
||||
var zoom_options = {
|
||||
var zoom_options = $.extend( {
|
||||
touch: false
|
||||
};
|
||||
}, wc_single_product_params.zoom_options );
|
||||
|
||||
if ( 'ontouchstart' in window ) {
|
||||
zoom_options.on = 'click';
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -8,7 +8,6 @@
|
|||
* https://en.wikipedia.org/wiki/ISO_3166-2:MD
|
||||
* https://en.wikipedia.org/wiki/Romanian_alphabet#Unicode_and_HTML
|
||||
*
|
||||
* @author Alexander Minza
|
||||
* @package WooCommerce/i18n
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
@ -20,24 +19,24 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
}
|
||||
|
||||
$states['MD'] = array(
|
||||
'C' => __( 'Chișinău', 'woocommerce' ),
|
||||
'BL' => __( 'Bălți', 'woocommerce' ),
|
||||
'C' => __( 'Chișinău', 'woocommerce' ),
|
||||
'BL' => __( 'Bălți', 'woocommerce' ),
|
||||
'AN' => __( 'Anenii Noi', 'woocommerce' ),
|
||||
'BS' => __( 'Basarabeasca', 'woocommerce' ),
|
||||
'BR' => __( 'Briceni', 'woocommerce' ),
|
||||
'CH' => __( 'Cahul', 'woocommerce' ),
|
||||
'CT' => __( 'Cantemir', 'woocommerce' ),
|
||||
'CL' => __( 'Călărași', 'woocommerce' ),
|
||||
'CS' => __( 'Căușeni', 'woocommerce' ),
|
||||
'CL' => __( 'Călărași', 'woocommerce' ),
|
||||
'CS' => __( 'Căușeni', 'woocommerce' ),
|
||||
'CM' => __( 'Cimișlia', 'woocommerce' ),
|
||||
'CR' => __( 'Criuleni', 'woocommerce' ),
|
||||
'DN' => __( 'Dondușeni', 'woocommerce' ),
|
||||
'DR' => __( 'Drochia', 'woocommerce' ),
|
||||
'DB' => __( 'Dubăsari', 'woocommerce' ),
|
||||
'DB' => __( 'Dubăsari', 'woocommerce' ),
|
||||
'ED' => __( 'Edineț', 'woocommerce' ),
|
||||
'FL' => __( 'Fălești', 'woocommerce' ),
|
||||
'FL' => __( 'Fălești', 'woocommerce' ),
|
||||
'FR' => __( 'Florești', 'woocommerce' ),
|
||||
'GE' => __( 'UTA Găgăuzia', 'woocommerce' ),
|
||||
'GE' => __( 'UTA Găgăuzia', 'woocommerce' ),
|
||||
'GL' => __( 'Glodeni', 'woocommerce' ),
|
||||
'HN' => __( 'Hîncești', 'woocommerce' ),
|
||||
'IL' => __( 'Ialoveni', 'woocommerce' ),
|
||||
|
@ -49,9 +48,9 @@ $states['MD'] = array(
|
|||
'RS' => __( 'Rîșcani', 'woocommerce' ),
|
||||
'SG' => __( 'Sîngerei', 'woocommerce' ),
|
||||
'SR' => __( 'Soroca', 'woocommerce' ),
|
||||
'ST' => __( 'Strășeni', 'woocommerce' ),
|
||||
'SD' => __( 'Șoldănești', 'woocommerce' ),
|
||||
'SV' => __( 'Ștefan Vodă', 'woocommerce' ),
|
||||
'ST' => __( 'Strășeni', 'woocommerce' ),
|
||||
'SD' => __( 'Șoldănești', 'woocommerce' ),
|
||||
'SV' => __( 'Ștefan Vodă', 'woocommerce' ),
|
||||
'TR' => __( 'Taraclia', 'woocommerce' ),
|
||||
'TL' => __( 'Telenești', 'woocommerce' ),
|
||||
'UN' => __( 'Ungheni', 'woocommerce' ),
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* For more details check:
|
||||
* https://ro.wikipedia.org/wiki/Jude%C8%9Bele_Rom%C3%A2niei
|
||||
*
|
||||
* @author Automattic
|
||||
* @package WooCommerce/i18n
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
@ -20,15 +19,15 @@ $states['RO'] = array(
|
|||
'AB' => __( 'Alba', 'woocommerce' ),
|
||||
'AR' => __( 'Arad', 'woocommerce' ),
|
||||
'AG' => __( 'Argeș', 'woocommerce' ),
|
||||
'BC' => __( 'Bacău', 'woocommerce' ),
|
||||
'BC' => __( 'Bacău', 'woocommerce' ),
|
||||
'BH' => __( 'Bihor', 'woocommerce' ),
|
||||
'BN' => __( 'Bistrița-Năsăud', 'woocommerce' ),
|
||||
'BN' => __( 'Bistrița-Năsăud', 'woocommerce' ),
|
||||
'BT' => __( 'Botoșani', 'woocommerce' ),
|
||||
'BR' => __( 'Brăila', 'woocommerce' ),
|
||||
'BR' => __( 'Brăila', 'woocommerce' ),
|
||||
'BV' => __( 'Brașov', 'woocommerce' ),
|
||||
'B' => __( 'București', 'woocommerce' ),
|
||||
'BZ' => __( 'Buzău', 'woocommerce' ),
|
||||
'CL' => __( 'Călărași', 'woocommerce' ),
|
||||
'BZ' => __( 'Buzău', 'woocommerce' ),
|
||||
'CL' => __( 'Călărași', 'woocommerce' ),
|
||||
'CS' => __( 'Caraș-Severin', 'woocommerce' ),
|
||||
'CJ' => __( 'Cluj', 'woocommerce' ),
|
||||
'CT' => __( 'Constanța', 'woocommerce' ),
|
||||
|
@ -49,7 +48,7 @@ $states['RO'] = array(
|
|||
'NT' => __( 'Neamț', 'woocommerce' ),
|
||||
'OT' => __( 'Olt', 'woocommerce' ),
|
||||
'PH' => __( 'Prahova', 'woocommerce' ),
|
||||
'SJ' => __( 'Sălaj', 'woocommerce' ),
|
||||
'SJ' => __( 'Sălaj', 'woocommerce' ),
|
||||
'SM' => __( 'Satu Mare', 'woocommerce' ),
|
||||
'SB' => __( 'Sibiu', 'woocommerce' ),
|
||||
'SV' => __( 'Suceava', 'woocommerce' ),
|
||||
|
|
|
@ -1453,11 +1453,11 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
|||
public function get_item_subtotal( $item, $inc_tax = false, $round = true ) {
|
||||
$subtotal = 0;
|
||||
|
||||
if ( is_callable( array( $item, 'get_subtotal' ) ) ) {
|
||||
if ( is_callable( array( $item, 'get_subtotal' ) ) && $item->get_quantity() ) {
|
||||
if ( $inc_tax ) {
|
||||
$subtotal = ( $item->get_subtotal() + $item->get_subtotal_tax() ) / max( 1, $item->get_quantity() );
|
||||
$subtotal = ( $item->get_subtotal() + $item->get_subtotal_tax() ) / $item->get_quantity();
|
||||
} else {
|
||||
$subtotal = ( floatval( $item->get_subtotal() ) / max( 1, $item->get_quantity() ) );
|
||||
$subtotal = floatval( $item->get_subtotal() ) / $item->get_quantity();
|
||||
}
|
||||
|
||||
$subtotal = $round ? number_format( (float) $subtotal, wc_get_price_decimals(), '.', '' ) : $subtotal;
|
||||
|
@ -1501,11 +1501,11 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
|||
public function get_item_total( $item, $inc_tax = false, $round = true ) {
|
||||
$total = 0;
|
||||
|
||||
if ( is_callable( array( $item, 'get_total' ) ) ) {
|
||||
if ( is_callable( array( $item, 'get_total' ) ) && $item->get_quantity() ) {
|
||||
if ( $inc_tax ) {
|
||||
$total = ( $item->get_total() + $item->get_total_tax() ) / max( 1, $item->get_quantity() );
|
||||
$total = ( $item->get_total() + $item->get_total_tax() ) / $item->get_quantity();
|
||||
} else {
|
||||
$total = floatval( $item->get_total() ) / max( 1, $item->get_quantity() );
|
||||
$total = floatval( $item->get_total() ) / $item->get_quantity();
|
||||
}
|
||||
|
||||
$total = $round ? round( $total, wc_get_price_decimals() ) : $total;
|
||||
|
@ -1546,8 +1546,8 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
|||
public function get_item_tax( $item, $round = true ) {
|
||||
$tax = 0;
|
||||
|
||||
if ( is_callable( array( $item, 'get_total_tax' ) ) ) {
|
||||
$tax = $item->get_total_tax() / max( 1, $item->get_quantity() );
|
||||
if ( is_callable( array( $item, 'get_total_tax' ) ) && $item->get_quantity() ) {
|
||||
$tax = $item->get_total_tax() / $item->get_quantity();
|
||||
$tax = $round ? wc_round_tax_total( $tax ) : $tax;
|
||||
}
|
||||
|
||||
|
|
|
@ -1177,7 +1177,7 @@ class WC_Product extends WC_Abstract_Legacy_Product {
|
|||
if ( is_a( $download, 'WC_Product_Download' ) ) {
|
||||
$download_object = $download;
|
||||
} else {
|
||||
$download_object = new WC_Product_Download();
|
||||
$download_object = new WC_Product_Download();
|
||||
|
||||
// If we don't have a previous hash, generate UUID for download.
|
||||
if ( empty( $download['download_id'] ) ) {
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
/**
|
||||
* Init WooCommerce data exporters.
|
||||
*
|
||||
* @author WooThemes
|
||||
* @category Admin
|
||||
* @package WooCommerce/Admin
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
@ -95,6 +93,11 @@ class WC_Admin_Exporters {
|
|||
if ( isset( $_GET['action'], $_GET['nonce'] ) && wp_verify_nonce( wp_unslash( $_GET['nonce'] ), 'product-csv' ) && 'download_product_csv' === wp_unslash( $_GET['action'] ) ) { // WPCS: input var ok, sanitization ok.
|
||||
include_once( WC_ABSPATH . 'includes/export/class-wc-product-csv-exporter.php' );
|
||||
$exporter = new WC_Product_CSV_Exporter();
|
||||
|
||||
if ( ! empty( $_GET['filename'] ) ) { // WPCS: input var ok.
|
||||
$exporter->set_filename( wp_unslash( $_GET['filename'] ) ); // WPCS: input var ok, sanitization ok.
|
||||
}
|
||||
|
||||
$exporter->export();
|
||||
}
|
||||
}
|
||||
|
@ -130,10 +133,14 @@ class WC_Admin_Exporters {
|
|||
$exporter->set_product_types_to_export( wp_unslash( $_POST['export_types'] ) ); // WPCS: input var ok, sanitization ok.
|
||||
}
|
||||
|
||||
if ( ! empty( $_POST['filename'] ) ) { // WPCS: input var ok.
|
||||
$exporter->set_filename( wp_unslash( $_POST['filename'] ) ); // WPCS: input var ok, sanitization ok.
|
||||
}
|
||||
|
||||
$exporter->set_page( $step );
|
||||
$exporter->generate_file();
|
||||
|
||||
$query_args = apply_filters( 'woocommerce_export_get_ajax_query_args', array( 'nonce' => wp_create_nonce( 'product-csv' ), 'action' => 'download_product_csv' ) );
|
||||
$query_args = apply_filters( 'woocommerce_export_get_ajax_query_args', array( 'nonce' => wp_create_nonce( 'product-csv' ), 'action' => 'download_product_csv', 'filename' => $exporter->get_filename() ) );
|
||||
|
||||
if ( 100 === $exporter->get_percent_complete() ) {
|
||||
wp_send_json_success( array(
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
/**
|
||||
* Add some content to the help tab
|
||||
*
|
||||
* @author WooThemes
|
||||
* @category Admin
|
||||
* @package WooCommerce/Admin
|
||||
* @version 2.1.0
|
||||
*/
|
||||
|
@ -29,7 +27,7 @@ class WC_Admin_Help {
|
|||
}
|
||||
|
||||
/**
|
||||
* Add Contextual help tabs.
|
||||
* Add help tabs.
|
||||
*/
|
||||
public function add_tabs() {
|
||||
$screen = get_current_screen();
|
||||
|
@ -38,173 +36,24 @@ class WC_Admin_Help {
|
|||
return;
|
||||
}
|
||||
|
||||
$video_map = array(
|
||||
'wc-settings' => array(
|
||||
'title' => __( 'General Settings', 'woocommerce' ),
|
||||
'id' => 'ZD5Cc2xqvCM',
|
||||
),
|
||||
'wc-settings-general' => array(
|
||||
'title' => __( 'General Settings', 'woocommerce' ),
|
||||
'id' => 'ZD5Cc2xqvCM',
|
||||
),
|
||||
'wc-settings-products' => array(
|
||||
'title' => __( 'Product Settings', 'woocommerce' ),
|
||||
'id' => 'FEmwJsE8xDY',
|
||||
),
|
||||
'wc-settings-tax' => array(
|
||||
'title' => __( 'Tax Settings', 'woocommerce' ),
|
||||
'id' => '0aPtye5ba4A',
|
||||
),
|
||||
'wc-settings-tax-standard' => array(
|
||||
'title' => __( 'Tax Rate Example', 'woocommerce' ),
|
||||
'id' => 'HC2IUnJSJro',
|
||||
),
|
||||
'wc-settings-tax-reduced-rate' => array(
|
||||
'title' => __( 'Tax Rate Example', 'woocommerce' ),
|
||||
'id' => 'HC2IUnJSJro',
|
||||
),
|
||||
'wc-settings-tax-zero-rate' => array(
|
||||
'title' => __( 'Tax Rate Example', 'woocommerce' ),
|
||||
'id' => 'HC2IUnJSJro',
|
||||
),
|
||||
'wc-settings-shipping' => array(
|
||||
'title' => __( 'Shipping Zones', 'woocommerce' ),
|
||||
'id' => '1HhBEbIMqAQ',
|
||||
),
|
||||
'wc-settings-shipping-options' => array(
|
||||
'title' => __( 'Shipping Options', 'woocommerce' ),
|
||||
'id' => '468Z4s01e3M',
|
||||
),
|
||||
'wc-settings-shipping-classes' => array(
|
||||
'title' => __( 'Shipping Classes', 'woocommerce' ),
|
||||
'id' => 'Vyt5xIewlOs',
|
||||
),
|
||||
'wc-settings-checkout' => array(
|
||||
'title' => __( 'Checkout Settings', 'woocommerce' ),
|
||||
'id' => 'zoejwJfXops',
|
||||
),
|
||||
'wc-settings-checkout-bacs' => array(
|
||||
'title' => __( 'Bank Transfer (BACS) Payment Method', 'woocommerce' ),
|
||||
'id' => 'K4Lpaq9aS2Q',
|
||||
),
|
||||
'wc-settings-checkout-cheque' => array(
|
||||
'title' => __( 'Check Payment Method', 'woocommerce' ),
|
||||
'id' => 'LwxRxCkfofg',
|
||||
),
|
||||
'wc-settings-checkout-cod' => array(
|
||||
'title' => __( 'Cash on Delivery (COD) Payment Method', 'woocommerce' ),
|
||||
'id' => 'aioOdPELH4M',
|
||||
),
|
||||
'wc-settings-checkout-paypal' => array(
|
||||
'title' => __( 'PayPal Standard Method', 'woocommerce' ),
|
||||
'id' => 'FwHT5UDdkdY',
|
||||
),
|
||||
'wc-settings-checkout-paypalbraintree_cards' => array(
|
||||
'title' => __( 'PayPal by Braintree Payment Method', 'woocommerce' ),
|
||||
'id' => 'hubcUWq2NAc',
|
||||
),
|
||||
'wc-settings-checkout-stripe' => array(
|
||||
'title' => __( 'Stripe Payment Method', 'woocommerce' ),
|
||||
'id' => '5rMDGdkmSGU',
|
||||
),
|
||||
'wc-settings-account' => array(
|
||||
'title' => __( 'Account Settings', 'woocommerce' ),
|
||||
'id' => 'AGZSeX5I-wo',
|
||||
),
|
||||
'wc-settings-email' => array(
|
||||
'title' => __( 'Email Settings', 'woocommerce' ),
|
||||
'id' => '2vtzGc92tFU',
|
||||
),
|
||||
'wc-settings-api' => array(
|
||||
'title' => __( 'API Settings', 'woocommerce' ),
|
||||
'id' => 'SjJUmgfLS4A',
|
||||
),
|
||||
'product' => array(
|
||||
'title' => __( 'Creating Products', 'woocommerce' ),
|
||||
'id' => 'sFtXa00Jf_o',
|
||||
),
|
||||
'edit-product_cat' => array(
|
||||
'title' => __( 'Product Categories', 'woocommerce' ),
|
||||
'id' => 'PeFsOTrN1u8',
|
||||
),
|
||||
'edit-product_tag' => array(
|
||||
'title' => __( 'Product Tags', 'woocommerce' ),
|
||||
'id' => 'PeFsOTrN1u8',
|
||||
),
|
||||
'product_attributes' => array(
|
||||
'title' => __( 'Product Attributes', 'woocommerce' ),
|
||||
'id' => 'PeFsOTrN1u8',
|
||||
),
|
||||
'wc-status' => array(
|
||||
'title' => __( 'System Status', 'woocommerce' ),
|
||||
'id' => 'C8F6_sAr4CE',
|
||||
),
|
||||
'wc-reports' => array(
|
||||
'title' => __( 'Reports', 'woocommerce' ),
|
||||
'id' => '69adRkRqOk0',
|
||||
),
|
||||
'edit-shop_coupon' => array(
|
||||
'title' => __( 'Coupons', 'woocommerce' ),
|
||||
'id' => 'k-GKjRs59UM',
|
||||
),
|
||||
'shop_coupon' => array(
|
||||
'title' => __( 'Coupons', 'woocommerce' ),
|
||||
'id' => 'k-GKjRs59UM',
|
||||
),
|
||||
'edit-shop_order' => array(
|
||||
'title' => __( 'Managing Orders', 'woocommerce' ),
|
||||
'id' => 'rjS3mbiLN_c',
|
||||
),
|
||||
'shop_order' => array(
|
||||
'title' => __( 'Managing Orders', 'woocommerce' ),
|
||||
'id' => 'rjS3mbiLN_c',
|
||||
),
|
||||
);
|
||||
|
||||
$page = empty( $_GET['page'] ) ? '' : sanitize_title( $_GET['page'] );
|
||||
$tab = empty( $_GET['tab'] ) ? '' : sanitize_title( $_GET['tab'] );
|
||||
$section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] );
|
||||
$video_key = $page ? implode( '-', array_filter( array( $page, $tab, $section ) ) ) : $screen->id;
|
||||
|
||||
// Fallback for sections.
|
||||
if ( ! isset( $video_map[ $video_key ] ) ) {
|
||||
$video_key = $page ? implode( '-', array_filter( array( $page, $tab ) ) ) : $screen->id;
|
||||
}
|
||||
|
||||
// Fallback for tabs.
|
||||
if ( ! isset( $video_map[ $video_key ] ) ) {
|
||||
$video_key = $page ? $page : $screen->id;
|
||||
}
|
||||
|
||||
if ( isset( $video_map[ $video_key ] ) ) {
|
||||
$embed_code = '
|
||||
<a href="https://www.youtube.com/watch?v=' . esc_attr( $video_map[ $video_key ]['id'] ) . '" target="_blank" class="wc-guided-tour-embed" data-video_id="' . esc_attr( $video_map[ $video_key ]['id'] ) . '">
|
||||
<img src="https://img.youtube.com/vi/' . esc_attr( $video_map[ $video_key ]['id'] ) . '/maxresdefault.jpg" width="560" height="315" />
|
||||
</a>';
|
||||
|
||||
$screen->add_help_tab( array(
|
||||
'id' => 'woocommerce_guided_tour_tab',
|
||||
'title' => __( 'Guided Tour', 'woocommerce' ),
|
||||
'content' => '<h2><a href="https://docs.woocommerce.com/document/woocommerce-guided-tour-videos/?utm_source=helptab&utm_medium=product&utm_content=videos&utm_campaign=woocommerceplugin">' . __( 'Guided Tour', 'woocommerce' ) . '</a> – ' . esc_html( $video_map[ $video_key ]['title'] ) . '</h2>' . $embed_code,
|
||||
) );
|
||||
}
|
||||
|
||||
$screen->add_help_tab( array(
|
||||
'id' => 'woocommerce_support_tab',
|
||||
'title' => __( 'Help & Support', 'woocommerce' ),
|
||||
'content' =>
|
||||
'<h2>' . __( 'Help & Support', 'woocommerce' ) . '</h2>' .
|
||||
'<p>' . sprintf(
|
||||
__( 'Should you need help understanding, using, or extending WooCommerce, <a href="%s">please read our documentation</a>. You will find all kinds of resources including snippets, tutorials and much more.' , 'woocommerce' ),
|
||||
/* translators: %s: Documentation URL */
|
||||
__( 'Should you need help understanding, using, or extending WooCommerce, <a href="%s">please read our documentation</a>. You will find all kinds of resources including snippets, tutorials and much more.', 'woocommerce' ),
|
||||
'https://docs.woocommerce.com/documentation/plugins/woocommerce/?utm_source=helptab&utm_medium=product&utm_content=docs&utm_campaign=woocommerceplugin'
|
||||
) . '</p>' .
|
||||
'<p>' . sprintf(
|
||||
/* translators: %s: Forum URL */
|
||||
__( 'For further assistance with WooCommerce core you can use the <a href="%1$s">community forum</a>. If you need help with premium extensions sold by WooCommerce, please <a href="%2$s">use our helpdesk</a>.', 'woocommerce' ),
|
||||
'https://wordpress.org/support/plugin/woocommerce',
|
||||
'https://woocommerce.com/my-account/tickets/?utm_source=helptab&utm_medium=product&utm_content=tickets&utm_campaign=woocommerceplugin'
|
||||
) . '</p>' .
|
||||
'<p>' . __( 'Before asking for help we recommend checking the system status page to identify any problems with your configuration.', 'woocommerce' ) . '</p>' .
|
||||
'<p><a href="' . admin_url( 'admin.php?page=wc-status' ) . '" class="button button-primary">' . __( 'System status', 'woocommerce' ) . '</a> <a href="' . 'https://wordpress.org/support/plugin/woocommerce' . '" class="button">' . __( 'Community forum', 'woocommerce' ) . '</a> <a href="' . 'https://woocommerce.com/my-account/tickets/?utm_source=helptab&utm_medium=product&utm_content=tickets&utm_campaign=woocommerceplugin' . '" class="button">' . __( 'WooCommerce helpdesk', 'woocommerce' ) . '</a></p>',
|
||||
'<p><a href="' . admin_url( 'admin.php?page=wc-status' ) . '" class="button button-primary">' . __( 'System status', 'woocommerce' ) . '</a> <a href="https://wordpress.org/support/plugin/woocommerce" class="button">' . __( 'Community forum', 'woocommerce' ) . '</a> <a href="https://woocommerce.com/my-account/tickets/?utm_source=helptab&utm_medium=product&utm_content=tickets&utm_campaign=woocommerceplugin" class="button">' . __( 'WooCommerce helpdesk', 'woocommerce' ) . '</a></p>',
|
||||
) );
|
||||
|
||||
$screen->add_help_tab( array(
|
||||
|
@ -212,8 +61,9 @@ class WC_Admin_Help {
|
|||
'title' => __( 'Found a bug?', 'woocommerce' ),
|
||||
'content' =>
|
||||
'<h2>' . __( 'Found a bug?', 'woocommerce' ) . '</h2>' .
|
||||
/* translators: 1: GitHub issues URL 2: GitHub contribution guide URL 3: System status report URL */
|
||||
'<p>' . sprintf( __( 'If you find a bug within WooCommerce core you can create a ticket via <a href="%1$s">Github issues</a>. Ensure you read the <a href="%2$s">contribution guide</a> prior to submitting your report. To help us solve your issue, please be as descriptive as possible and include your <a href="%3$s">system status report</a>.', 'woocommerce' ), 'https://github.com/woocommerce/woocommerce/issues?state=open', 'https://github.com/woocommerce/woocommerce/blob/master/.github/CONTRIBUTING.md', admin_url( 'admin.php?page=wc-status' ) ) . '</p>' .
|
||||
'<p><a href="' . 'https://github.com/woocommerce/woocommerce/issues?state=open' . '" class="button button-primary">' . __( 'Report a bug', 'woocommerce' ) . '</a> <a href="' . admin_url( 'admin.php?page=wc-status' ) . '" class="button">' . __( 'System status', 'woocommerce' ) . '</a></p>',
|
||||
'<p><a href="https://github.com/woocommerce/woocommerce/issues?state=open" class="button button-primary">' . __( 'Report a bug', 'woocommerce' ) . '</a> <a href="' . admin_url( 'admin.php?page=wc-status' ) . '" class="button">' . __( 'System status', 'woocommerce' ) . '</a></p>',
|
||||
|
||||
) );
|
||||
|
||||
|
@ -223,7 +73,7 @@ class WC_Admin_Help {
|
|||
'content' =>
|
||||
'<h2>' . __( 'Education', 'woocommerce' ) . '</h2>' .
|
||||
'<p>' . __( 'If you would like to learn about using WooCommerce from an expert, consider following a WooCommerce course offered by one of our educational partners.', 'woocommerce' ) . '</p>' .
|
||||
'<p><a href="' . 'https://woocommerce.com/educational-partners/?utm_source=helptab&utm_medium=product&utm_content=edupartners&utm_campaign=woocommerceplugin' . '" class="button button-primary">' . __( 'View education partners', 'woocommerce' ) . '</a></p>',
|
||||
'<p><a href="https://woocommerce.com/educational-partners/?utm_source=helptab&utm_medium=product&utm_content=edupartners&utm_campaign=woocommerceplugin" class="button button-primary">' . __( 'View education partners', 'woocommerce' ) . '</a></p>',
|
||||
) );
|
||||
|
||||
$screen->add_help_tab( array(
|
||||
|
@ -238,11 +88,11 @@ class WC_Admin_Help {
|
|||
|
||||
$screen->set_help_sidebar(
|
||||
'<p><strong>' . __( 'For more information:', 'woocommerce' ) . '</strong></p>' .
|
||||
'<p><a href="' . 'https://woocommerce.com/?utm_source=helptab&utm_medium=product&utm_content=about&utm_campaign=woocommerceplugin' . '" target="_blank">' . __( 'About WooCommerce', 'woocommerce' ) . '</a></p>' .
|
||||
'<p><a href="' . 'https://wordpress.org/plugins/woocommerce/' . '" target="_blank">' . __( 'WordPress.org project', 'woocommerce' ) . '</a></p>' .
|
||||
'<p><a href="' . 'https://github.com/woocommerce/woocommerce' . '" target="_blank">' . __( 'Github project', 'woocommerce' ) . '</a></p>' .
|
||||
'<p><a href="' . 'https://woocommerce.com/product-category/themes/woocommerce/?utm_source=helptab&utm_medium=product&utm_content=wcthemes&utm_campaign=woocommerceplugin' . '" target="_blank">' . __( 'Official themes', 'woocommerce' ) . '</a></p>' .
|
||||
'<p><a href="' . 'https://woocommerce.com/product-category/woocommerce-extensions/?utm_source=helptab&utm_medium=product&utm_content=wcextensions&utm_campaign=woocommerceplugin' . '" target="_blank">' . __( 'Official extensions', 'woocommerce' ) . '</a></p>'
|
||||
'<p><a href="https://woocommerce.com/?utm_source=helptab&utm_medium=product&utm_content=about&utm_campaign=woocommerceplugin" target="_blank">' . __( 'About WooCommerce', 'woocommerce' ) . '</a></p>' .
|
||||
'<p><a href="https://wordpress.org/plugins/woocommerce/" target="_blank">' . __( 'WordPress.org project', 'woocommerce' ) . '</a></p>' .
|
||||
'<p><a href="https://github.com/woocommerce/woocommerce" target="_blank">' . __( 'Github project', 'woocommerce' ) . '</a></p>' .
|
||||
'<p><a href="https://woocommerce.com/product-category/themes/woocommerce/?utm_source=helptab&utm_medium=product&utm_content=wcthemes&utm_campaign=woocommerceplugin" target="_blank">' . __( 'Official themes', 'woocommerce' ) . '</a></p>' .
|
||||
'<p><a href="https://woocommerce.com/product-category/woocommerce-extensions/?utm_source=helptab&utm_medium=product&utm_content=wcextensions&utm_campaign=woocommerceplugin" target="_blank">' . __( 'Official extensions', 'woocommerce' ) . '</a></p>'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1111,7 +1111,7 @@ class WC_Admin_Setup_Wizard {
|
|||
'https://woocommerce.com/products/klarna/'
|
||||
) . '</p>';
|
||||
$square_description = '<p>' . sprintf(
|
||||
__( 'Accept Visa, Mastercard, Discover, and American Express all for one low rate, with no surprise fees. <a href="%s" target="_blank">Learn more about Square</a>.', 'woocommerce' ),
|
||||
__( 'Securely accept credit and debit cards with one low rate, no surprise fees (custom rates available). Sell online and in store and track sales and inventory in one place. <a href="%s" target="_blank">Learn more about Square</a>.', 'woocommerce' ),
|
||||
'https://woocommerce.com/products/square/'
|
||||
) . '</p>';
|
||||
|
||||
|
@ -1120,7 +1120,7 @@ class WC_Admin_Setup_Wizard {
|
|||
'name' => __( 'Stripe', 'woocommerce' ),
|
||||
'image' => WC()->plugin_url() . '/assets/images/stripe.png',
|
||||
'description' => $stripe_description,
|
||||
'class' => 'checked',
|
||||
'class' => 'checked stripe-logo',
|
||||
'repo-slug' => 'woocommerce-gateway-stripe',
|
||||
'settings' => array(
|
||||
'create_account' => array(
|
||||
|
@ -1155,7 +1155,7 @@ class WC_Admin_Setup_Wizard {
|
|||
'placeholder' => '',
|
||||
'required' => false,
|
||||
),
|
||||
'api_subject' => array(
|
||||
'email' => array(
|
||||
'label' => __( 'Direct payments to email address:', 'woocommerce' ),
|
||||
'type' => 'email',
|
||||
'value' => $user_email,
|
||||
|
|
|
@ -47,6 +47,7 @@ class WC_Admin_List_Table_Coupons extends WC_Admin_List_Table {
|
|||
echo '<div class="woocommerce-BlankState">';
|
||||
echo '<h2 class="woocommerce-BlankState-message">' . esc_html__( 'Coupons are a great way to offer discounts and rewards to your customers. They will appear here once created.', 'woocommerce' ) . '</h2>';
|
||||
echo '<a class="woocommerce-BlankState-cta button-primary button" target="_blank" href="https://docs.woocommerce.com/document/coupon-management/?utm_source=blankslate&utm_medium=product&utm_content=couponsdoc&utm_campaign=woocommerceplugin">' . esc_html__( 'Learn more about coupons', 'woocommerce' ) . '</a>';
|
||||
echo '<a class="woocommerce-BlankState-cta button-primary button" href="' . esc_url ( admin_url( 'post-new.php?post_type=shop_coupon' ) ) . '">' . esc_html__( 'Create your first coupon', 'woocommerce' ) . '</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
|
|
@ -219,13 +219,18 @@ class WC_Meta_Box_Order_Data {
|
|||
?></p>
|
||||
<div class="order_data_column_container">
|
||||
<div class="order_data_column">
|
||||
<h3><?php _e( 'General Details', 'woocommerce' ); ?></h3>
|
||||
<h3><?php esc_html_e( 'General', 'woocommerce' ); ?></h3>
|
||||
|
||||
<p class="form-field form-field-wide"><label for="order_date"><?php _e( 'Order date:', 'woocommerce' ) ?></label>
|
||||
<input type="text" class="date-picker" name="order_date" id="order_date" maxlength="10" value="<?php echo date_i18n( 'Y-m-d', strtotime( $post->post_date ) ); ?>" pattern="<?php echo esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ); ?>" />@‎<input type="number" class="hour" placeholder="<?php esc_attr_e( 'h', 'woocommerce' ) ?>" name="order_date_hour" id="order_date_hour" min="0" max="23" step="1" value="<?php echo date_i18n( 'H', strtotime( $post->post_date ) ); ?>" pattern="([01]?[0-9]{1}|2[0-3]{1})" />:<input type="number" class="minute" placeholder="<?php esc_attr_e( 'm', 'woocommerce' ) ?>" name="order_date_minute" id="order_date_minute" min="0" max="59" step="1" value="<?php echo date_i18n( 'i', strtotime( $post->post_date ) ); ?>" pattern="[0-5]{1}[0-9]{1}" />‎
|
||||
<p class="form-field form-field-wide"><label for="order_date"><?php _e( 'Date created:', 'woocommerce' ) ?></label>
|
||||
<input type="text" class="date-picker" name="order_date" maxlength="10" value="<?php echo esc_attr( date_i18n( 'Y-m-d', strtotime( $post->post_date ) ) ); ?>" pattern="<?php echo esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ); ?>" />@
|
||||
‎
|
||||
<input type="number" class="hour" placeholder="<?php esc_attr_e( 'h', 'woocommerce' ) ?>" name="order_date_hour" min="0" max="23" step="1" value="<?php echo esc_attr( date_i18n( 'H', strtotime( $post->post_date ) ) ); ?>" pattern="([01]?[0-9]{1}|2[0-3]{1})" />:
|
||||
<input type="number" class="minute" placeholder="<?php esc_attr_e( 'm', 'woocommerce' ) ?>" name="order_date_minute" min="0" max="59" step="1" value="<?php echo esc_attr( date_i18n( 'i', strtotime( $post->post_date ) ) ); ?>" pattern="[0-5]{1}[0-9]{1}" />
|
||||
<input type="hidden" name="order_date_second" value="<?php echo esc_attr( date_i18n( 's', strtotime( $post->post_date ) ) ); ?>" />
|
||||
‎
|
||||
</p>
|
||||
|
||||
<p class="form-field form-field-wide wc-order-status"><label for="order_status"><?php _e( 'Order status:', 'woocommerce' ) ?> <?php
|
||||
<p class="form-field form-field-wide wc-order-status"><label for="order_status"><?php _e( 'Status:', 'woocommerce' ) ?> <?php
|
||||
if ( $order->needs_payment() ) {
|
||||
printf( '<a href="%s">%s</a>',
|
||||
esc_url( $order->get_checkout_payment_url() ),
|
||||
|
@ -281,10 +286,10 @@ class WC_Meta_Box_Order_Data {
|
|||
</div>
|
||||
<div class="order_data_column">
|
||||
<h3>
|
||||
<?php _e( 'Billing details', 'woocommerce' ); ?>
|
||||
<a href="#" class="edit_address"><?php _e( 'Edit', 'woocommerce' ); ?></a>
|
||||
<?php esc_html_e( 'Billing', 'woocommerce' ); ?>
|
||||
<a href="#" class="edit_address"><?php esc_html_e( 'Edit', 'woocommerce' ); ?></a>
|
||||
<span>
|
||||
<a href="#" class="load_customer_billing" style="display:none;"><?php _e( 'Load billing address', 'woocommerce' ); ?></a>
|
||||
<a href="#" class="load_customer_billing" style="display:none;"><?php esc_html_e( 'Load billing address', 'woocommerce' ); ?></a>
|
||||
</span>
|
||||
</h3>
|
||||
<?php
|
||||
|
@ -292,7 +297,7 @@ class WC_Meta_Box_Order_Data {
|
|||
echo '<div class="address">';
|
||||
|
||||
if ( $order->get_formatted_billing_address() ) {
|
||||
echo '<p><strong>' . __( 'Address:', 'woocommerce' ) . '</strong>' . wp_kses( $order->get_formatted_billing_address(), array( 'br' => array() ) ) . '</p>';
|
||||
echo '<p>' . wp_kses( $order->get_formatted_billing_address(), array( 'br' => array() ) ) . '</p>';
|
||||
} else {
|
||||
echo '<p class="none_set"><strong>' . __( 'Address:', 'woocommerce' ) . '</strong> ' . __( 'No billing address set.', 'woocommerce' ) . '</p>';
|
||||
}
|
||||
|
@ -342,9 +347,9 @@ class WC_Meta_Box_Order_Data {
|
|||
}
|
||||
?>
|
||||
<p class="form-field form-field-wide">
|
||||
<label><?php _e( 'Payment method:', 'woocommerce' ); ?></label>
|
||||
<label><?php esc_html_e( 'Payment method:', 'woocommerce' ); ?></label>
|
||||
<select name="_payment_method" id="_payment_method" class="first">
|
||||
<option value=""><?php _e( 'N/A', 'woocommerce' ); ?></option>
|
||||
<option value=""><?php esc_html_e( 'N/A', 'woocommerce' ); ?></option>
|
||||
<?php
|
||||
$found_method = false;
|
||||
|
||||
|
@ -377,11 +382,11 @@ class WC_Meta_Box_Order_Data {
|
|||
<div class="order_data_column">
|
||||
|
||||
<h3>
|
||||
<?php _e( 'Shipping details', 'woocommerce' ); ?>
|
||||
<a href="#" class="edit_address"><?php _e( 'Edit', 'woocommerce' ); ?></a>
|
||||
<?php esc_html_e( 'Shipping', 'woocommerce' ); ?>
|
||||
<a href="#" class="edit_address"><?php esc_html_e( 'Edit', 'woocommerce' ); ?></a>
|
||||
<span>
|
||||
<a href="#" class="load_customer_shipping" style="display:none;"><?php _e( 'Load shipping address', 'woocommerce' ); ?></a>
|
||||
<a href="#" class="billing-same-as-shipping" style="display:none;"><?php _e( 'Copy billing address', 'woocommerce' ); ?></a>
|
||||
<a href="#" class="load_customer_shipping" style="display:none;"><?php esc_html_e( 'Load shipping address', 'woocommerce' ); ?></a>
|
||||
<a href="#" class="billing-same-as-shipping" style="display:none;"><?php esc_html_e( 'Copy billing address', 'woocommerce' ); ?></a>
|
||||
</span>
|
||||
</h3>
|
||||
<?php
|
||||
|
@ -389,7 +394,7 @@ class WC_Meta_Box_Order_Data {
|
|||
echo '<div class="address">';
|
||||
|
||||
if ( $order->get_formatted_shipping_address() ) {
|
||||
echo '<p><strong>' . __( 'Address:', 'woocommerce' ) . '</strong>' . wp_kses( $order->get_formatted_shipping_address(), array( 'br' => array() ) ) . '</p>';
|
||||
echo '<p>' . wp_kses( $order->get_formatted_shipping_address(), array( 'br' => array() ) ) . '</p>';
|
||||
} else {
|
||||
echo '<p class="none_set"><strong>' . __( 'Address:', 'woocommerce' ) . '</strong> ' . __( 'No shipping address set.', 'woocommerce' ) . '</p>';
|
||||
}
|
||||
|
@ -547,7 +552,7 @@ class WC_Meta_Box_Order_Data {
|
|||
if ( empty( $_POST['order_date'] ) ) {
|
||||
$date = current_time( 'timestamp', true );
|
||||
} else {
|
||||
$date = gmdate( 'Y-m-d H:i:s', strtotime( $_POST['order_date'] . ' ' . (int) $_POST['order_date_hour'] . ':' . (int) $_POST['order_date_minute'] . ':00' ) );
|
||||
$date = gmdate( 'Y-m-d H:i:s', strtotime( $_POST['order_date'] . ' ' . (int) $_POST['order_date_hour'] . ':' . (int) $_POST['order_date_minute'] . ':' . (int) $_POST['order_date_second'] ) );
|
||||
}
|
||||
|
||||
$props['date_created'] = $date;
|
||||
|
|
|
@ -30,6 +30,8 @@ class WC_Meta_Box_Product_Data {
|
|||
$thepostid = $post->ID;
|
||||
$product_object = $thepostid ? wc_get_product( $thepostid ) : new WC_Product;
|
||||
|
||||
wp_nonce_field( 'woocommerce_save_data', 'woocommerce_meta_nonce' );
|
||||
|
||||
include( 'views/html-product-data-panel.php' );
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ class WC_Meta_Box_Product_Images {
|
|||
* @param WP_Post $post
|
||||
*/
|
||||
public static function output( $post ) {
|
||||
wp_nonce_field( 'woocommerce_save_data', 'woocommerce_meta_nonce' );
|
||||
?>
|
||||
<div id="product_images_container">
|
||||
<ul class="product_images">
|
||||
|
|
|
@ -44,7 +44,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
self::output_variations();
|
||||
do_action( 'woocommerce_product_data_panels' );
|
||||
wc_do_deprecated_action( 'woocommerce_product_write_panels', array(), '2.6', 'Use woocommerce_product_data_panels action instead.' );
|
||||
wp_nonce_field( 'woocommerce_save_data', 'woocommerce_meta_nonce' );
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
|
|
@ -196,7 +196,7 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
|
|||
}
|
||||
}
|
||||
|
||||
echo '<p><strong>' . esc_html( implode( ', ', $this->product_ids_titles ) ) . '</strong></p>';
|
||||
echo '<p><strong>' . wp_kses_post( implode( ', ', $this->product_ids_titles ) ) . '</strong></p>';
|
||||
echo '<p><a class="button" href="' . esc_url( remove_query_arg( 'product_ids' ) ) . '">' . esc_html__( 'Reset', 'woocommerce' ) . '</a></p>';
|
||||
}
|
||||
|
||||
|
|
|
@ -11,10 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
wp_enqueue_script( 'wc-product-export' );
|
||||
|
||||
$exporter = new WC_Product_CSV_Exporter();
|
||||
$product_count = wp_count_posts( 'product' );
|
||||
$variation_count = wp_count_posts( 'product' );
|
||||
$total_rows = $product_count->publish + $product_count->private + $variation_count->publish + $variation_count->private;
|
||||
$exporter = new WC_Product_CSV_Exporter();
|
||||
?>
|
||||
<div class="wrap woocommerce">
|
||||
<h1><?php esc_html_e( 'Export Products', 'woocommerce' ); ?></h1>
|
||||
|
|
|
@ -153,7 +153,7 @@ class WC_REST_Orders_Controller extends WC_REST_Legacy_Orders_Controller {
|
|||
// Add SKU and PRICE to products.
|
||||
if ( is_callable( array( $item, 'get_product' ) ) ) {
|
||||
$data['sku'] = $item->get_product() ? $item->get_product()->get_sku(): null;
|
||||
$data['price'] = $item->get_total() / max( 1, $item->get_quantity() );
|
||||
$data['price'] = $item->get_quantity() ? $item->get_total() / $item->get_quantity() : 0;
|
||||
}
|
||||
|
||||
// Format taxes.
|
||||
|
|
|
@ -1172,10 +1172,10 @@ class WC_REST_Products_Controller extends WC_REST_Legacy_Products_Controller {
|
|||
}
|
||||
|
||||
$download = new WC_Product_Download();
|
||||
$download->set_id( $key );
|
||||
$download->set_id( $file['id'] ? $file['id'] : wp_generate_uuid4() );
|
||||
$download->set_name( $file['name'] ? $file['name'] : wc_get_filename_from_url( $file['file'] ) );
|
||||
$download->set_file( apply_filters( 'woocommerce_file_download_path', $file['file'], $product, $key ) );
|
||||
$files[] = $download;
|
||||
$files[] = $download;
|
||||
}
|
||||
$product->set_downloads( $files );
|
||||
|
||||
|
|
|
@ -1527,7 +1527,7 @@ class WC_API_Products extends WC_API_Resource {
|
|||
}
|
||||
|
||||
$download = new WC_Product_Download();
|
||||
$download->set_id( $key );
|
||||
$download->set_id( $file['id'] ? $file['id'] : wp_generate_uuid4() );
|
||||
$download->set_name( $file['name'] ? $file['name'] : wc_get_filename_from_url( $file['file'] ) );
|
||||
$download->set_file( apply_filters( 'woocommerce_file_download_path', $file['file'], $product, $key ) );
|
||||
$files[] = $download;
|
||||
|
|
|
@ -2031,7 +2031,7 @@ class WC_API_Products extends WC_API_Resource {
|
|||
}
|
||||
|
||||
$download = new WC_Product_Download();
|
||||
$download->set_id( $key );
|
||||
$download->set_id( $file['id'] ? $file['id'] : wp_generate_uuid4() );
|
||||
$download->set_name( $file['name'] ? $file['name'] : wc_get_filename_from_url( $file['file'] ) );
|
||||
$download->set_file( apply_filters( 'woocommerce_file_download_path', $file['file'], $product, $key ) );
|
||||
$files[] = $download;
|
||||
|
|
|
@ -960,7 +960,7 @@ class WC_REST_Products_V1_Controller extends WC_REST_Posts_Controller {
|
|||
}
|
||||
|
||||
$download = new WC_Product_Download();
|
||||
$download->set_id( $key );
|
||||
$download->set_id( $file['id'] ? $file['id'] : wp_generate_uuid4() );
|
||||
$download->set_name( $file['name'] ? $file['name'] : wc_get_filename_from_url( $file['file'] ) );
|
||||
$download->set_file( apply_filters( 'woocommerce_file_download_path', $file['file'], $product, $key ) );
|
||||
$files[] = $download;
|
||||
|
|
|
@ -360,11 +360,20 @@ class WC_AJAX {
|
|||
ob_start();
|
||||
|
||||
$product_id = apply_filters( 'woocommerce_add_to_cart_product_id', absint( $_POST['product_id'] ) );
|
||||
$product = wc_get_product( $product_id );
|
||||
$quantity = empty( $_POST['quantity'] ) ? 1 : wc_stock_amount( $_POST['quantity'] );
|
||||
$passed_validation = apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity );
|
||||
$product_status = get_post_status( $product_id );
|
||||
$variation_id = 0;
|
||||
$variation = array();
|
||||
|
||||
if ( $passed_validation && false !== WC()->cart->add_to_cart( $product_id, $quantity ) && 'publish' === $product_status ) {
|
||||
if ( $product && 'variation' === $product->get_type() ) {
|
||||
$variation_id = $product_id;
|
||||
$product_id = $product->get_parent_id();
|
||||
$variation = $product->get_variation_attributes();
|
||||
}
|
||||
|
||||
if ( $passed_validation && false !== WC()->cart->add_to_cart( $product_id, $quantity, $variation_id, $variation ) && 'publish' === $product_status ) {
|
||||
|
||||
do_action( 'woocommerce_ajax_added_to_cart', $product_id );
|
||||
|
||||
|
|
|
@ -149,9 +149,12 @@ class WC_Breadcrumb {
|
|||
$this->term_ancestors( $main_term->term_id, 'product_cat' );
|
||||
$this->add_crumb( $main_term->name, get_term_link( $main_term ) );
|
||||
}
|
||||
} elseif ( 'post' != get_post_type( $post ) ) {
|
||||
} elseif ( 'post' !== get_post_type( $post ) ) {
|
||||
$post_type = get_post_type_object( get_post_type( $post ) );
|
||||
$this->add_crumb( $post_type->labels->singular_name, get_post_type_archive_link( get_post_type( $post ) ) );
|
||||
|
||||
if ( ! empty( $post_type->has_archive ) ) {
|
||||
$this->add_crumb( $post_type->labels->singular_name, get_post_type_archive_link( get_post_type( $post ) ) );
|
||||
}
|
||||
} else {
|
||||
$cat = current( get_the_category( $post ) );
|
||||
if ( $cat ) {
|
||||
|
|
|
@ -425,7 +425,7 @@ final class WC_Cart_Totals {
|
|||
$taxes = WC_Tax::calc_tax( $item->price, $base_tax_rates, true );
|
||||
|
||||
// Now we have a new item price (excluding TAX).
|
||||
$item->price = absint( $item->price - array_sum( $taxes ) );
|
||||
$item->price = round( $item->price - array_sum( $taxes ) );
|
||||
$item->price_includes_tax = false;
|
||||
}
|
||||
return $item;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
*
|
||||
* @version 3.3.0
|
||||
* @package WooCommerce\l10n
|
||||
* @author WooThemes
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -492,7 +491,7 @@ class WC_Countries {
|
|||
'IN' => "{company}\n{name}\n{address_1}\n{address_2}\n{city} - {postcode}\n{state}, {country}",
|
||||
'IS' => "{company}\n{name}\n{address_1}\n{address_2}\n{postcode} {city}\n{country}",
|
||||
'IT' => "{company}\n{name}\n{address_1}\n{address_2}\n{postcode}\n{city}\n{state_upper}\n{country}",
|
||||
'JP' => "{postcode}\n{state}{city}{address_1}\n{address_2}\n{company}\n{last_name} {first_name}\n{country}",
|
||||
'JP' => "{postcode}\n{state} {city} {address_1}\n{address_2}\n{company}\n{last_name} {first_name}\n{country}",
|
||||
'TW' => "{company}\n{last_name} {first_name}\n{address_1}\n{address_2}\n{state}, {city} {postcode}\n{country}",
|
||||
'LI' => "{company}\n{name}\n{address_1}\n{address_2}\n{postcode} {city}\n{country}",
|
||||
'NL' => "{company}\n{name}\n{address_1}\n{address_2}\n{postcode} {city}\n{country}",
|
||||
|
|
|
@ -817,7 +817,7 @@ class WC_Discounts {
|
|||
$categories = array();
|
||||
|
||||
foreach ( $this->items as $item ) {
|
||||
if ( $coupon->get_exclude_sale_items() && $item->product && $item->product->is_on_sale() ) {
|
||||
if ( ! $item->product ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class WC_Download_Handler {
|
|||
$product = wc_get_product( $product_id );
|
||||
$data_store = WC_Data_Store::load( 'customer-download' );
|
||||
|
||||
if ( ! $product || ! isset( $_GET['key'], $_GET['order'] ) ) {
|
||||
if ( ! $product || empty( $_GET['key'] ) || empty( $_GET['order'] ) ) {
|
||||
self::download_error( __( 'Invalid download link.', 'woocommerce' ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -470,6 +470,7 @@ class WC_Frontend_Scripts {
|
|||
'allowOneSlide' => false,
|
||||
) ),
|
||||
'zoom_enabled' => apply_filters( 'woocommerce_single_product_zoom_enabled', get_theme_support( 'wc-product-gallery-zoom' ) ),
|
||||
'zoom_options' => apply_filters( 'woocommerce_single_product_zoom_options', array() ),
|
||||
'photoswipe_enabled' => apply_filters( 'woocommerce_single_product_photoswipe_enabled', get_theme_support( 'wc-product-gallery-lightbox' ) ),
|
||||
'photoswipe_options' => apply_filters( 'woocommerce_single_product_photoswipe_options', array(
|
||||
'shareEl' => false,
|
||||
|
|
|
@ -92,7 +92,7 @@ class WC_Geolocation {
|
|||
} elseif ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { // WPCS: input var ok, CSRF ok.
|
||||
// Proxy servers can send through this header like this: X-Forwarded-For: client1, proxy1, proxy2
|
||||
// Make sure we always only send through the first IP in the list which should always be the client IP.
|
||||
return (string) rest_is_ip_address( trim( current( explode( ',', sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) ) ) ) ); // WPCS: input var ok, CSRF ok.
|
||||
return (string) rest_is_ip_address( trim( current( preg_split( '/[,:]/', sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) ) ) ) ); // WPCS: input var ok, CSRF ok.
|
||||
} elseif ( isset( $_SERVER['REMOTE_ADDR'] ) ) { // @codingStandardsIgnoreLine
|
||||
return sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ); // @codingStandardsIgnoreLine
|
||||
}
|
||||
|
|
|
@ -112,8 +112,13 @@ class WC_Product_Grouped extends WC_Product {
|
|||
}
|
||||
|
||||
if ( '' !== $min_price ) {
|
||||
$price = $min_price !== $max_price ? sprintf( _x( '%1$s–%2$s', 'Price range: from-to', 'woocommerce' ), wc_price( $min_price ), wc_price( $max_price ) ) : wc_price( $min_price );
|
||||
$is_free = ( 0 == $min_price && 0 == $max_price );
|
||||
if ( $min_price !== $max_price ) {
|
||||
$price = wc_format_price_range( $min_price, $max_price );
|
||||
} else {
|
||||
$price = wc_price( $min_price );
|
||||
}
|
||||
|
||||
$is_free = 0 === $min_price && 0 === $max_price;
|
||||
|
||||
if ( $is_free ) {
|
||||
$price = apply_filters( 'woocommerce_grouped_free_price_html', __( 'Free!', 'woocommerce' ), $this );
|
||||
|
|
|
@ -731,7 +731,9 @@ class WC_Query {
|
|||
}
|
||||
|
||||
/**
|
||||
* Layered Nav Init.
|
||||
* Get an array of attributes and terms selected with the layered nav widget.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function get_layered_nav_chosen_attributes() {
|
||||
if ( ! is_array( self::$_chosen_attributes ) ) {
|
||||
|
|
|
@ -2,17 +2,23 @@
|
|||
/**
|
||||
* All functionality to regenerate images in the background when settings change.
|
||||
*
|
||||
* @category Images
|
||||
* @package WooCommerce/Classes
|
||||
* @author Automattic
|
||||
* @version 3.3.0
|
||||
* @since 3.3.0
|
||||
* @since 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'WP_Async_Request', false ) ) {
|
||||
include_once dirname( __FILE__ ) . '/libraries/wp-async-request.php';
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'WP_Background_Process', false ) ) {
|
||||
include_once dirname( __FILE__ ) . '/libraries/wp-background-process.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Class that extends WP_Background_Process to process image regeneration in the background
|
||||
*/
|
||||
|
@ -56,7 +62,7 @@ class WC_Regenerate_Images_Request extends WP_Background_Process {
|
|||
}
|
||||
|
||||
if ( ! function_exists( 'wp_crop_image' ) ) {
|
||||
include( ABSPATH . 'wp-admin/includes/image.php' );
|
||||
include ABSPATH . 'wp-admin/includes/image.php';
|
||||
}
|
||||
|
||||
$attachment_id = absint( $item['attachment_id'] );
|
||||
|
@ -109,6 +115,4 @@ class WC_Regenerate_Images_Request extends WP_Background_Process {
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -169,16 +169,10 @@ class WC_Regenerate_Images {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if we should generate images when new themes declares custom sizes
|
||||
*
|
||||
* @return void
|
||||
* Check if we should generate images when new themes declares custom sizes.
|
||||
*/
|
||||
public static function maybe_regenerate_image_theme_switch() {
|
||||
$theme_support = get_theme_support( 'woocommerce' );
|
||||
$theme_support = is_array( $theme_support ) ? $theme_support[0] : false;
|
||||
|
||||
// Only queue image generation if the theme declares custom sizes via theme_support.
|
||||
if ( is_array( $theme_support ) && ( isset( $theme_support['single_image_width'] ) || isset( $theme_support['thumbnail_image_width'] ) ) ) {
|
||||
if ( wc_get_theme_support( 'single_image_width' ) || wc_get_theme_support( 'thumbnail_image_width' ) ) {
|
||||
self::queue_image_regeneration();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -378,10 +378,6 @@ final class WooCommerce {
|
|||
$this->frontend_includes();
|
||||
}
|
||||
|
||||
if ( $this->is_request( 'frontend' ) || $this->is_request( 'cron' ) ) {
|
||||
include_once( WC_ABSPATH . 'includes/class-wc-session-handler.php' );
|
||||
}
|
||||
|
||||
if ( $this->is_request( 'cron' ) && 'yes' === get_option( 'woocommerce_allow_tracking', 'no' ) ) {
|
||||
include_once( WC_ABSPATH . 'includes/class-wc-tracker.php' );
|
||||
}
|
||||
|
@ -444,6 +440,7 @@ final class WooCommerce {
|
|||
include_once( WC_ABSPATH . 'includes/class-wc-shortcodes.php' ); // Shortcodes class.
|
||||
include_once( WC_ABSPATH . 'includes/class-wc-embed.php' ); // Embeds.
|
||||
include_once( WC_ABSPATH . 'includes/class-wc-structured-data.php' ); // Structured Data class.
|
||||
include_once( WC_ABSPATH . 'includes/class-wc-session-handler.php' ); // Session handler class.
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -77,6 +77,10 @@ class WC_Shop_Customizer {
|
|||
* Scripts to improve our form.
|
||||
*/
|
||||
public function add_scripts() {
|
||||
$min_rows = wc_get_theme_support( 'product_grid::min_rows', 1 );
|
||||
$max_rows = wc_get_theme_support( 'product_grid::max_rows', '' );
|
||||
$min_columns = wc_get_theme_support( 'product_grid::min_columns', 1 );
|
||||
$max_columns = wc_get_theme_support( 'product_grid::max_columns', '' );
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery( document ).ready( function( $ ) {
|
||||
|
@ -96,6 +100,68 @@ class WC_Shop_Customizer {
|
|||
wp.customize.bind( 'ready', function() { // Ready?
|
||||
$( '.woocommerce-cropping-control' ).find( 'input:checked' ).change();
|
||||
} );
|
||||
|
||||
wp.customize( 'woocommerce_catalog_columns', function( setting ) {
|
||||
setting.bind( function( value ) {
|
||||
var min = '<?php echo esc_js( $min_columns ); ?>';
|
||||
var max = '<?php echo esc_js( $max_columns ); ?>';
|
||||
|
||||
if ( max && value > max ) {
|
||||
setting.notifications.add( 'max_columns_error', new wp.customize.Notification(
|
||||
'max_columns_error',
|
||||
{
|
||||
type : 'error',
|
||||
message: '<?php echo esc_js( sprintf( __( 'The maximum allowed setting for columns is %d', 'woocommerce' ), $max_columns ) ); ?>'
|
||||
}
|
||||
) );
|
||||
} else {
|
||||
setting.notifications.remove( 'max_columns_error' );
|
||||
}
|
||||
|
||||
if ( min && value < min ) {
|
||||
setting.notifications.add( 'min_columns_error', new wp.customize.Notification(
|
||||
'min_columns_error',
|
||||
{
|
||||
type : 'error',
|
||||
message: '<?php echo esc_js( sprintf( __( 'The minimum allowed setting for columns is %d', 'woocommerce' ), $min_columns ) ); ?>'
|
||||
}
|
||||
) );
|
||||
} else {
|
||||
setting.notifications.remove( 'min_columns_error' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
wp.customize( 'woocommerce_catalog_rows', function( setting ) {
|
||||
setting.bind( function( value ) {
|
||||
var min = '<?php echo esc_js( $min_rows ); ?>';
|
||||
var max = '<?php echo esc_js( $max_rows ); ?>';
|
||||
|
||||
if ( max && value > max ) {
|
||||
setting.notifications.add( 'max_rows_error', new wp.customize.Notification(
|
||||
'max_rows_error',
|
||||
{
|
||||
type : 'error',
|
||||
message: '<?php echo esc_js( sprintf( __( 'The maximum allowed setting for rows is %d', 'woocommerce' ), $max_rows ) ); ?>'
|
||||
}
|
||||
) );
|
||||
} else {
|
||||
setting.notifications.remove( 'max_rows_error' );
|
||||
}
|
||||
|
||||
if ( min && value < min ) {
|
||||
setting.notifications.add( 'min_rows_error', new wp.customize.Notification(
|
||||
'min_rows_error',
|
||||
{
|
||||
type : 'error',
|
||||
message: '<?php echo esc_js( sprintf( __( 'The minimum allowed setting for rows is %d', 'woocommerce' ), $min_rows ) ); ?>'
|
||||
}
|
||||
) );
|
||||
} else {
|
||||
setting.notifications.remove( 'min_rows_error' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
</script>
|
||||
<?php
|
||||
|
@ -214,9 +280,6 @@ class WC_Shop_Customizer {
|
|||
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
|
||||
*/
|
||||
public function add_product_catalog_section( $wp_customize ) {
|
||||
$theme_support = get_theme_support( 'woocommerce' );
|
||||
$theme_support = is_array( $theme_support ) ? $theme_support[0] : false;
|
||||
|
||||
$wp_customize->add_section(
|
||||
'woocommerce_product_catalog',
|
||||
array(
|
||||
|
@ -282,7 +345,7 @@ class WC_Shop_Customizer {
|
|||
$wp_customize->add_setting(
|
||||
'woocommerce_default_catalog_orderby',
|
||||
array(
|
||||
'default' => '',
|
||||
'default' => 'menu_order',
|
||||
'type' => 'option',
|
||||
'capability' => 'manage_woocommerce',
|
||||
'sanitize_callback' => array( $this, 'sanitize_default_catalog_orderby' ),
|
||||
|
@ -333,8 +396,8 @@ class WC_Shop_Customizer {
|
|||
'settings' => 'woocommerce_catalog_columns',
|
||||
'type' => 'number',
|
||||
'input_attrs' => array(
|
||||
'min' => isset( $theme_support['product_grid']['min_columns'] ) ? absint( $theme_support['product_grid']['min_columns'] ) : 1,
|
||||
'max' => isset( $theme_support['product_grid']['max_columns'] ) ? absint( $theme_support['product_grid']['max_columns'] ) : '',
|
||||
'min' => wc_get_theme_support( 'product_grid::min_columns', 1 ),
|
||||
'max' => wc_get_theme_support( 'product_grid::max_columns', '' ),
|
||||
'step' => 1,
|
||||
),
|
||||
)
|
||||
|
@ -360,8 +423,8 @@ class WC_Shop_Customizer {
|
|||
'settings' => 'woocommerce_catalog_rows',
|
||||
'type' => 'number',
|
||||
'input_attrs' => array(
|
||||
'min' => isset( $theme_support['product_grid']['min_rows'] ) ? absint( $theme_support['product_grid']['min_rows'] ) : 1,
|
||||
'max' => isset( $theme_support['product_grid']['max_rows'] ) ? absint( $theme_support['product_grid']['max_rows'] ) : '',
|
||||
'min' => wc_get_theme_support( 'product_grid::min_rows', 1 ),
|
||||
'max' => wc_get_theme_support( 'product_grid::max_rows', '' ),
|
||||
'step' => 1,
|
||||
),
|
||||
)
|
||||
|
@ -374,9 +437,6 @@ class WC_Shop_Customizer {
|
|||
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
|
||||
*/
|
||||
private function add_product_images_section( $wp_customize ) {
|
||||
$theme_support = get_theme_support( 'woocommerce' );
|
||||
$theme_support = is_array( $theme_support ) ? $theme_support[0] : false;
|
||||
|
||||
$wp_customize->add_section(
|
||||
'woocommerce_product_images',
|
||||
array(
|
||||
|
@ -387,7 +447,7 @@ class WC_Shop_Customizer {
|
|||
)
|
||||
);
|
||||
|
||||
if ( ! isset( $theme_support['single_image_width'] ) ) {
|
||||
if ( ! wc_get_theme_support( 'single_image_width' ) ) {
|
||||
$wp_customize->add_setting(
|
||||
'woocommerce_single_image_width',
|
||||
array(
|
||||
|
@ -415,7 +475,7 @@ class WC_Shop_Customizer {
|
|||
);
|
||||
}
|
||||
|
||||
if ( ! isset( $theme_support['thumbnail_image_width'] ) ) {
|
||||
if ( ! wc_get_theme_support( 'thumbnail_image_width' ) ) {
|
||||
$wp_customize->add_setting(
|
||||
'woocommerce_thumbnail_image_width',
|
||||
array(
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4,8 +4,6 @@
|
|||
*
|
||||
* Based on https://pippinsplugins.com/batch-processing-for-big-data/
|
||||
*
|
||||
* @author Automattic
|
||||
* @category Admin
|
||||
* @package WooCommerce/Export
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
@ -25,13 +23,6 @@ if ( ! class_exists( 'WC_CSV_Exporter', false ) ) {
|
|||
*/
|
||||
abstract class WC_CSV_Batch_Exporter extends WC_CSV_Exporter {
|
||||
|
||||
/**
|
||||
* The file being exported to.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $file;
|
||||
|
||||
/**
|
||||
* Page being exported
|
||||
*
|
||||
|
@ -43,11 +34,19 @@ abstract class WC_CSV_Batch_Exporter extends WC_CSV_Exporter {
|
|||
* Constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
$upload_dir = wp_upload_dir();
|
||||
$this->file = trailingslashit( $upload_dir['basedir'] ) . $this->get_filename();
|
||||
$this->column_names = $this->get_default_column_names();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file path to export to.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function get_file_path() {
|
||||
$upload_dir = wp_upload_dir();
|
||||
return trailingslashit( $upload_dir['basedir'] ) . $this->get_filename();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the file contents.
|
||||
*
|
||||
|
@ -56,11 +55,11 @@ abstract class WC_CSV_Batch_Exporter extends WC_CSV_Exporter {
|
|||
*/
|
||||
public function get_file() {
|
||||
$file = '';
|
||||
if ( @file_exists( $this->file ) ) {
|
||||
$file = @file_get_contents( $this->file );
|
||||
if ( @file_exists( $this->get_file_path() ) ) {
|
||||
$file = @file_get_contents( $this->get_file_path() );
|
||||
} else {
|
||||
@file_put_contents( $this->file, '' );
|
||||
@chmod( $this->file, 0664 );
|
||||
@file_put_contents( $this->get_file_path(), '' );
|
||||
@chmod( $this->get_file_path(), 0664 );
|
||||
}
|
||||
return $file;
|
||||
}
|
||||
|
@ -73,7 +72,7 @@ abstract class WC_CSV_Batch_Exporter extends WC_CSV_Exporter {
|
|||
public function export() {
|
||||
$this->send_headers();
|
||||
$this->send_content( $this->get_file() );
|
||||
@unlink( $this->file );
|
||||
@unlink( $this->get_file_path() );
|
||||
die();
|
||||
}
|
||||
|
||||
|
@ -84,7 +83,7 @@ abstract class WC_CSV_Batch_Exporter extends WC_CSV_Exporter {
|
|||
*/
|
||||
public function generate_file() {
|
||||
if ( 1 === $this->get_page() ) {
|
||||
@unlink( $this->file );
|
||||
@unlink( $this->get_file_path() );
|
||||
}
|
||||
$this->prepare_data_to_export();
|
||||
$this->write_csv_data( $this->get_csv_data() );
|
||||
|
@ -105,7 +104,7 @@ abstract class WC_CSV_Batch_Exporter extends WC_CSV_Exporter {
|
|||
}
|
||||
|
||||
$file .= $data;
|
||||
@file_put_contents( $this->file, $file );
|
||||
@file_put_contents( $this->get_file_path(), $file );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
/**
|
||||
* Handles CSV export.
|
||||
*
|
||||
* @author Automattic
|
||||
* @category Admin
|
||||
* @package WooCommerce/Export
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
@ -24,6 +22,13 @@ abstract class WC_CSV_Exporter {
|
|||
*/
|
||||
protected $export_type = '';
|
||||
|
||||
/**
|
||||
* Filename to export to.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $filename = 'wc-export.csv';
|
||||
|
||||
/**
|
||||
* Batch limit.
|
||||
*
|
||||
|
@ -183,15 +188,23 @@ abstract class WC_CSV_Exporter {
|
|||
header( 'Expires: 0' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set filename to export to.
|
||||
*
|
||||
* @param string $filename Filename to export to.
|
||||
* @return string
|
||||
*/
|
||||
public function set_filename( $filename ) {
|
||||
$this->filename = sanitize_file_name( str_replace( '.csv', '', $filename ) . '.csv' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate and return a filename.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_filename() {
|
||||
$filename = 'wc-' . $this->export_type . '-export-' . date_i18n( 'Y-m-d', current_time( 'timestamp' ) ) . '.csv';
|
||||
|
||||
return sanitize_file_name( apply_filters( "woocommerce_{$this->export_type}_export_get_filename", $filename ) );
|
||||
return sanitize_file_name( apply_filters( "woocommerce_{$this->export_type}_export_get_filename", $this->filename ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -365,9 +378,14 @@ abstract class WC_CSV_Exporter {
|
|||
$data = $data ? 1 : 0;
|
||||
}
|
||||
|
||||
$use_mb = function_exists( 'mb_convert_encoding' );
|
||||
$data = (string) urldecode( $data );
|
||||
$encoding = mb_detect_encoding( $data, 'UTF-8, ISO-8859-1', true );
|
||||
$data = 'UTF-8' === $encoding ? $data : utf8_encode( $data );
|
||||
|
||||
if ( $use_mb ) {
|
||||
$encoding = mb_detect_encoding( $data, 'UTF-8, ISO-8859-1', true );
|
||||
$data = 'UTF-8' === $encoding ? $data : utf8_encode( $data );
|
||||
}
|
||||
|
||||
return $this->escape_data( $data );
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
/**
|
||||
* Handles product CSV export.
|
||||
*
|
||||
* @author Automattic
|
||||
* @category Admin
|
||||
* @package WooCommerce/Export
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
/**
|
||||
* Products shortcode
|
||||
*
|
||||
* @author Automattic
|
||||
* @category Shortcodes
|
||||
* @package WooCommerce/Shortcodes
|
||||
* @version 3.2.4
|
||||
*/
|
||||
|
@ -474,7 +472,7 @@ class WC_Shortcode_Products {
|
|||
* @return string
|
||||
*/
|
||||
protected function get_transient_name() {
|
||||
$transient_name = 'wc_loop' . substr( md5( wp_json_encode( $this->query_args ) . $this->type ), 28 );
|
||||
$transient_name = 'wc_product_loop' . substr( md5( wp_json_encode( $this->query_args ) . $this->type ), 28 );
|
||||
|
||||
if ( 'rand' === $this->query_args['orderby'] ) {
|
||||
// When using rand, we'll cache a number of random queries and pull those to avoid querying rand on each page load.
|
||||
|
|
|
@ -660,6 +660,49 @@ function wc_mail( $to, $subject, $message, $headers = "Content-Type: text/html\r
|
|||
$mailer->send( $to, $subject, $message, $headers, $attachments );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return "theme support" values from the current theme, if set.
|
||||
*
|
||||
* @since 3.3.0
|
||||
* @param string $prop Name of prop (or key::subkey for arrays of props) if you want a specific value. Leave blank to get all props as an array.
|
||||
* @param mixed $default Optional value to return if the theme does not declare support for a prop.
|
||||
* @return mixed Value of prop(s).
|
||||
*/
|
||||
function wc_get_theme_support( $prop = '', $default = null ) {
|
||||
$theme_support = get_theme_support( 'woocommerce' );
|
||||
$theme_support = is_array( $theme_support ) ? $theme_support[0] : false;
|
||||
|
||||
if ( ! $theme_support ) {
|
||||
return $default;
|
||||
}
|
||||
|
||||
if ( $prop ) {
|
||||
$prop_stack = explode( '::', $prop );
|
||||
$prop_key = array_shift( $prop_stack );
|
||||
|
||||
if ( isset( $theme_support[ $prop_key ] ) ) {
|
||||
$value = $theme_support[ $prop_key ];
|
||||
|
||||
if ( count( $prop_stack ) ) {
|
||||
foreach ( $prop_stack as $prop_key ) {
|
||||
if ( is_array( $value ) && isset( $value[ $prop_key ] ) ) {
|
||||
$value = $value[ $prop_key ];
|
||||
} else {
|
||||
$value = $default;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$value = $default;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
return $theme_support;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an image size by name or defined dimensions.
|
||||
*
|
||||
|
@ -673,9 +716,7 @@ function wc_mail( $to, $subject, $message, $headers = "Content-Type: text/html\r
|
|||
* @return array Array of dimensions including width, height, and cropping mode. Cropping mode is 0 for no crop, and 1 for hard crop.
|
||||
*/
|
||||
function wc_get_image_size( $image_size ) {
|
||||
$theme_support = get_theme_support( 'woocommerce' );
|
||||
$theme_support = is_array( $theme_support ) ? $theme_support[0] : false;
|
||||
$size = array(
|
||||
$size = array(
|
||||
'width' => 600,
|
||||
'height' => 600,
|
||||
'crop' => 1,
|
||||
|
@ -689,24 +730,13 @@ function wc_get_image_size( $image_size ) {
|
|||
);
|
||||
$image_size = $size['width'] . '_' . $size['height'];
|
||||
} elseif ( in_array( $image_size, array( 'single', 'shop_single', 'woocommerce_single' ), true ) ) {
|
||||
// If the theme supports woocommerce, take image sizes from that definition.
|
||||
if ( isset( $theme_support['single_image_width'] ) ) {
|
||||
$size['width'] = $theme_support['single_image_width'];
|
||||
} else {
|
||||
$size['width'] = get_option( 'woocommerce_single_image_width', 600 );
|
||||
}
|
||||
$size['width'] = wc_get_theme_support( 'single_image_width', get_option( 'woocommerce_single_image_width', 600 ) );
|
||||
$size['height'] = 9999999999;
|
||||
$size['crop'] = 0;
|
||||
$image_size = 'single';
|
||||
} elseif ( in_array( $image_size, array( 'thumbnail', 'shop_thumbnail', 'shop_catalog', 'woocommerce_thumbnail' ), true ) ) {
|
||||
// If the theme supports woocommerce, take image sizes from that definition.
|
||||
if ( isset( $theme_support['thumbnail_image_width'] ) ) {
|
||||
$size['width'] = $theme_support['thumbnail_image_width'];
|
||||
} else {
|
||||
$size['width'] = get_option( 'woocommerce_thumbnail_image_width', 300 );
|
||||
}
|
||||
|
||||
$cropping = get_option( 'woocommerce_thumbnail_cropping', '1:1' );
|
||||
$size['width'] = wc_get_theme_support( 'thumbnail_image_width', get_option( 'woocommerce_thumbnail_image_width', 300 ) );
|
||||
$cropping = get_option( 'woocommerce_thumbnail_cropping', '1: 1' );
|
||||
|
||||
if ( 'uncropped' === $cropping ) {
|
||||
$size['height'] = 9999999999;
|
||||
|
|
|
@ -833,16 +833,24 @@ function wc_get_product_backorder_options() {
|
|||
* @return array
|
||||
*/
|
||||
function wc_get_related_products( $product_id, $limit = 5, $exclude_ids = array() ) {
|
||||
|
||||
$product_id = absint( $product_id );
|
||||
$limit = $limit > 0 ? $limit : 5;
|
||||
$exclude_ids = array_merge( array( 0, $product_id ), $exclude_ids );
|
||||
$transient_name = 'wc_related_' . $product_id;
|
||||
$related_posts = get_transient( $transient_name );
|
||||
$limit = $limit > 0 ? $limit : 5;
|
||||
$query_args = http_build_query( array(
|
||||
'limit' => $limit,
|
||||
'exclude_ids' => $exclude_ids,
|
||||
) );
|
||||
|
||||
$transient = get_transient( $transient_name );
|
||||
$related_posts = $transient && isset( $transient[ $query_args ] ) ? $transient[ $query_args ] : false;
|
||||
|
||||
// We want to query related posts if they are not cached, or we don't have enough.
|
||||
if ( false === $related_posts || count( $related_posts ) < $limit ) {
|
||||
|
||||
$cats_array = apply_filters( 'woocommerce_product_related_posts_relate_by_category', true, $product_id ) ? apply_filters( 'woocommerce_get_related_product_cat_terms', wc_get_product_term_ids( $product_id, 'product_cat' ), $product_id ) : array();
|
||||
$tags_array = apply_filters( 'woocommerce_product_related_posts_relate_by_tag', true, $product_id ) ? apply_filters( 'woocommerce_get_related_product_tag_terms', wc_get_product_term_ids( $product_id, 'product_tag' ), $product_id ) : array();
|
||||
$tags_array = apply_filters( 'woocommerce_product_related_posts_relate_by_tag', true, $product_id ) ? apply_filters( 'woocommerce_get_related_product_tag_terms', wc_get_product_term_ids( $product_id, 'product_tag' ), $product_id ) : array();
|
||||
|
||||
// Don't bother if none are set, unless woocommerce_product_related_posts_force_display is set to true in which case all products are related.
|
||||
if ( empty( $cats_array ) && empty( $tags_array ) && ! apply_filters( 'woocommerce_product_related_posts_force_display', false, $product_id ) ) {
|
||||
|
@ -852,9 +860,20 @@ function wc_get_related_products( $product_id, $limit = 5, $exclude_ids = array(
|
|||
$related_posts = $data_store->get_related_products( $cats_array, $tags_array, $exclude_ids, $limit + 10, $product_id );
|
||||
}
|
||||
|
||||
set_transient( $transient_name, $related_posts, DAY_IN_SECONDS );
|
||||
if ( $transient ) {
|
||||
$transient[ $query_args ] = $related_posts;
|
||||
} else {
|
||||
$transient = array( $query_args => $related_posts );
|
||||
}
|
||||
|
||||
set_transient( $transient_name, $transient, DAY_IN_SECONDS );
|
||||
}
|
||||
|
||||
$related_posts = apply_filters( 'woocommerce_related_products', $related_posts, $product_id, array(
|
||||
'limit' => $limit,
|
||||
'excluded_ids' => $exclude_ids,
|
||||
) );
|
||||
|
||||
shuffle( $related_posts );
|
||||
|
||||
return array_slice( $related_posts, 0, $limit );
|
||||
|
|
|
@ -310,22 +310,20 @@ function wc_product_cat_class( $class = '', $category = null ) {
|
|||
* @return int
|
||||
*/
|
||||
function wc_get_default_products_per_row() {
|
||||
$columns = get_option( 'woocommerce_catalog_columns', 3 );
|
||||
$columns = get_option( 'woocommerce_catalog_columns', 3 );
|
||||
$product_grid = wc_get_theme_support( 'product_grid' );
|
||||
$min_columns = isset( $product_grid['min_columns'] ) ? absint( $product_grid['min_columns'] ) : 0;
|
||||
$max_columns = isset( $product_grid['max_columns'] ) ? absint( $product_grid['max_columns'] ) : 0;
|
||||
|
||||
// Theme support.
|
||||
$theme_support = get_theme_support( 'woocommerce' );
|
||||
$theme_support = is_array( $theme_support ) ? $theme_support[0] : false;
|
||||
|
||||
if ( isset( $theme_support['product_grid']['min_columns'] ) && $columns < $theme_support['product_grid']['min_columns'] ) {
|
||||
$columns = $theme_support['product_grid']['min_columns'];
|
||||
if ( $min_columns && $columns < $min_columns ) {
|
||||
$columns = $min_columns;
|
||||
update_option( 'woocommerce_catalog_columns', $columns );
|
||||
} elseif ( ! empty( $theme_support['product_grid']['max_columns'] ) && $columns > $theme_support['product_grid']['max_columns'] ) {
|
||||
$columns = $theme_support['product_grid']['max_columns'];
|
||||
} elseif ( $max_columns && $columns > $max_columns ) {
|
||||
$columns = $max_columns;
|
||||
update_option( 'woocommerce_catalog_columns', $columns );
|
||||
}
|
||||
|
||||
// Legacy filter.
|
||||
if ( has_filter( 'loop_shop_columns' ) ) {
|
||||
if ( has_filter( 'loop_shop_columns' ) ) { // Legacy filter handling.
|
||||
$columns = apply_filters( 'loop_shop_columns', $columns );
|
||||
}
|
||||
|
||||
|
@ -339,17 +337,16 @@ function wc_get_default_products_per_row() {
|
|||
* @return int
|
||||
*/
|
||||
function wc_get_default_product_rows_per_page() {
|
||||
$rows = absint( get_option( 'woocommerce_catalog_rows', 4 ) );
|
||||
$rows = absint( get_option( 'woocommerce_catalog_rows', 4 ) );
|
||||
$product_grid = wc_get_theme_support( 'product_grid' );
|
||||
$min_rows = isset( $product_grid['min_rows'] ) ? absint( $product_grid['min_rows'] ): 0;
|
||||
$max_rows = isset( $product_grid['max_rows'] ) ? absint( $product_grid['max_rows'] ): 0;
|
||||
|
||||
// Theme support.
|
||||
$theme_support = get_theme_support( 'woocommerce' );
|
||||
$theme_support = is_array( $theme_support ) ? $theme_support[0] : false;
|
||||
|
||||
if ( isset( $theme_support['product_grid']['min_rows'] ) && $rows < $theme_support['product_grid']['min_rows'] ) {
|
||||
$rows = $theme_support['product_grid']['min_rows'];
|
||||
if ( $min_rows && $rows < $min_rows ) {
|
||||
$rows = $min_rows;
|
||||
update_option( 'woocommerce_catalog_rows', $rows );
|
||||
} elseif ( ! empty( $theme_support['product_grid']['max_rows'] ) && $rows > $theme_support['product_grid']['max_rows'] ) {
|
||||
$rows = $theme_support['product_grid']['max_rows'];
|
||||
} elseif ( $max_rows && $rows > $max_rows ) {
|
||||
$rows = $max_rows;
|
||||
update_option( 'woocommerce_catalog_rows', $rows );
|
||||
}
|
||||
|
||||
|
@ -362,19 +359,14 @@ function wc_get_default_product_rows_per_page() {
|
|||
* @since 3.3.0
|
||||
*/
|
||||
function wc_reset_product_grid_settings() {
|
||||
$theme_support = get_theme_support( 'woocommerce' );
|
||||
$theme_support = is_array( $theme_support ) ? $theme_support[0] : false;
|
||||
$product_grid = wc_get_theme_support( 'product_grid' );
|
||||
|
||||
if ( isset( $theme_support['product_grid']['default_rows'] ) ) {
|
||||
update_option( 'woocommerce_catalog_rows', absint( $theme_support['product_grid']['default_rows'] ) );
|
||||
} else {
|
||||
delete_option( 'woocommerce_catalog_rows' );
|
||||
if ( ! empty( $product_grid['default_rows'] ) ) {
|
||||
update_option( 'woocommerce_catalog_rows', absint( $product_grid['default_rows'] ) );
|
||||
}
|
||||
|
||||
if ( isset( $theme_support['product_grid']['default_rows'] ) ) {
|
||||
update_option( 'woocommerce_catalog_columns', absint( $theme_support['product_grid']['default_columns'] ) );
|
||||
} else {
|
||||
delete_option( 'woocommerce_catalog_columns' );
|
||||
if ( ! empty( $product_grid['default_columns'] ) ) {
|
||||
update_option( 'woocommerce_catalog_columns', absint( $product_grid['default_columns'] ) );
|
||||
}
|
||||
}
|
||||
add_action( 'after_switch_theme', 'wc_reset_product_grid_settings' );
|
||||
|
@ -778,7 +770,11 @@ if ( ! function_exists( 'woocommerce_template_loop_product_link_open' ) ) {
|
|||
* Insert the opening anchor tag for products in the loop.
|
||||
*/
|
||||
function woocommerce_template_loop_product_link_open() {
|
||||
echo '<a href="' . esc_url( get_the_permalink() ) . '" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">';
|
||||
global $product;
|
||||
|
||||
$link = apply_filters( 'woocommerce_loop_product_link', get_the_permalink(), $product );
|
||||
|
||||
echo '<a href="' . esc_url( $link ) . '" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
"istanbul": "^1.0.0-alpha",
|
||||
"mocha": "^3.0.2",
|
||||
"stylelint": "~8.2.0",
|
||||
"wc-e2e-page-objects": "0.5.0"
|
||||
"wc-e2e-page-objects": "0.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9.3",
|
||||
|
|
|
@ -161,7 +161,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woocommerce/wo
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= 3.3.0 - 2017-XX-XX =
|
||||
= 3.3.0 - 2018-XX-XX =
|
||||
* Feature - Improved default appearance in themes which do not support WooCommerce, making the shop page shortcode based.
|
||||
* Feature - Products shortcodes; improved random sorting, with some caching.
|
||||
* Feature - Products shortcodes; support for pagination.
|
||||
|
|
|
@ -165,7 +165,6 @@ h1 {
|
|||
margin: 0;
|
||||
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
|
||||
text-shadow: 0 1px 0 <?php echo esc_attr( $base_lighter_20 ); ?>;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
h2 {
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
"admin": {
|
||||
"username": "admin",
|
||||
"password": "password"
|
||||
},
|
||||
"customer": {
|
||||
"username": "Customer",
|
||||
"password": "password"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,122 @@
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import config from 'config';
|
||||
import chai from 'chai';
|
||||
import chaiAsPromised from 'chai-as-promised';
|
||||
import test from 'selenium-webdriver/testing';
|
||||
import { WebDriverManager, WebDriverHelper as helper } from 'wp-e2e-webdriver';
|
||||
import { CustomerFlow, MyAccountPage, PageMap } from 'wc-e2e-page-objects';
|
||||
|
||||
chai.use( chaiAsPromised );
|
||||
const assert = chai.assert;
|
||||
|
||||
let manager;
|
||||
let driver;
|
||||
|
||||
test.describe( 'My account page', function() {
|
||||
const loginAsCustomer = () => {
|
||||
return new CustomerFlow( driver, {
|
||||
baseUrl: config.get( 'url' ),
|
||||
username: config.get( 'users.customer.username' ),
|
||||
password: config.get( 'users.customer.password' )
|
||||
} );
|
||||
};
|
||||
const getMyAccountSubPageUrl = path => {
|
||||
return PageMap.getPageUrl( config.get( 'url' ), {
|
||||
path: '/my-account/%s'
|
||||
}, path );
|
||||
};
|
||||
const untrailingslashit = url => {
|
||||
return url.endsWith( '/' ) ? url.substring( 0, url.length - 1 ) : url;
|
||||
};
|
||||
|
||||
// open browser
|
||||
test.before( function() {
|
||||
this.timeout( config.get( 'startBrowserTimeoutMs' ) );
|
||||
|
||||
manager = new WebDriverManager( 'chrome', { baseUrl: config.get( 'url' ) } );
|
||||
driver = manager.getDriver();
|
||||
|
||||
helper.clearCookiesAndDeleteLocalStorage( driver );
|
||||
} );
|
||||
|
||||
this.timeout( config.get( 'mochaTimeoutMs' ) );
|
||||
|
||||
test.it( 'allows customer to login', () => {
|
||||
loginAsCustomer();
|
||||
const myAccount = new MyAccountPage( driver, {
|
||||
baseUrl: config.get( 'url' ),
|
||||
visit: false
|
||||
} );
|
||||
|
||||
assert.eventually.ok( myAccount.hasText( 'Hello Customer' ), 'see "Hello Customer" text' );
|
||||
assert.eventually.ok( myAccount.hasMenu( 'Dashboard' ), 'see Dashboard menu.' );
|
||||
assert.eventually.ok( myAccount.hasMenu( 'Orders' ), 'see Orders menu' );
|
||||
} );
|
||||
|
||||
test.it( 'allows customer to see orders', () => {
|
||||
loginAsCustomer();
|
||||
const myAccount = new MyAccountPage( driver, {
|
||||
baseUrl: config.get( 'url' ),
|
||||
visit: false
|
||||
} );
|
||||
myAccount.clickMenu( 'Orders' );
|
||||
|
||||
assert.eventually.equal(
|
||||
driver.getCurrentUrl().then( untrailingslashit ),
|
||||
untrailingslashit( getMyAccountSubPageUrl( 'orders' ) )
|
||||
);
|
||||
assert.eventually.ok( myAccount.hasText( 'Orders' ), 'see "Orders" text' );
|
||||
} );
|
||||
|
||||
test.it( 'allows customer to see downloads', () => {
|
||||
loginAsCustomer();
|
||||
const myAccount = new MyAccountPage( driver, {
|
||||
baseUrl: config.get( 'url' ),
|
||||
visit: false
|
||||
} );
|
||||
myAccount.clickMenu( 'Downloads' );
|
||||
|
||||
assert.eventually.equal(
|
||||
driver.getCurrentUrl().then( untrailingslashit ),
|
||||
untrailingslashit( getMyAccountSubPageUrl( 'downloads' ) )
|
||||
);
|
||||
assert.eventually.ok( myAccount.hasText( 'Downloads' ), 'see "Downloads" text' );
|
||||
} );
|
||||
|
||||
test.it( 'allows customer to edit addresses', () => {
|
||||
loginAsCustomer();
|
||||
const myAccount = new MyAccountPage( driver, {
|
||||
baseUrl: config.get( 'url' ),
|
||||
visit: false
|
||||
} );
|
||||
myAccount.clickMenu( 'Addresses' );
|
||||
|
||||
assert.eventually.equal(
|
||||
driver.getCurrentUrl().then( untrailingslashit ),
|
||||
untrailingslashit( getMyAccountSubPageUrl( 'edit-address' ) )
|
||||
);
|
||||
assert.eventually.ok( myAccount.hasText( 'Addresses' ), 'see "Addresses" text' );
|
||||
} );
|
||||
|
||||
test.it( 'allows customer to edit account details', () => {
|
||||
loginAsCustomer();
|
||||
const myAccount = new MyAccountPage( driver, {
|
||||
baseUrl: config.get( 'url' ),
|
||||
visit: false
|
||||
} );
|
||||
myAccount.clickMenu( 'Account details' );
|
||||
|
||||
assert.eventually.equal(
|
||||
driver.getCurrentUrl().then( untrailingslashit ),
|
||||
untrailingslashit( getMyAccountSubPageUrl( 'edit-account' ) )
|
||||
);
|
||||
assert.eventually.ok( myAccount.hasText( 'Account details' ), 'see "Account details" text' );
|
||||
} );
|
||||
|
||||
// quit browser
|
||||
test.after( () => {
|
||||
manager.quitBrowser();
|
||||
} );
|
||||
} );
|
|
@ -16,6 +16,13 @@ let manager;
|
|||
let driver;
|
||||
|
||||
test.describe( 'Single Product Page', function() {
|
||||
const visitProductByPath = path => {
|
||||
return new SingleProductPage( driver, { url: manager.getPageUrl( path ) } );
|
||||
};
|
||||
const visitCart = () => {
|
||||
return new CartPage( driver, { url: manager.getPageUrl( '/cart' ) } );
|
||||
};
|
||||
|
||||
// open browser
|
||||
test.before( function() {
|
||||
this.timeout( config.get( 'startBrowserTimeoutMs' ) );
|
||||
|
@ -29,28 +36,29 @@ test.describe( 'Single Product Page', function() {
|
|||
this.timeout( config.get( 'mochaTimeoutMs' ) );
|
||||
|
||||
test.it( 'should be able to add simple products to the cart', () => {
|
||||
const productPage = new SingleProductPage( driver, { url: manager.getPageUrl( '/product/t-shirt' ) } );
|
||||
const productPage = visitProductByPath( '/product/t-shirt' );
|
||||
productPage.setQuantity( 5 );
|
||||
productPage.addToCart();
|
||||
|
||||
const cartPage = new CartPage( driver, { url: manager.getPageUrl( '/cart' ) } );
|
||||
assert.eventually.equal( cartPage.hasItem( 'T-Shirt', { qty: 5 } ), true );
|
||||
assert.eventually.equal( visitCart().hasItem( 'T-Shirt', { qty: 5 } ), true );
|
||||
} );
|
||||
|
||||
test.it( 'should be able to add variation products to the cart', () => {
|
||||
const variableProductPage = new SingleProductPage( driver, { url: manager.getPageUrl( '/product/hoodie' ) } );
|
||||
let variableProductPage;
|
||||
|
||||
variableProductPage = visitProductByPath( '/product/hoodie' );
|
||||
variableProductPage.selectVariation( 'Color', 'Blue' );
|
||||
variableProductPage.addToCart();
|
||||
|
||||
// Pause for a half-second. Driver goes too fast and makes wrong selections otherwise.
|
||||
variableProductPage.selectVariation( 'Logo', 'Yes' );
|
||||
driver.sleep( 500 );
|
||||
|
||||
variableProductPage.selectVariation( 'Color', 'Green' );
|
||||
variableProductPage.addToCart();
|
||||
assert.eventually.ok( visitCart().hasItem( 'Hoodie - Blue, Yes' ), '"Hoodie - Blue, Yes" in the cart' );
|
||||
|
||||
const cartPage = new CartPage( driver, { url: manager.getPageUrl( '/cart' ) } );
|
||||
assert.eventually.equal( cartPage.hasItem( 'Hoodie - Blue' ), true );
|
||||
assert.eventually.equal( cartPage.hasItem( 'Hoodie - Green' ), true );
|
||||
variableProductPage = visitProductByPath( '/product/hoodie' );
|
||||
variableProductPage.selectVariation( 'Color', 'Green' );
|
||||
variableProductPage.selectVariation( 'Logo', 'No' );
|
||||
driver.sleep( 500 );
|
||||
variableProductPage.addToCart();
|
||||
assert.eventually.ok( visitCart().hasItem( 'Hoodie - Green, No' ), '"Hoodie - Green, No" in the cart' );
|
||||
} );
|
||||
|
||||
// quit browser
|
||||
|
|
|
@ -330,6 +330,92 @@ class WC_Tests_API_Orders extends WC_REST_Unit_Test_Case {
|
|||
WC_Helper_Order::delete_order( $order->get_id() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests updating an order and adding a coupon.
|
||||
*
|
||||
* @since 3.3.0
|
||||
*/
|
||||
public function test_update_order_add_coupons() {
|
||||
wp_set_current_user( $this->user );
|
||||
$order = WC_Helper_Order::create_order();
|
||||
$order_item = current( $order->get_items() );
|
||||
$coupon = WC_Helper_Coupon::create_coupon( 'fake-coupon' );
|
||||
$coupon->set_amount( 5 );
|
||||
$coupon->save();
|
||||
$request = new WP_REST_Request( 'PUT', '/wc/v2/orders/' . $order->get_id() );
|
||||
$request->set_body_params( array(
|
||||
'coupon_lines' => array(
|
||||
array(
|
||||
'code' => 'fake-coupon',
|
||||
'discount_total' => '5',
|
||||
'discount_tax' => '0',
|
||||
),
|
||||
),
|
||||
'line_items' => array(
|
||||
array(
|
||||
'id' => $order_item->get_id(),
|
||||
'product_id' => $order_item->get_product_id(),
|
||||
'total' => '35.00',
|
||||
),
|
||||
),
|
||||
) );
|
||||
$response = $this->server->dispatch( $request );
|
||||
$data = $response->get_data();
|
||||
|
||||
$this->assertEquals( 200, $response->get_status() );
|
||||
$this->assertCount( 1, $data['coupon_lines'] );
|
||||
$this->assertEquals( '45.00', $data['total'] );
|
||||
|
||||
WC_Helper_Order::delete_order( $order->get_id() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests updating an order and removing a coupon.
|
||||
*
|
||||
* @since 3.3.0
|
||||
*/
|
||||
public function test_update_order_remove_coupons() {
|
||||
wp_set_current_user( $this->user );
|
||||
$order = WC_Helper_Order::create_order();
|
||||
$order_item = current( $order->get_items() );
|
||||
$coupon = WC_Helper_Coupon::create_coupon( 'fake-coupon' );
|
||||
$coupon->set_amount( 5 );
|
||||
$coupon->save();
|
||||
|
||||
$order->apply_coupon( $coupon );
|
||||
$order->save();
|
||||
|
||||
// Check that the coupon is applied.
|
||||
$this->assertEquals( '45.00', $order->get_total() );
|
||||
|
||||
$request = new WP_REST_Request( 'PUT', '/wc/v2/orders/' . $order->get_id() );
|
||||
$coupon_data = current( $order->get_items( 'coupon' ) );
|
||||
|
||||
$request->set_body_params( array(
|
||||
'coupon_lines' => array(
|
||||
array(
|
||||
'id' => $coupon_data->get_id(),
|
||||
'code' => null,
|
||||
),
|
||||
),
|
||||
'line_items' => array(
|
||||
array(
|
||||
'id' => $order_item->get_id(),
|
||||
'product_id' => $order_item->get_product_id(),
|
||||
'total' => '40.00',
|
||||
),
|
||||
),
|
||||
) );
|
||||
$response = $this->server->dispatch( $request );
|
||||
$data = $response->get_data();
|
||||
|
||||
$this->assertEquals( 200, $response->get_status() );
|
||||
$this->assertTrue( empty( $data['coupon_lines'] ) );
|
||||
$this->assertEquals( '50.00', $data['total'] );
|
||||
|
||||
WC_Helper_Order::delete_order( $order->get_id() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests updating an order without the correct permissions.
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Plugin Name: WooCommerce
|
||||
* Plugin URI: https://woocommerce.com/
|
||||
* Description: An eCommerce toolkit that helps you sell anything. Beautifully.
|
||||
* Version: 3.3.0-beta.1
|
||||
* Version: 3.3.0-beta.2
|
||||
* Author: Automattic
|
||||
* Author URI: https://woocommerce.com
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue