Update from master
This commit is contained in:
commit
c928188831
|
@ -42,17 +42,24 @@ https://woocommerce.com/contact-us/
|
|||
- [WooExperts](https://woocommerce.com/experts/)
|
||||
- [Codeable](https://codeable.io/)
|
||||
|
||||
## Build process 🛠
|
||||
|
||||
The source code found on GitHub does not contain compiled CSS or Javascript, and is missing some functionality such as Gutenberg Blocks and the REST API, until the build process is ran.
|
||||
|
||||
To run the build process, in a terminal go to your WooCommerce installation and run:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
composer install
|
||||
npm run build
|
||||
```
|
||||
|
||||
To get your development environment running we recommend [reading here](https://github.com/woocommerce/woocommerce/wiki/How-to-set-up-WooCommerce-development-environment).
|
||||
|
||||
## Coding Guidelines and Development 🛠
|
||||
|
||||
WooCommerce core uses NPM and Grunt for build tasks, and Composer for installing packages and dependencies. To get your development environment running we recommend [reading here](https://github.com/woocommerce/woocommerce/wiki/How-to-set-up-WooCommerce-development-environment).
|
||||
|
||||
If you are contributing code to the REST API or editor blocks, these are developed in external packages.
|
||||
- [WooCommerce REST API package](https://github.com/woocommerce/woocommerce-rest-api)
|
||||
- [Blocks](https://github.com/woocommerce/woocommerce-gutenberg-products-block)
|
||||
|
||||
When writing code for WooCommerce:
|
||||
- **Ensure you follow to the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/)**
|
||||
- Install our pre-commit hook using composer. It'll help with the Coding Standards. To install run `composer install` from the command line within the woocommerce plugin directory.
|
||||
- **Ensure you stick to the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/)**
|
||||
- Run our build process described in the section above, it will install our pre-commit hook, code sniffs, dependencies, and more.
|
||||
- Ensure you use LF line endings in your code editor. Use [EditorConfig](http://editorconfig.org/) if your editor supports it so that indentation, line endings and other settings are auto configured.
|
||||
- When committing, reference your issue number (#1234) and include a note about the fix.
|
||||
- Ensure that your code supports the minimum supported versions of PHP and WordPress; this is shown at the top of the `readme.txt` file.
|
||||
|
@ -60,6 +67,10 @@ When writing code for WooCommerce:
|
|||
|
||||
Please avoid modifying the change-log directly or updating the .pot files. These will be updated by the WooCommerce team.
|
||||
|
||||
If you are contributing code to the REST API or editor blocks, these are developed in external packages.
|
||||
- [WooCommerce REST API package](https://github.com/woocommerce/woocommerce-rest-api)
|
||||
- [Blocks](https://github.com/woocommerce/woocommerce-gutenberg-products-block)
|
||||
|
||||
## Translating WooCommerce 💬
|
||||
|
||||
We have a [project on translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/woocommerce). You can join the localization team of your language and help by translating WooCommerce. [Find more about using joining a language team and using GlotPress](https://make.wordpress.org/polyglots/handbook/tools/glotpress-translate-wordpress-org/).
|
||||
|
|
|
@ -18,6 +18,13 @@ none
|
|||
# Sass
|
||||
.sass-cache/
|
||||
|
||||
# Compiled CSS
|
||||
/assets/css/*.css
|
||||
|
||||
# Minified JS
|
||||
/assets/js/admin/*.min.js
|
||||
/assets/js/frontend/*.min.js
|
||||
|
||||
# OS X metadata
|
||||
.DS_Store
|
||||
|
||||
|
@ -50,3 +57,6 @@ contributors.md
|
|||
|
||||
# Screenshots for e2e tests failures
|
||||
/screenshots/
|
||||
|
||||
# Language files
|
||||
i18n/languages/woocommerce.pot
|
||||
|
|
|
@ -362,6 +362,11 @@ module.exports = function( grunt ) {
|
|||
'concat'
|
||||
]);
|
||||
|
||||
grunt.registerTask( 'assets', [
|
||||
'js',
|
||||
'css'
|
||||
]);
|
||||
|
||||
grunt.registerTask( 'contributors', [
|
||||
'prompt:contributors',
|
||||
'shell:contributors'
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
div.woocommerce-message{overflow:hidden;position:relative;border-right-color:#cc99c2!important}.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:static;float:left;top:0;left:0;padding:0 28px 10px 15px;margin-top:-10px;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:relative;top:18px;right:-20px;-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;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 +0,0 @@
|
|||
div.woocommerce-message{overflow:hidden;position:relative;border-left-color:#cc99c2!important}.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:static;float:right;top:0;right:0;padding:0 15px 10px 28px;margin-top:-10px;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:relative;top:18px;left:-20px;-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;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
|
@ -4573,6 +4573,7 @@ img.help_tip {
|
|||
}
|
||||
}
|
||||
|
||||
.woocommerce_attribute,
|
||||
.woocommerce_variation {
|
||||
|
||||
h3 .sort {
|
||||
|
@ -4961,6 +4962,7 @@ img.help_tip {
|
|||
}
|
||||
}
|
||||
|
||||
&.woocommerce_attribute h3,
|
||||
&.woocommerce_variation h3 {
|
||||
cursor: pointer;
|
||||
padding: 0.5em 0.75em 0.5em 1em !important;
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
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}
|
|
@ -1 +0,0 @@
|
|||
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}
|
|
@ -1 +0,0 @@
|
|||
@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 .best-seller-this-month a strong{margin-left:48px}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:right;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;-webkit-transition:all ease .5s;transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:left;position:absolute;left:0;top:50%;margin-left:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;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 +0,0 @@
|
|||
@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 .best-seller-this-month a strong{margin-right:48px}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:left;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;-webkit-transition:all ease .5s;transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:right;position:absolute;right:0;top:50%;margin-right:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
#woocommerce_network_orders .inside{margin:0;padding:0}#woocommerce_network_orders .woocommerce-network-order-table,#woocommerce_network_orders .woocommerce-network-order-table-loading,#woocommerce_network_orders .woocommerce-network-orders-no-orders{width:100%;display:none}#woocommerce_network_orders .woocommerce-network-order-table-loading.is-active,#woocommerce_network_orders .woocommerce-network-order-table.is-active,#woocommerce_network_orders .woocommerce-network-orders-no-orders.is-active{display:block}#woocommerce_network_orders .woocommerce-network-order-table-loading p,#woocommerce_network_orders .woocommerce-network-orders-no-orders p{text-align:center}#woocommerce_network_orders .woocommerce-network-order-table{margin-top:0}#woocommerce_network_orders .woocommerce-network-order-table.is-active{display:table}#woocommerce_network_orders .woocommerce-network-order-table thead td{padding:.5em 1em}#woocommerce_network_orders .spinner{margin-top:0;float:none}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td,#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody th{border-top:1px solid #f5f5f5}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td{vertical-align:middle;padding:1em}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td .order-status{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;padding:0 1em;line-height:2.5em;color:#777;background:#e5e5e5;border-radius:4px;border-bottom:1px solid rgba(0,0,0,.05);margin:-.5em 0;cursor:inherit!important}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td .order-status.status-completed{background:#c8d7e1;color:#2e4453}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td .order-status.status-on-hold{background:#f8dda7;color:#94660c}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td .order-status.status-failed{background:#eba3a3;color:#761919}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td .order-status.status-processing{background:#c6e1c6;color:#5b841b}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td .order-status.status-trash{background:#eba3a3;color:#761919}
|
|
@ -1 +0,0 @@
|
|||
#woocommerce_network_orders .inside{margin:0;padding:0}#woocommerce_network_orders .woocommerce-network-order-table,#woocommerce_network_orders .woocommerce-network-order-table-loading,#woocommerce_network_orders .woocommerce-network-orders-no-orders{width:100%;display:none}#woocommerce_network_orders .woocommerce-network-order-table-loading.is-active,#woocommerce_network_orders .woocommerce-network-order-table.is-active,#woocommerce_network_orders .woocommerce-network-orders-no-orders.is-active{display:block}#woocommerce_network_orders .woocommerce-network-order-table-loading p,#woocommerce_network_orders .woocommerce-network-orders-no-orders p{text-align:center}#woocommerce_network_orders .woocommerce-network-order-table{margin-top:0}#woocommerce_network_orders .woocommerce-network-order-table.is-active{display:table}#woocommerce_network_orders .woocommerce-network-order-table thead td{padding:.5em 1em}#woocommerce_network_orders .spinner{margin-top:0;float:none}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td,#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody th{border-top:1px solid #f5f5f5}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td{vertical-align:middle;padding:1em}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td .order-status{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;padding:0 1em;line-height:2.5em;color:#777;background:#e5e5e5;border-radius:4px;border-bottom:1px solid rgba(0,0,0,.05);margin:-.5em 0;cursor:inherit!important}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td .order-status.status-completed{background:#c8d7e1;color:#2e4453}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td .order-status.status-on-hold{background:#f8dda7;color:#94660c}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td .order-status.status-failed{background:#eba3a3;color:#761919}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td .order-status.status-processing{background:#c6e1c6;color:#5b841b}#woocommerce_network_orders .post-type-shop_order .woocommerce-network-order-table tbody td .order-status.status-trash{background:#eba3a3;color:#761919}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
*{background:0 0!important;color:#000!important;text-shadow:none!important;-webkit-filter:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;-webkit-transition:none!important;transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-right:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-right:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-right:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;box-shadow:none!important;border-bottom:1px solid gray!important}
|
|
@ -1 +0,0 @@
|
|||
*{background:0 0!important;color:#000!important;text-shadow:none!important;-webkit-filter:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;-webkit-transition:none!important;transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-left:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-left:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-left:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;box-shadow:none!important;border-bottom:1px solid gray!important}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
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
|
@ -1,3 +1,4 @@
|
|||
/* stylelint-disable no-descending-specificity */
|
||||
body {
|
||||
margin: 65px auto 24px;
|
||||
box-shadow: none;
|
||||
|
@ -27,6 +28,14 @@ body {
|
|||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#tiptip_content {
|
||||
background: #5f6973;
|
||||
}
|
||||
|
||||
#tiptip_holder.tip_top #tiptip_arrow_inner {
|
||||
border-top-color: #5f6973;
|
||||
}
|
||||
}
|
||||
|
||||
.wc-setup-content {
|
||||
|
@ -53,13 +62,13 @@ body {
|
|||
p {
|
||||
margin: 20px 0;
|
||||
font-size: 1em;
|
||||
line-height: 1.75em;
|
||||
line-height: 1.75;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: 1em;
|
||||
line-height: 1.75em;
|
||||
line-height: 1.75;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
|
@ -77,7 +86,7 @@ body {
|
|||
th {
|
||||
width: 35%;
|
||||
vertical-align: top;
|
||||
font-weight: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
td {
|
||||
|
@ -94,7 +103,7 @@ body {
|
|||
}
|
||||
|
||||
.description {
|
||||
line-height: 1.5em;
|
||||
line-height: 1.5;
|
||||
display: block;
|
||||
margin-top: 0.25em;
|
||||
color: #999;
|
||||
|
@ -167,7 +176,7 @@ body {
|
|||
|
||||
&::before {
|
||||
content: "\f333";
|
||||
font-family: "dashicons";
|
||||
font-family: dashicons; /* stylelint-disable-line font-family-no-missing-generic-family-keyword */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,7 +187,7 @@ body {
|
|||
|
||||
.add {
|
||||
padding: 1em 0 0 1em;
|
||||
line-height: 1em;
|
||||
line-height: 1;
|
||||
font-size: 1em;
|
||||
width: 0;
|
||||
margin: 6px 0 0;
|
||||
|
@ -189,7 +198,7 @@ body {
|
|||
|
||||
&::before {
|
||||
content: "\f502";
|
||||
font-family: "dashicons";
|
||||
font-family: dashicons; /* stylelint-disable-line font-family-no-missing-generic-family-keyword */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
@ -198,7 +207,7 @@ body {
|
|||
|
||||
.remove {
|
||||
padding: 1em 0 0 1em;
|
||||
line-height: 1em;
|
||||
line-height: 1;
|
||||
font-size: 1em;
|
||||
width: 0;
|
||||
margin: 0;
|
||||
|
@ -209,7 +218,7 @@ body {
|
|||
|
||||
&::before {
|
||||
content: "\f182";
|
||||
font-family: "dashicons";
|
||||
font-family: dashicons; /* stylelint-disable-line font-family-no-missing-generic-family-keyword */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
@ -227,7 +236,7 @@ body {
|
|||
|
||||
.page-name {
|
||||
width: 30%;
|
||||
font-weight: bold;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
th,
|
||||
|
@ -249,14 +258,14 @@ body {
|
|||
p {
|
||||
color: #777;
|
||||
margin: 6px 0 0 24px;
|
||||
line-height: 1.75em;
|
||||
line-height: 1.75;
|
||||
|
||||
input {
|
||||
vertical-align: middle;
|
||||
margin: 1px 0 0;
|
||||
height: 1.75em;
|
||||
width: 1.75em;
|
||||
line-height: 1.75em;
|
||||
line-height: 1.75;
|
||||
}
|
||||
|
||||
label {
|
||||
|
@ -324,7 +333,7 @@ body {
|
|||
text-shadow: 1px 0 1px #eee, 0 1px 1px #eee;
|
||||
font-size: 1em;
|
||||
height: auto;
|
||||
line-height: 1.75em;
|
||||
line-height: 1.75;
|
||||
margin: 0 0 0.75em;
|
||||
opacity: 1;
|
||||
padding: 1em;
|
||||
|
@ -358,7 +367,7 @@ body {
|
|||
|
||||
li a::before {
|
||||
color: #82878c;
|
||||
font: normal 20px/1 "dashicons";
|
||||
font: 400 20px/1 dashicons; /* stylelint-disable-line font-family-no-missing-generic-family-keyword */
|
||||
speak: none;
|
||||
display: inline-block;
|
||||
padding: 0 10px 0 0;
|
||||
|
@ -409,7 +418,7 @@ body {
|
|||
|
||||
p {
|
||||
font-size: 14px;
|
||||
line-height: 1.5em;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
|
@ -499,7 +508,7 @@ body {
|
|||
text-align: center;
|
||||
position: relative;
|
||||
border-bottom: 4px solid #ccc;
|
||||
line-height: 1.4em;
|
||||
line-height: 1.4;
|
||||
|
||||
a {
|
||||
color: #a16696;
|
||||
|
@ -534,7 +543,7 @@ body {
|
|||
li.active {
|
||||
border-color: #a16696;
|
||||
color: #a16696;
|
||||
font-weight: bold;
|
||||
font-weight: 700;
|
||||
|
||||
&::before {
|
||||
border-color: #a16696;
|
||||
|
@ -557,16 +566,6 @@ body {
|
|||
margin: 20px 0 0;
|
||||
position: relative;
|
||||
|
||||
.button {
|
||||
font-size: 1.25em;
|
||||
padding: 0.5em 1em;
|
||||
line-height: 1em;
|
||||
margin-right: 0.5em;
|
||||
margin-bottom: 2px;
|
||||
height: auto;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.button-primary {
|
||||
background-color: #bb77ae;
|
||||
border-color: #a36597;
|
||||
|
@ -681,7 +680,7 @@ body {
|
|||
margin: 0 0 1em 0;
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
line-height: 1.5em;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -707,7 +706,7 @@ body {
|
|||
flex-basis: 0;
|
||||
min-width: 160px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-weight: 700;
|
||||
padding: 2em 0;
|
||||
align-self: stretch;
|
||||
display: flex;
|
||||
|
@ -790,7 +789,7 @@ body {
|
|||
border-radius: 10em;
|
||||
position: relative;
|
||||
|
||||
input[type=checkbox] {
|
||||
input[type="checkbox"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
@ -850,8 +849,7 @@ body {
|
|||
|
||||
.wc-wizard-service-enable::before {
|
||||
content: "\f343"; // up chevron
|
||||
font-family: "dashicons";
|
||||
visibility: initial;
|
||||
font-family: dashicons; /* stylelint-disable-line font-family-no-missing-generic-family-keyword */
|
||||
color: #666;
|
||||
font-size: 25px;
|
||||
margin-top: -7px;
|
||||
|
@ -882,7 +880,7 @@ body {
|
|||
margin: 0;
|
||||
|
||||
.wc-wizard-service-name {
|
||||
font-weight: normal;
|
||||
font-weight: 400;
|
||||
text-align: left;
|
||||
align-items: center;
|
||||
max-height: 5em;
|
||||
|
@ -966,7 +964,7 @@ body {
|
|||
.wc-setup-shipping-units {
|
||||
|
||||
p {
|
||||
line-height: 1.5em;
|
||||
line-height: 1.5;
|
||||
font-size: 13px;
|
||||
margin-bottom: 0.25em;
|
||||
text-align: center;
|
||||
|
@ -1021,7 +1019,7 @@ body {
|
|||
p.wc-wizard-feature-name,
|
||||
p.wc-wizard-feature-description {
|
||||
margin: 0;
|
||||
line-height: 1.5em;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1061,8 +1059,12 @@ h3.jetpack-reasons {
|
|||
padding: 1em 2em;
|
||||
box-shadow: none;
|
||||
min-width: 12em;
|
||||
min-width: auto;
|
||||
margin-top: 10px;
|
||||
line-height: 1;
|
||||
margin-right: 0.5em;
|
||||
margin-bottom: 2px;
|
||||
height: auto;
|
||||
border-radius: 4px;
|
||||
|
||||
&:focus,
|
||||
&:hover,
|
||||
|
@ -1076,7 +1078,7 @@ h3.jetpack-reasons {
|
|||
font-style: italic;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
line-height: 1.5em;
|
||||
line-height: 1.5;
|
||||
margin: 5px 0;
|
||||
|
||||
& > * {
|
||||
|
@ -1292,10 +1294,6 @@ h3.jetpack-reasons {
|
|||
font-size: 15px;
|
||||
margin: 1em 0 1em 1.5em;
|
||||
}
|
||||
|
||||
.button::last-child {
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1312,7 +1310,7 @@ p.jetpack-terms {
|
|||
text-align: center;
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
line-height: 1.5em;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.woocommerce-error {
|
||||
|
@ -1420,6 +1418,12 @@ p.jetpack-terms {
|
|||
margin-right: 1em;
|
||||
margin-left: 4px;
|
||||
|
||||
&.recommended-item-icon-wc_admin {
|
||||
background-color: #96588a;
|
||||
padding: 0.5em;
|
||||
height: 2em;
|
||||
}
|
||||
|
||||
&.recommended-item-icon-storefront_theme {
|
||||
background-color: #f4a224;
|
||||
max-height: 3em;
|
||||
|
@ -1455,14 +1459,14 @@ p.jetpack-terms {
|
|||
|
||||
h3 {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.5px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
line-height: 1.5em;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1476,23 +1480,6 @@ p.jetpack-terms {
|
|||
text-decoration: underline dotted;
|
||||
}
|
||||
|
||||
.wc-setup {
|
||||
|
||||
#tiptip_content {
|
||||
background: #5f6973;
|
||||
}
|
||||
|
||||
#tiptip_holder.tip_top #tiptip_arrow_inner {
|
||||
border-top-color: #5f6973;
|
||||
}
|
||||
}
|
||||
|
||||
.wc-setup-shipping-recommended {
|
||||
border-bottom: 1px solid #eee;
|
||||
margin-top: 0;
|
||||
padding: 30px 0;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 400px) {
|
||||
|
||||
#wc-logo img {
|
||||
|
@ -1568,3 +1555,4 @@ p.jetpack-terms {
|
|||
}
|
||||
}
|
||||
}
|
||||
/* stylelint-enable */
|
||||
|
|
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
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 31.5 27.78"><defs><style>.cls-1,.cls-2{fill:#fff;}.cls-2{stroke:#fff;stroke-linecap:round;stroke-miterlimit:10;stroke-width:1.5px;}</style></defs><title>Asset 5</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M4.8,16.57H6.61a2,2,0,0,1,2,2v8.55a0,0,0,0,1,0,0H2.8a0,0,0,0,1,0,0V18.57A2,2,0,0,1,4.8,16.57Z"/><path class="cls-1" d="M14.85,7.53h1.81a2,2,0,0,1,2,2V27.12a0,0,0,0,1,0,0H12.85a0,0,0,0,1,0,0V9.53A2,2,0,0,1,14.85,7.53Z"/><path class="cls-1" d="M24.89,0H26.7a2,2,0,0,1,2,2V27.12a0,0,0,0,1,0,0H22.89a0,0,0,0,1,0,0V2A2,2,0,0,1,24.89,0Z"/><line class="cls-2" x1="0.75" y1="27.03" x2="30.75" y2="27.03"/></g></g></svg>
|
After Width: | Height: | Size: 729 B |
|
@ -1 +0,0 @@
|
|||
!function(a){new(Backbone.View.extend({el:a("#key-fields"),events:{"click input#update_api_key":"saveKey"},initialize:function(){_.bindAll(this,"saveKey")},block:function(){a(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){a(this.el).unblock()},initTipTip:function(i){a(document.body).on("click",i,function(e){e.preventDefault(),document.queryCommandSupported("copy")?(a("#copy-error").text(""),wcClearClipboard(),wcSetClipboard(a.trim(a(this).prev("input").val()),a(i))):(a(i).parent().find("input").focus().select(),a("#copy-error").text(woocommerce_admin_api_keys.clipboard_failed))}).on("aftercopy",i,function(){a("#copy-error").text(""),a(i).tipTip({attribute:"data-tip",activation:"focus",fadeIn:50,fadeOut:50,delay:0}).focus()}).on("aftercopyerror",i,function(){a(i).parent().find("input").focus().select(),a("#copy-error").text(woocommerce_admin_api_keys.clipboard_failed)})},createQRCode:function(e,i){a("#keys-qrcode").qrcode({text:e+"|"+i,width:120,height:120})},saveKey:function(e){e.preventDefault();var t=this;t.block(),Backbone.ajax({method:"POST",dataType:"json",url:woocommerce_admin_api_keys.ajax_url,data:{action:"woocommerce_update_api_key",security:woocommerce_admin_api_keys.update_api_nonce,key_id:a("#key_id",t.el).val(),description:a("#key_description",t.el).val(),user:a("#key_user",t.el).val(),permissions:a("#key_permissions",t.el).val()},success:function(e){if(a(".wc-api-message",t.el).remove(),e.success){var i=e.data;if(a("h2, h3",t.el).first().append('<div class="wc-api-message updated"><p>'+i.message+"</p></div>"),0<i.consumer_key.length&&0<i.consumer_secret.length){a("#api-keys-options",t.el).remove(),a("p.submit",t.el).empty().append(i.revoke_url);var o=wp.template("api-keys-template");a("p.submit",t.el).before(o({consumer_key:i.consumer_key,consumer_secret:i.consumer_secret})),t.createQRCode(i.consumer_key,i.consumer_secret),t.initTipTip(".copy-key"),t.initTipTip(".copy-secret")}else a("#key_description",t.el).val(i.description),a("#key_user",t.el).val(i.user_id),a("#key_permissions",t.el).val(i.permissions)}else a("h2, h3",t.el).first().append('<div class="wc-api-message error"><p>'+e.data.message+"</p></div>");t.unblock()}})}}))}(jQuery);
|
|
@ -1 +0,0 @@
|
|||
!function(o,e,n){"use strict";o.fn.WCBackboneModal=function(e){return this.each(function(){new o.WCBackboneModal(o(this),e)})},o.WCBackboneModal=function(e,t){var n=o.extend({},o.WCBackboneModal.defaultOptions,t);n.template&&new o.WCBackboneModal.View({target:n.template,string:n.variable})},o.WCBackboneModal.defaultOptions={template:"",variable:{}},o.WCBackboneModal.View=e.View.extend({tagName:"div",id:"wc-backbone-modal-dialog",_target:undefined,_string:undefined,events:{"click .modal-close":"closeButton","click #btn-ok":"addButton","touchstart #btn-ok":"addButton",keydown:"keyboardActions"},resizeContent:function(){var e=o(".wc-backbone-modal-content").find("article"),t=.75*o(window).height();e.css({"max-height":t+"px"})},initialize:function(e){var t=this;this._target=e.target,this._string=e.string,n.bindAll(this,"render"),this.render(),o(window).resize(function(){t.resizeContent()})},render:function(){var e=wp.template(this._target);this.$el.append(e(this._string)),o(document.body).css({overflow:"hidden"}).append(this.$el),this.resizeContent(),this.$(".wc-backbone-modal-content").attr("tabindex","0").focus(),o(document.body).trigger("init_tooltips"),o(document.body).trigger("wc_backbone_modal_loaded",this._target)},closeButton:function(e){e.preventDefault(),o(document.body).trigger("wc_backbone_modal_before_remove",this._target),this.undelegateEvents(),o(document).off("focusin"),o(document.body).css({overflow:"auto"}),this.remove(),o(document.body).trigger("wc_backbone_modal_removed",this._target)},addButton:function(e){o(document.body).trigger("wc_backbone_modal_response",[this._target,this.getFormData()]),this.closeButton(e)},getFormData:function(){var n={};return o(document.body).trigger("wc_backbone_modal_before_update",this._target),o.each(o("form",this.$el).serializeArray(),function(e,t){-1!==t.name.indexOf("[]")?(t.name=t.name.replace("[]",""),n[t.name]=o.makeArray(n[t.name]),n[t.name].push(t.value)):n[t.name]=t.value}),n},keyboardActions:function(e){var t=e.keyCode||e.which;13!==t||e.target.tagName&&("input"===e.target.tagName.toLowerCase()||"textarea"===e.target.tagName.toLowerCase())||this.addButton(e),27===t&&this.closeButton(e)}})}(jQuery,Backbone,_);
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,4 @@
|
|||
/* global woocommerce_admin_meta_boxes_coupon */
|
||||
jQuery(function( $ ) {
|
||||
|
||||
/**
|
||||
|
@ -12,6 +13,9 @@ jQuery(function( $ ) {
|
|||
$( 'select#discount_type' )
|
||||
.on( 'change', this.type_options )
|
||||
.change();
|
||||
|
||||
this.insert_generate_coupon_code_button();
|
||||
$( '.button.generate-coupon-code' ).on( 'click', this.generate_coupon_code );
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -32,6 +36,33 @@ jQuery(function( $ ) {
|
|||
} else {
|
||||
$( '.limit_usage_to_x_items_field' ).hide();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Insert generate coupon code buttom HTML.
|
||||
*/
|
||||
insert_generate_coupon_code_button: function() {
|
||||
$( '.post-type-shop_coupon' ).find( '#title' ).after(
|
||||
'<a href="#" class="button generate-coupon-code">' + woocommerce_admin_meta_boxes_coupon.generate_button_text + '</a>'
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Generate a random coupon code
|
||||
*/
|
||||
generate_coupon_code: function( e ) {
|
||||
e.preventDefault();
|
||||
var $coupon_code_field = $( '#title' ),
|
||||
$coupon_code_label = $( '#title-prompt-text' ),
|
||||
$result = '';
|
||||
for ( var i = 0; i < woocommerce_admin_meta_boxes_coupon.char_length; i++ ) {
|
||||
$result += woocommerce_admin_meta_boxes_coupon.characters.charAt(
|
||||
Math.floor( Math.random() * woocommerce_admin_meta_boxes_coupon.characters.length )
|
||||
);
|
||||
}
|
||||
$result = woocommerce_admin_meta_boxes_coupon.prefix + $result + woocommerce_admin_meta_boxes_coupon.suffix;
|
||||
$coupon_code_field.focus().val( $result );
|
||||
$coupon_code_label.addClass( 'screen-reader-text' );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(i){({init:function(){i("select#discount_type").on("change",this.type_options).change()},type_options:function(){"fixed_cart"!==i(this).val()?i(".limit_usage_to_x_items_field").show():i(".limit_usage_to_x_items_field").hide()}}).init()});
|
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
|
@ -1 +0,0 @@
|
|||
jQuery(function(o){!function t(){o("#tiptip_holder").removeAttr("style"),o("#tiptip_arrow").removeAttr("style"),o(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}(),o("#titlediv").find("#title").keyup(function(t){if("9"===(t.keyCode||t.which)&&0<o("#woocommerce-coupon-description").length)return t.stopPropagation(),o("#woocommerce-coupon-description").focus(),!1}),o(".wc-metaboxes-wrapper").on("click",".wc-metabox > h3",function(){o(this).parent(".wc-metabox").toggleClass("closed").toggleClass("open")}),o(document.body).on("wc-init-tabbed-panels",function(){o("ul.wc-tabs").show(),o("ul.wc-tabs a").click(function(t){t.preventDefault();var e=o(this).closest("div.panel-wrap");o("ul.wc-tabs li",e).removeClass("active"),o(this).parent().addClass("active"),o("div.panel",e).hide(),o(o(this).attr("href")).show()}),o("div.panel-wrap").each(function(){o(this).find("ul.wc-tabs li").eq(0).find("a").click()})}).trigger("wc-init-tabbed-panels"),o(document.body).on("wc-init-datepickers",function(){o(".date-picker-field, .date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0})}).trigger("wc-init-datepickers"),o(".wc-metaboxes-wrapper").on("click",".wc-metabox h3",function(t){o(t.target).filter(":input, option, .sort").length||o(this).next(".wc-metabox-content").stop().slideToggle()}).on("click",".expand_all",function(){return o(this).closest(".wc-metaboxes-wrapper").find(".wc-metabox > .wc-metabox-content").show(),!1}).on("click",".close_all",function(){return o(this).closest(".wc-metaboxes-wrapper").find(".wc-metabox > .wc-metabox-content").hide(),!1}),o(".wc-metabox.closed").each(function(){o(this).find(".wc-metabox-content").hide()})});
|
|
@ -1 +0,0 @@
|
|||
!function(o,e,r){if("undefined"!=typeof woocommerce_network_orders){var t=[],n=[],s=[],a=o(document.getElementById("network-orders-tbody")),c=e.template(o(document.getElementById("network-orders-row-template")).text()),d=o(document.getElementById("woocommerce-network-order-table-loading")),i=o(document.getElementById("woocommerce-network-order-table")),m=o(document.getElementById("woocommerce-network-orders-no-orders"));if(!woocommerce_network_orders.sites.length)return d.removeClass("is-active"),i.removeClass("is-active"),m.addClass("is-active");o.each(woocommerce_network_orders.sites,function(r,e){n[r]=o.Deferred(),s.push(o.ajax({url:woocommerce_network_orders.order_endpoint,data:{_wpnonce:woocommerce_network_orders.nonce,network_orders:!0,blog_id:e},type:"GET"}).success(function(e){var o;for(o in e)t.push(e[o]);n[r].resolve()}).fail(function(){n[r].resolve()}))}),0<n.length&&o.when.apply(o,n).done(function(){var e,o;if(t.sort(function(e,o){var r,t;return(r=Date.parse(e.date_created_gmt))===(t=Date.parse(o.date_created_gmt))?0:r<t?1:-1}),0<t.length){for(e in t)o=t[e],a.append(c(o));m.removeClass("is-active"),d.removeClass("is-active"),i.addClass("is-active")}else m.addClass("is-active"),d.removeClass("is-active"),i.removeClass("is-active")})}}(jQuery,_);
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(d){d("table.widefat tbody th, table.widefat tbody td").css("cursor","move"),d("table.widefat tbody").sortable({items:"tr:not(.inline-edit-row)",cursor:"move",axis:"y",containment:"table.widefat",scrollSensitivity:40,helper:function(t,e){return e.each(function(){d(this).width(d(this).width())}),e},start:function(t,e){e.item.css("background-color","#ffffff"),e.item.children("td, th").css("border-bottom-width","0"),e.item.css("outline","1px solid #dfdfdf")},stop:function(t,e){e.item.removeAttr("style"),e.item.children("td,th").css("border-bottom-width","1px")},update:function(t,e){d("table.widefat tbody th, table.widefat tbody td").css("cursor","default"),d("table.widefat tbody").sortable("disable");var i=e.item.find(".check-column input").val(),o=e.item.prev().find(".check-column input").val(),n=e.item.next().find(".check-column input").val();e.item.find(".check-column input").hide().after('<img alt="processing" src="images/wpspin_light.gif" class="waiting" style="margin-left: 6px;" />'),d.post(ajaxurl,{action:"woocommerce_product_ordering",id:i,previd:o,nextid:n},function(t){d.each(t,function(t,e){d("#inline_"+t+" .menu_order").html(e)}),e.item.find(".check-column input").show().siblings("img").remove(),d("table.widefat tbody th, table.widefat tbody td").css("cursor","move"),d("table.widefat tbody").sortable("enable")}),d("table.widefat tbody tr").each(function(){d("table.widefat tbody tr").index(this)%2==0?d(this).addClass("alternate"):d(this).removeClass("alternate")})}})});
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(q){q("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var e=q(this).closest("tr").attr("id");e=e.replace("post-","");var t=q("#woocommerce_inline_"+e),i=t.find(".sku").text(),n=t.find(".regular_price").text(),o=t.find(".sale_price ").text(),d=t.find(".weight").text(),s=t.find(".length").text(),l=t.find(".width").text(),c=t.find(".height").text(),a=t.find(".shipping_class").text(),r=t.find(".visibility").text(),_=t.find(".stock_status").text(),m=t.find(".stock").text(),p=t.find(".featured").text(),f=t.find(".manage_stock").text(),u=t.find(".menu_order").text(),h=t.find(".tax_status").text(),w=t.find(".tax_class").text(),k=t.find(".backorders").text(),v=n.replace(".",woocommerce_admin.mon_decimal_point),x=o.replace(".",woocommerce_admin.mon_decimal_point);q('input[name="_sku"]',".inline-edit-row").val(i),q('input[name="_regular_price"]',".inline-edit-row").val(v),q('input[name="_sale_price"]',".inline-edit-row").val(x),q('input[name="_weight"]',".inline-edit-row").val(d),q('input[name="_length"]',".inline-edit-row").val(s),q('input[name="_width"]',".inline-edit-row").val(l),q('input[name="_height"]',".inline-edit-row").val(c),q('select[name="_shipping_class"] option:selected',".inline-edit-row").attr("selected",!1).change(),q('select[name="_shipping_class"] option[value="'+a+'"]').attr("selected","selected").change(),q('input[name="_stock"]',".inline-edit-row").val(m),q('input[name="menu_order"]',".inline-edit-row").val(u),q('select[name="_tax_status"] option, select[name="_tax_class"] option, select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option').removeAttr("selected"),q('select[name="_tax_status"] option[value="'+h+'"]',".inline-edit-row").attr("selected","selected"),q('select[name="_tax_class"] option[value="'+w+'"]',".inline-edit-row").attr("selected","selected"),q('select[name="_visibility"] option[value="'+r+'"]',".inline-edit-row").attr("selected","selected"),q('select[name="_stock_status"] option[value="'+_+'"]',".inline-edit-row").attr("selected","selected"),q('select[name="_backorders"] option[value="'+k+'"]',".inline-edit-row").attr("selected","selected"),"yes"===p?q('input[name="_featured"]',".inline-edit-row").attr("checked","checked"):q('input[name="_featured"]',".inline-edit-row").removeAttr("checked");var g=t.find(".product_type").text(),y=t.find(".product_is_virtual").text(),b="external"!==g,A="external"!==g&&"grouped"!==g;q(".stock_fields, .manage_stock_field, .stock_status_field, .backorder_field").show(),A?"yes"===f?(q(".stock_qty_field, .backorder_field",".inline-edit-row").show().removeAttr("style"),q(".stock_status_field").hide(),q(".manage_stock_field input").prop("checked",!0)):(q(".stock_qty_field, .backorder_field",".inline-edit-row").hide(),q(".stock_status_field").show().removeAttr("style"),q(".manage_stock_field input").prop("checked",!1)):b?q(".stock_fields, .manage_stock_field, .backorder_field").hide():q(".stock_fields, .manage_stock_field, .stock_status_field, .backorder_field").hide(),"simple"===g||"external"===g?q(".price_fields",".inline-edit-row").show().removeAttr("style"):q(".price_fields",".inline-edit-row").hide(),"yes"===y?q(".dimension_fields",".inline-edit-row").hide():q(".dimension_fields",".inline-edit-row").show().removeAttr("style"),q('input[name="comment_status"]').parent().find(".checkbox-title").text(woocommerce_quick_edit.strings.allow_reviews)}),q("#the-list").on("change",'.inline-edit-row input[name="_manage_stock"]',function(){q(this).is(":checked")?(q(".stock_qty_field, .backorder_field",".inline-edit-row").show().removeAttr("style"),q(".stock_status_field").hide()):(q(".stock_qty_field, .backorder_field",".inline-edit-row").hide(),q(".stock_status_field").show().removeAttr("style"))}),q("#wpbody").on("click","#doaction, #doaction2",function(){q("input.text",".inline-edit-row").val(""),q("#woocommerce-fields").find("select").prop("selectedIndex",0),q("#woocommerce-fields-bulk").find(".inline-edit-group .change-input").hide()}),q("#wpbody").on("change","#woocommerce-fields-bulk .inline-edit-group .change_to",function(){0<q(this).val()?q(this).closest("div").find(".change-input").show():q(this).closest("div").find(".change-input").hide()}),q("#wpbody").on("click",".trash-product",function(){return window.confirm(woocommerce_admin.i18n_delete_product_notice)})});
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(f){function r(t,e,a){f('<div class="chart-tooltip">'+a+"</div>").css({top:e-16,left:t+20}).appendTo("body").fadeIn(200)}var o=null,s=null;f(".chart-placeholder").bind("plothover",function(t,e,a){if(a){if((o!==a.dataIndex||s!==a.seriesIndex)&&(o=a.dataIndex,s=a.seriesIndex,f(".chart-tooltip").remove(),a.series.points.show||a.series.enable_tooltip)){var n=a.series.data[a.dataIndex][1],i="";a.series.prepend_label&&(i=i+a.series.label+": "),a.series.prepend_tooltip&&(i+=a.series.prepend_tooltip),i+=n,a.series.append_tooltip&&(i+=a.series.append_tooltip),a.series.pie.show?r(e.pageX,e.pageY,i):r(a.pageX,a.pageY,i)}}else f(".chart-tooltip").remove(),o=null}),f(".wc_sparkline.bars").each(function(){var t=[{data:f(this).data("sparkline"),color:f(this).data("color"),bars:{fillColor:f(this).data("color"),fill:!0,show:!0,lineWidth:1,barWidth:f(this).data("barwidth"),align:"center"},shadowSize:0}];f.plot(f(this),t,{grid:{show:!1}})}),f(".wc_sparkline.lines").each(function(){var t=[{data:f(this).data("sparkline"),color:f(this).data("color"),lines:{fill:!1,show:!0,lineWidth:1,align:"center"},shadowSize:0}];f.plot(f(this),t,{grid:{show:!1}})});var a=f(".range_datepicker").datepicker({changeMonth:!0,changeYear:!0,defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,minDate:"-20Y",maxDate:"+1D",showButtonPanel:!0,showOn:"focus",buttonImageOnly:!0,onSelect:function(){var t=f(this).is(".from")?"minDate":"maxDate",e=f(this).datepicker("getDate");a.not(this).datepicker("option",t,e)}});"undefined"==typeof document.createElement("a").download&&f(".export_csv").hide(),f(".export_csv").click(function(){var a=f(this).data("exclude_series")||"";a=(a=a.toString()).split(",");var t,e,n,i=f(this).data("xaxes"),r=f(this).data("groupby"),o=f(this).data("index_type"),s=f(this).data("export"),l="data:text/csv;charset=utf-8,\ufeff";if("table"===s)f(this).offsetParent().find("thead tr,tbody tr").each(function(){f(this).find("th, td").each(function(){var t=f(this).text();t=t.replace("[?]","").replace("#",""),l+='"'+t+'",'}),l=l.substring(0,l.length-1),l+="\n"}),f(this).offsetParent().find("tfoot tr").each(function(){f(this).find("th, td").each(function(){var t=f(this).text();if(t=t.replace("[?]","").replace("#",""),l+='"'+t+'",',0<f(this).attr("colspan"))for(p=1;p<f(this).attr("colspan");p++)l+='"",'}),l=l.substring(0,l.length-1),l+="\n"});else{if(!window.main_chart)return!1;var h=window.main_chart.getData(),d=[];for(l+='"'+i+'",',f.each(h,function(t,e){a&&-1!==f.inArray(t.toString(),a)||d.push(e)}),t=0;t<d.length;++t)l+='"'+d[t].label+'",';l=l.substring(0,l.length-1),l+="\n";var c={};for(t=0;t<d.length;++t)for(e=d[t].data,n=0;n<e.length;++n){c[e[n][0]]=[];for(var p=0;p<d.length;++p)c[e[n][0]].push(0)}for(t=0;t<d.length;++t)for(e=d[t].data,n=0;n<e.length;++n)c[e[n][0]][t]=e[n][1];f.each(c,function(t,e){var a=new Date(parseInt(t,10));l+="none"===o?'"'+t+'",':"day"===r?'"'+a.getUTCFullYear()+"-"+parseInt(a.getUTCMonth()+1,10)+"-"+a.getUTCDate()+'",':'"'+a.getUTCFullYear()+"-"+parseInt(a.getUTCMonth()+1,10)+'",';for(var n=0;n<e.length;++n){var i=e[n];Math.round(i)!==i&&(i=(i=parseFloat(i)).toFixed(2)),l+='"'+i+'",'}l=l.substring(0,l.length-1),l+="\n"})}return f(this).attr("href",encodeURI(l)),!0})});
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
!function(c,r,a){c(function(){c("select#woocommerce_allowed_countries").change(function(){"specific"===c(this).val()?(c(this).closest("tr").next("tr").hide(),c(this).closest("tr").next().next("tr").show()):("all_except"===c(this).val()?c(this).closest("tr").next("tr").show():c(this).closest("tr").next("tr").hide(),c(this).closest("tr").next().next("tr").hide())}).change(),c("select#woocommerce_ship_to_countries").change(function(){"specific"===c(this).val()?c(this).closest("tr").next("tr").show():c(this).closest("tr").next("tr").hide()}).change(),c("input#woocommerce_manage_stock").change(function(){c(this).is(":checked")?c(this).closest("tbody").find(".manage_stock_field").closest("tr").show():c(this).closest("tbody").find(".manage_stock_field").closest("tr").hide()}).change(),c(".colorpick").iris({change:function(t,e){c(this).parent().find(".colorpickpreview").css({backgroundColor:e.color.toString()})},hide:!0,border:!0}).on("click focus",function(t){t.stopPropagation(),c(".iris-picker").hide(),c(this).closest("td").find(".iris-picker").show(),c(this).data("original-value",c(this).val())}).on("change",function(){c(this).is(".iris-error")&&(c(this).data("original-value").match(/^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/)?c(this).val(c(this).data("original-value")).change():c(this).val("").change())}),c("body").on("click",function(){c(".iris-picker").hide()}),c(function(){var t=!1;c("input, textarea, select, checkbox").change(function(){t=!0}),c(".woo-nav-tab-wrapper a").click(function(){window.onbeforeunload=t?function(){return r.i18n_nav_warning}:""}),c(".submit :input").click(function(){window.onbeforeunload=""})}),c("table.wc_gateways tbody, table.wc_shipping tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,helper:function(t,e){return e.children().each(function(){c(this).width(c(this).width())}),e.css("left","0"),e},start:function(t,e){e.item.css("background-color","#f6f6f6")},stop:function(t,e){e.item.removeAttr("style"),e.item.trigger("updateMoveButtons")}}),c(".woocommerce").on("click",".select_all",function(){return c(this).closest("td").find("select option").attr("selected","selected"),c(this).closest("td").find("select").trigger("change"),!1}),c(".woocommerce").on("click",".select_none",function(){return c(this).closest("td").find("select option").removeAttr("selected"),c(this).closest("td").find("select").trigger("change"),!1}),c(".wc-item-reorder-nav").find(".wc-move-up, .wc-move-down").on("click",function(){var t=c(this),e=t.closest("tr");t.focus();var i=t.is(".wc-move-up"),o=t.is(".wc-move-down");if(i){var n=e.prev("tr");n&&n.length&&(n.before(e),a.a11y.speak(r.i18n_moved_up))}else if(o){var s=e.next("tr");s&&s.length&&(s.after(e),a.a11y.speak(r.i18n_moved_down))}t.focus(),t.closest("table").trigger("updateMoveButtons")}),c(".wc-item-reorder-nav").closest("table").on("updateMoveButtons",function(){var t=c(this),e=c(this).find("tbody tr:last"),i=c(this).find("tbody tr:first");t.find(".wc-item-reorder-nav .wc-move-disabled").removeClass("wc-move-disabled").attr({tabindex:"0","aria-hidden":"false"}),i.find(".wc-item-reorder-nav .wc-move-up").addClass("wc-move-disabled").attr({tabindex:"-1","aria-hidden":"true"}),e.find(".wc-item-reorder-nav .wc-move-down").addClass("wc-move-disabled").attr({tabindex:"-1","aria-hidden":"true"})}),c(".wc-item-reorder-nav").closest("table").trigger("updateMoveButtons")})}(jQuery,woocommerce_settings_params,wp);
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(c){({init:function(){c(document.body).on("click","a.help_tip, a.woocommerce-help-tip",this.preventTipTipClick).on("click","a.debug-report",this.generateReport).on("click","#copy-for-support",this.copyReport).on("aftercopy","#copy-for-support",this.copySuccess).on("aftercopyfailure","#copy-for-support",this.copyFail)},preventTipTipClick:function(){return!1},generateReport:function(){var a="";c(".wc_status_table thead, .wc_status_table tbody").each(function(){if(c(this).is("thead")){var t=c(this).find("th:eq(0)").data("export-label")||c(this).text();a=a+"\n### "+c.trim(t)+" ###\n\n"}else c("tr",c(this)).each(function(){var t=c(this).find("td:eq(0)").data("export-label")||c(this).find("td:eq(0)").text(),e=c.trim(t).replace(/(<([^>]+)>)/gi,""),i=c(this).find("td:eq(2)").clone();i.find(".private").remove(),i.find(".dashicons-yes").replaceWith("✔"),i.find(".dashicons-no-alt, .dashicons-warning").replaceWith("❌");var o=c.trim(i.text()),n=o.split(", ");if(1<n.length){var r="";c.each(n,function(t,e){r=r+e+"\n"}),o=r}a=a+""+e+": "+o+"\n"})});try{return c("#debug-report").slideDown(),c("#debug-report").find("textarea").val("`"+a+"`").focus().select(),c(this).fadeOut(),!1}catch(t){console.log(t)}return!1},copyReport:function(t){wcClearClipboard(),wcSetClipboard(c("#debug-report").find("textarea").val(),c(this)),t.preventDefault()},copySuccess:function(){c("#copy-for-support").tipTip({attribute:"data-tip",activation:"focus",fadeIn:50,fadeOut:50,delay:0}).focus()},copyFail:function(){c(".copy-error").removeClass("hidden"),c("#debug-report").find("textarea").focus().select()}}).init(),c("#log-viewer-select").on("click","h2 a.page-title-action",function(t){return t.stopImmediatePropagation(),window.confirm(woocommerce_admin_system_status.delete_log_confirmation)})});
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(r){var c="table.wp-list-table",m='.column-handle input[name="term_id"]',i='<td class="column-handle"></td>';0===r(c).find(".column-handle").length&&(r(c).find("tr:not(.inline-edit-row)").append(i),m=".check-column input"),r(c).find(".column-handle").show(),r.wc_add_missing_sort_handles=function(){var e=r(c).find("tbody > tr"),n=r(c).find("tbody > tr > td.column-handle").parent();e.length!==n.length&&e.each(function(e,t){n.is(t)||r(t).append(i)}),r(c).find(".column-handle").show()},r(document).ajaxComplete(function(e,t,n){t&&4===t.readyState&&200===t.status&&n.data&&(0<=n.data.indexOf("_inline_edit")||0<=n.data.indexOf("add-tag"))&&(r.wc_add_missing_sort_handles(),r(document.body).trigger("init_tooltips"))}),r(c).sortable({items:"tbody tr:not(.inline-edit-row)",cursor:"move",handle:".column-handle",axis:"y",forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"product-cat-placeholder",scrollSensitivity:40,start:function(e,t){t.item.hasClass("alternate")||t.item.css("background-color","#ffffff"),t.item.children("td, th").css("border-bottom-width","0"),t.item.css("outline","1px solid #aaa")},stop:function(e,t){t.item.removeAttr("style"),t.item.children("td, th").css("border-bottom-width","1px")},update:function(e,t){var n,i,d=t.item.find(m).val(),a=t.item.find(".parent").html(),o=t.item.prev().find(m).val(),l=t.item.next().find(m).val();o!==undefined&&(n=t.item.prev().find(".parent").html())!==a&&(o=undefined),l!==undefined&&(i=t.item.next().find(".parent").html())!==a&&(l=undefined),o===undefined&&l===undefined||l===undefined&&i===o||l!==undefined&&n===d?r(c).sortable("cancel"):(t.item.find(".check-column input").hide(),t.item.find(".check-column").append('<img alt="processing" src="images/wpspin_light.gif" class="waiting" style="margin-left: 6px;" />'),r.post(ajaxurl,{action:"woocommerce_term_ordering",id:d,nextid:l,thetaxonomy:woocommerce_term_ordering_params.taxonomy},function(e){"children"===e?window.location.reload():(t.item.find(".check-column input").show(),t.item.find(".check-column").find("img").remove())}),r("table.widefat tbody tr").each(function(){jQuery("table.widefat tbody tr").index(this)%2==0?jQuery(this).addClass("alternate"):jQuery(this).removeClass("alternate")}))}})});
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(g){var f={states:null,init:function(){"undefined"!=typeof wc_users_params.countries&&(this.states=g.parseJSON(wc_users_params.countries.replace(/"/g,'"'))),g(".js_field-country").selectWoo().change(this.change_country),g(".js_field-country").trigger("change",[!0]),g(document.body).on("change","select.js_field-state",this.change_state),g(document.body).on("click","button.js_copy-billing",this.copy_billing)},change_country:function(e,t){if(void 0===t&&(t=!1),null!==f.states){var a,n=g(this),o=n.val(),i=n.parents(".form-table").find(":input.js_field-state"),c=i.parent(),s=i.attr("name"),l=i.attr("id"),r="woocommerce.stickState-"+o,p=n.data(r)?n.data(r):i.val(),d=i.attr("placeholder");if(t&&n.data("woocommerce.stickState-"+o,p),c.show().find(".select2-container").remove(),g.isEmptyObject(f.states[o]))a=g('<input type="text" />').prop("id",l).prop("name",s).prop("placeholder",d).addClass("js_field-state regular-text").val(p),i.replaceWith(a);else{var u=f.states[o],h=g('<option value=""></option>').text(f.i18n_select_state_text);a=g('<select style="width: 25em;"></select>').prop("id",l).prop("name",s).prop("placeholder",d).addClass("js_field-state").append(h),g.each(u,function(e){var t=g("<option></option>").prop("value",e).text(u[e]);a.append(t)}),a.val(p),i.replaceWith(a),a.show().selectWoo().hide().change()}g(document.body).trigger("contry-change.woocommerce",[o,g(this).closest("div")]),g(document.body).trigger("country-change.woocommerce",[o,g(this).closest("div")])}},change_state:function(){var e=g(this),t=e.val(),a=e.parents(".form-table").find(":input.js_field-country"),n=a.val();a.data("woocommerce.stickState-"+n,t)},copy_billing:function(e){e.preventDefault(),g("#fieldset-billing").find("input, select").each(function(e,t){var a=t.name.replace(/^billing_/,"shipping_"),n=g('[name="'+a+'"]');n.length&&n.val(t.value).trigger("change")})}};f.init()});
|
|
@ -1 +0,0 @@
|
|||
function wcSetClipboard(e,r){void 0===r&&(r=jQuery(document));var t=jQuery('<textarea style="opacity:0">');jQuery("body").append(t),t.val(e).select(),r.trigger("beforecopy");try{document.execCommand("copy"),r.trigger("aftercopy")}catch(o){r.trigger("aftercopyfailure")}t.remove()}function wcClearClipboard(){wcSetClipboard("")}
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
jQuery(function(r){if("undefined"==typeof wc_orders_params)return!1;var e=function(){r(document).on("click",".post-type-shop_order .wp-list-table tbody td",this.onRowClick).on("click",".order-preview:not(.disabled)",this.onPreview)};e.prototype.onRowClick=function(e){if(r(e.target).filter("a, a *, .no-link, .no-link *, button, button *").length)return!0;if(window.getSelection&&window.getSelection().toString().length)return!0;var t=r(this).closest("tr").find("a.order-view").attr("href");t&&t.length&&(e.preventDefault(),e.metaKey||e.ctrlKey?window.open(t,"_blank"):window.location=t)},e.prototype.onPreview=function(){var t=r(this),e=t.data("order-id");return t.data("order-data")?r(this).WCBackboneModal({template:"wc-modal-view-order",variable:t.data("order-data")}):(t.addClass("disabled"),r.ajax({url:wc_orders_params.ajax_url,data:{order_id:e,action:"woocommerce_get_order_details",security:wc_orders_params.preview_nonce},type:"GET",success:function(e){r(".order-preview").removeClass("disabled"),e.success&&(t.data("order-data",e.data),r(this).WCBackboneModal({template:"wc-modal-view-order",variable:e.data}))}})),!1},new e});
|
|
@ -1 +0,0 @@
|
|||
!function(n,i){var o=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)};o.prototype.onSubmit=function(o){o.preventDefault();var e=new Date,r="wc-product-export-"+e.getDate()+"-"+(e.getMonth()+1)+"-"+e.getFullYear()+"-"+e.getTime()+".csv";o.data.productExportForm.$form.addClass("woocommerce-exporter__exporting"),o.data.productExportForm.$form.find(".woocommerce-exporter-progress").val(0),o.data.productExportForm.$form.find(".woocommerce-exporter-button").prop("disabled",!0),o.data.productExportForm.processStep(1,n(this).serialize(),"",r)},o.prototype.processStep=function(o,e,r,t){var c=this,p=n(".woocommerce-exporter-columns").val(),a=n("#woocommerce-exporter-meta:checked").length?1:0,s=n(".woocommerce-exporter-types").val(),m=n(".woocommerce-exporter-category").val();n.ajax({type:"POST",url:ajaxurl,data:{form:e,action:"woocommerce_do_ajax_product_export",step:o,columns:r,selected_columns:p,export_meta:a,export_types:s,export_category:m,filename:t,security:wc_product_export_params.export_nonce},dataType:"json",success:function(o){o.success&&("done"===o.data.step?(c.$form.find(".woocommerce-exporter-progress").val(o.data.percentage),i.location=o.data.url,setTimeout(function(){c.$form.removeClass("woocommerce-exporter__exporting"),c.$form.find(".woocommerce-exporter-button").prop("disabled",!1)},2e3)):(c.$form.find(".woocommerce-exporter-progress").val(o.data.percentage),c.processStep(parseInt(o.data.step,10),e,o.data.columns,t)))}}).fail(function(o){i.console.log(o)})},n.fn.wc_product_export_form=function(){return new o(this),this},n(".woocommerce-exporter").wc_product_export_form()}(jQuery,window);
|
|
@ -1 +0,0 @@
|
|||
!function(t,p){var i=function(t){this.$form=t,this.xhr=!1,this.mapping=wc_product_import_params.mapping,this.position=0,this.file=wc_product_import_params.file,this.update_existing=wc_product_import_params.update_existing,this.delimiter=wc_product_import_params.delimiter,this.security=wc_product_import_params.import_nonce,this.imported=0,this.failed=0,this.updated=0,this.skipped=0,this.$form.find(".woocommerce-importer-progress").val(0),this.run_import=this.run_import.bind(this),this.run_import()};i.prototype.run_import=function(){var i=this;t.ajax({type:"POST",url:ajaxurl,data:{action:"woocommerce_do_ajax_product_import",position:i.position,mapping:i.mapping,file:i.file,update_existing:i.update_existing,delimiter:i.delimiter,security:i.security},dataType:"json",success:function(t){t.success&&(i.position=t.data.position,i.imported+=t.data.imported,i.failed+=t.data.failed,i.updated+=t.data.updated,i.skipped+=t.data.skipped,i.$form.find(".woocommerce-importer-progress").val(t.data.percentage),"done"===t.data.position?p.location=t.data.url+"&products-imported="+parseInt(i.imported,10)+"&products-failed="+parseInt(i.failed,10)+"&products-updated="+parseInt(i.updated,10)+"&products-skipped="+parseInt(i.skipped,10):i.run_import())}}).fail(function(t){p.console.log(t)})},t.fn.wc_product_importer=function(){return new i(this),this},t(".woocommerce-importer").wc_product_importer()}(jQuery,window);
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
!function(c,l,r,h){c(function(){var e=c(".wc-shipping-class-rows"),i=c(".wc-shipping-class-save"),s=r.template("wc-shipping-class-row"),n=r.template("wc-shipping-class-row-blank"),t=Backbone.Model.extend({changes:{},logChanges:function(e){var s=this.changes||{};_.each(e,function(e,i){s[i]=_.extend(s[i]||{term_id:i},e)}),this.changes=s,this.trigger("change:classes")},save:function(){_.size(this.changes)?c.post(h+(0<h.indexOf("?")?"&":"?")+"action=woocommerce_shipping_classes_save_changes",{wc_shipping_classes_nonce:l.wc_shipping_classes_nonce,changes:this.changes},this.onSaveResponse,"json"):o.trigger("saved:classes")},discardChanges:function(e){delete(this.changes||{})[e],0===_.size(this.changes)&&d.clearUnloadConfirmation()},onSaveResponse:function(e,i){"success"===i&&(e.success?(o.set("classes",e.data.shipping_classes),o.trigger("change:classes"),o.changes={},o.trigger("saved:classes")):e.data?window.alert(e.data):window.alert(l.strings.save_failed)),d.unblock()}}),a=Backbone.View.extend({rowTemplate:s,initialize:function(){this.listenTo(this.model,"change:classes",this.setUnloadConfirmation),this.listenTo(this.model,"saved:classes",this.clearUnloadConfirmation),this.listenTo(this.model,"saved:classes",this.render),e.on("change",{view:this},this.updateModelOnChange),c(window).on("beforeunload",{view:this},this.unloadConfirmation),i.on("click",{view:this},this.onSubmit),c(document.body).on("click",".wc-shipping-class-add",{view:this},this.onAddNewRow),c(document.body).on("click",".wc-shipping-class-save-changes",{view:this},this.onSubmit)},block:function(){c(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){c(this.el).unblock()},render:function(){var e=_.indexBy(this.model.get("classes"),"term_id"),s=this;this.$el.empty(),this.unblock(),_.size(e)?(e=_.sortBy(e,function(e){return e.name}),c.each(e,function(e,i){s.renderRow(i)})):s.$el.append(n)},renderRow:function(e){var i=this;i.$el.append(i.rowTemplate(e)),i.initRow(e)},initRow:function(i){var e=this.$el.find('tr[data-id="'+i.term_id+'"]');e.find("select").each(function(){var e=c(this).data("attribute");c(this).find('option[value="'+i[e]+'"]').prop("selected",!0)}),e.find(".view").show(),e.find(".edit").hide(),e.find(".wc-shipping-class-edit").on("click",{view:this},this.onEditRow),e.find(".wc-shipping-class-delete").on("click",{view:this},this.onDeleteRow),e.find(".editing .wc-shipping-class-edit").trigger("click"),e.find(".wc-shipping-class-cancel-edit").on("click",{view:this},this.onCancelEditRow),!0===i.editing&&(e.addClass("editing"),e.find(".wc-shipping-class-edit").trigger("click"))},onSubmit:function(e){e.data.view.block(),e.data.view.model.save(),e.preventDefault()},onAddNewRow:function(e){e.preventDefault();var i=e.data.view,s=i.model,n=_.indexBy(s.get("classes"),"term_id"),t={},a=_.size(n),o=_.extend({},l.default_shipping_class,{term_id:"new-"+a+"-"+Date.now(),editing:!0,newRow:!0});t[o.term_id]=o,s.logChanges(t),i.renderRow(o),c(".wc-shipping-classes-blank-state").remove()},onEditRow:function(e){e.preventDefault(),c(this).closest("tr").addClass("editing"),c(this).closest("tr").find(".view").hide(),c(this).closest("tr").find(".edit").show(),e.data.view.model.trigger("change:classes")},onDeleteRow:function(e){var i=e.data.view,s=i.model,n=_.indexBy(s.get("classes"),"term_id"),t={},a=c(this).closest("tr").data("id");e.preventDefault(),n[a]&&(delete n[a],t[a]=_.extend(t[a]||{},{deleted:"deleted"}),s.set("classes",n),s.logChanges(t)),i.render()},onCancelEditRow:function(e){var i=e.data.view,s=i.model,n=c(this).closest("tr"),t=c(this).closest("tr").data("id"),a=_.indexBy(s.get("classes"),"term_id");e.preventDefault(),s.discardChanges(t),a[t]&&(a[t].editing=!1,n.after(i.rowTemplate(a[t])),i.initRow(a[t])),n.remove()},setUnloadConfirmation:function(){this.needsUnloadConfirm=!0,i.removeAttr("disabled")},clearUnloadConfirmation:function(){this.needsUnloadConfirm=!1,i.attr("disabled","disabled")},unloadConfirmation:function(e){if(e.data.view.needsUnloadConfirm)return e.returnValue=l.strings.unload_confirmation_msg,window.event.returnValue=l.strings.unload_confirmation_msg,l.strings.unload_confirmation_msg},updateModelOnChange:function(e){var i=e.data.view.model,s=c(e.target),n=s.closest("tr").data("id"),t=s.data("attribute"),a=s.val(),o=_.indexBy(i.get("classes"),"term_id"),d={};o[n]&&o[n][t]===a||(d[n]={},d[n][t]=a),i.logChanges(d)}}),o=new t({classes:l.classes}),d=new a({model:o,el:e});d.render()})}(jQuery,shippingClassesLocalizeScript,wp,ajaxurl);
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
!function(l,c,h,p){l(function(){var e=l(".wc-shipping-zones"),n=l(".wc-shipping-zone-rows"),i=l(".wc-shipping-zone-save"),o=h.template("wc-shipping-zone-row"),t=h.template("wc-shipping-zone-row-blank"),s=Backbone.Model.extend({changes:{},logChanges:function(e){var i=this.changes||{};_.each(e,function(e,n){i[n]=_.extend(i[n]||{zone_id:n},e)}),this.changes=i,this.trigger("change:zones")},discardChanges:function(e){var n=this.changes||{},i=null,o=_.indexBy(this.get("zones"),"zone_id");n[e]&&n[e].zone_order!==undefined&&(i=n[e].zone_order),delete n[e],null!==i&&o[e]&&o[e].zone_order!==i&&(n[e]=_.extend(n[e]||{},{zone_id:e,zone_order:i})),this.changes=n,0===_.size(this.changes)&&r.clearUnloadConfirmation()},save:function(){_.size(this.changes)?l.post(p+(0<p.indexOf("?")?"&":"?")+"action=woocommerce_shipping_zones_save_changes",{wc_shipping_zones_nonce:c.wc_shipping_zones_nonce,changes:this.changes},this.onSaveResponse,"json"):a.trigger("saved:zones")},onSaveResponse:function(e,n){"success"===n&&(e.success?(a.set("zones",e.data.zones),a.trigger("change:zones"),a.changes={},a.trigger("saved:zones")):window.alert(c.strings.save_failed))}}),d=Backbone.View.extend({rowTemplate:o,initialize:function(){this.listenTo(this.model,"change:zones",this.setUnloadConfirmation),this.listenTo(this.model,"saved:zones",this.clearUnloadConfirmation),this.listenTo(this.model,"saved:zones",this.render),n.on("change",{view:this},this.updateModelOnChange),n.on("sortupdate",{view:this},this.updateModelOnSort),l(window).on("beforeunload",{view:this},this.unloadConfirmation),l(document.body).on("click",".wc-shipping-zone-add",{view:this},this.onAddNewRow)},block:function(){l(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){l(this.el).unblock()},render:function(){var e=_.indexBy(this.model.get("zones"),"zone_id"),i=this;i.$el.empty(),i.unblock(),_.size(e)?(e=_(e).chain().sortBy(function(e){return parseInt(e.zone_id,10)}).sortBy(function(e){return parseInt(e.zone_order,10)}).value(),l.each(e,function(e,n){i.renderRow(n)})):i.$el.append(t),i.initRows()},renderRow:function(e){var n=this;n.$el.append(n.rowTemplate(e)),n.initRow(e)},initRow:function(e){var n=this.$el.find('tr[data-id="'+e.zone_id+'"]');this.renderShippingMethods(e.zone_id,e.shipping_methods),n.find(".wc-shipping-zone-delete").on("click",{view:this},this.onDeleteRow)},initRows:function(){0==l("tbody.wc-shipping-zone-rows tr").length%2?e.find("tbody.wc-shipping-zone-rows").next("tbody").find("tr").addClass("odd"):e.find("tbody.wc-shipping-zone-rows").next("tbody").find("tr").removeClass("odd"),l("#tiptip_holder").removeAttr("style"),l("#tiptip_arrow").removeAttr("style"),l(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:50})},renderShippingMethods:function(e,n){var i=l('.wc-shipping-zones tr[data-id="'+e+'"]').find(".wc-shipping-zone-methods ul");i.find(".wc-shipping-zone-method").remove(),_.size(n)?(n=_.sortBy(n,function(e){return parseInt(e.method_order,10)}),_.each(n,function(e){var n="method_disabled";"yes"===e.enabled&&(n="method_enabled"),i.append('<li class="wc-shipping-zone-method '+n+'">'+e.title+"</li>")})):i.append('<li class="wc-shipping-zone-method">'+c.strings.no_shipping_methods_offered+"</li>")},onDeleteRow:function(e){var n=e.data.view.model,i=_.indexBy(n.get("zones"),"zone_id"),o={},t=l(this).closest("tr").data("id");e.preventDefault(),window.confirm(c.strings.delete_confirmation_msg)&&i[t]&&(delete i[t],o[t]=_.extend(o[t]||{},{deleted:"deleted"}),n.set("zones",i),n.logChanges(o),e.data.view.block(),e.data.view.model.save())},setUnloadConfirmation:function(){this.needsUnloadConfirm=!0,i.prop("disabled",!1)},clearUnloadConfirmation:function(){this.needsUnloadConfirm=!1,i.prop("disabled",!0)},unloadConfirmation:function(e){if(e.data.view.needsUnloadConfirm)return e.returnValue=c.strings.unload_confirmation_msg,window.event.returnValue=c.strings.unload_confirmation_msg,c.strings.unload_confirmation_msg},updateModelOnChange:function(e){var n=e.data.view.model,i=l(e.target),o=i.closest("tr").data("id"),t=i.data("attribute"),s=i.val(),d=_.indexBy(n.get("zones"),"zone_id"),a={};d[o]&&d[o][t]===s||(a[o]={},a[o][t]=s),n.logChanges(a)},updateModelOnSort:function(e){var n=e.data.view.model,t=_.indexBy(n.get("zones"),"zone_id"),i=l("tbody.wc-shipping-zone-rows tr"),s={};_.each(i,function(e){var n=l(e).data("id"),i=null,o=parseInt(l(e).index(),10);t[n]&&(i=parseInt(t[n].zone_order,10)),i!==o&&(s[n]=_.extend(s[n]||{},{zone_order:o}))}),_.size(s)&&(n.logChanges(s),e.data.view.block(),e.data.view.model.save())}}),a=new s({zones:c.zones}),r=new d({model:a,el:n});r.render(),n.sortable({items:"tr",cursor:"move",axis:"y",handle:"td.wc-shipping-zone-sort",scrollSensitivity:40})})}(jQuery,shippingZonesLocalizeScript,wp,ajaxurl);
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
jQuery(function(t){if("undefined"==typeof woocommerce_params)return!1;t("#add_payment_method").on("click init_add_payment_method",".payment_methods input.input-radio",function(){if(1<t(".payment_methods input.input-radio").length){var e=t("div.payment_box."+t(this).attr("ID"));t(this).is(":checked")&&!e.is(":visible")&&(t("div.payment_box").filter(":visible").slideUp(250),t(this).is(":checked")&&t("div.payment_box."+t(this).attr("ID")).slideDown(250))}else t("div.payment_box").show()}).find("input[name=payment_method]:checked").click(),t("#add_payment_method").submit(function(){t("#add_payment_method").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}),t(document.body).trigger("init_add_payment_method")});
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
jQuery(function(e){if("undefined"==typeof wc_add_to_cart_params)return!1;var t=function(){e(document.body).on("click",".add_to_cart_button",this.onAddToCart).on("click",".remove_from_cart_button",this.onRemoveFromCart).on("added_to_cart",this.updateButton).on("added_to_cart",this.updateCartPage).on("added_to_cart removed_from_cart",this.updateFragments)};t.prototype.onAddToCart=function(t){var a=e(this);if(a.is(".ajax_add_to_cart")){if(!a.attr("data-product_id"))return!0;t.preventDefault(),a.removeClass("added"),a.addClass("loading");var r={};e.each(a.data(),function(t,a){r[t]=a}),e(document.body).trigger("adding_to_cart",[a,r]),e.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),r,function(t){t&&(t.error&&t.product_url?window.location=t.product_url:"yes"!==wc_add_to_cart_params.cart_redirect_after_add?e(document.body).trigger("added_to_cart",[t.fragments,t.cart_hash,a]):window.location=wc_add_to_cart_params.cart_url)})}},t.prototype.onRemoveFromCart=function(t){var a=e(this),r=a.closest(".woocommerce-mini-cart-item");t.preventDefault(),r.block({message:null,overlayCSS:{opacity:.6}}),e.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","remove_from_cart"),{cart_item_key:a.data("cart_item_key")},function(t){t&&t.fragments?e(document.body).trigger("removed_from_cart",[t.fragments,t.cart_hash,a]):window.location=a.attr("href")}).fail(function(){window.location=a.attr("href")})},t.prototype.updateButton=function(t,a,r,o){(o=void 0!==o&&o)&&(o.removeClass("loading"),o.addClass("added"),wc_add_to_cart_params.is_cart||0!==o.parent().find(".added_to_cart").length||o.after(' <a href="'+wc_add_to_cart_params.cart_url+'" class="added_to_cart wc-forward" title="'+wc_add_to_cart_params.i18n_view_cart+'">'+wc_add_to_cart_params.i18n_view_cart+"</a>"),e(document.body).trigger("wc_cart_button_updated",[o]))},t.prototype.updateCartPage=function(){var t=window.location.toString().replace("add-to-cart","added-to-cart");e.get(t,function(t){e(".shop_table.cart:eq(0)").replaceWith(e(t).find(".shop_table.cart:eq(0)")),e(".cart_totals:eq(0)").replaceWith(e(t).find(".cart_totals:eq(0)")),e(".cart_totals, .shop_table.cart").stop(!0).css("opacity","1").unblock(),e(document.body).trigger("cart_page_refreshed"),e(document.body).trigger("cart_totals_refreshed")})},t.prototype.updateFragments=function(t,a){a&&(e.each(a,function(t){e(t).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),e.each(a,function(t,a){e(t).replaceWith(a),e(t).stop(!0).css("opacity","1").unblock()}),e(document.body).trigger("wc_fragments_loaded"))},new t});
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(p){if("undefined"==typeof wc_address_i18n_params)return!1;var e=wc_address_i18n_params.locale.replace(/"/g,'"'),s=p.parseJSON(e);function c(e,a){a?(e.find("label .optional").remove(),e.addClass("validate-required"),0===e.find("label .required").length&&e.find("label").append(' <abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>')):(e.find("label .required").remove(),e.removeClass("validate-required woocommerce-invalid woocommerce-invalid-required-field"),0===e.find("label .optional").length&&e.find("label").append(' <span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>"))}p(document.body).bind("country_to_state_changing",function(e,a,i){var t,r=i;t="undefined"!=typeof s[a]?s[a]:s["default"];var d=r.find("#billing_postcode_field, #shipping_postcode_field"),l=r.find("#billing_city_field, #shipping_city_field"),n=r.find("#billing_state_field, #shipping_state_field");d.attr("data-o_class")||(d.attr("data-o_class",d.attr("class")),l.attr("data-o_class",l.attr("class")),n.attr("data-o_class",n.attr("class")));var o=p.parseJSON(wc_address_i18n_params.locale_fields);p.each(o,function(e,a){var i=r.find(a),d=p.extend(!0,{},s["default"][e],t[e]);"undefined"!=typeof d.label&&i.find("label").html(d.label),"undefined"!=typeof d.placeholder&&(i.find(":input").attr("placeholder",d.placeholder),i.find(":input").attr("data-placeholder",d.placeholder),i.find(".select2-selection__placeholder").text(d.placeholder)),"undefined"!=typeof d.placeholder||"undefined"==typeof d.label||i.find("label").length||(i.find(":input").attr("placeholder",d.label),i.find(":input").attr("data-placeholder",d.label),i.find(".select2-selection__placeholder").text(d.label)),"undefined"!=typeof d.required?c(i,d.required):c(i,!1),"undefined"!=typeof d.priority&&i.data("priority",d.priority),"state"!==e&&("undefined"!=typeof d.hidden&&!0===d.hidden?i.hide().find(":input").val(""):i.show())}),p(".woocommerce-billing-fields__field-wrapper,.woocommerce-shipping-fields__field-wrapper,.woocommerce-address-fields__field-wrapper,.woocommerce-additional-fields__field-wrapper .woocommerce-account-fields").each(function(e,a){var i=p(a).find(".form-row"),d=i.first().parent(),t=0;i.each(function(){p(this).data("priority")||p(this).data("priority",t+1),t=p(this).data("priority")}),i.sort(function(e,a){var i=parseInt(p(e).data("priority"),10),d=parseInt(p(a).data("priority"),10);return d<i?1:i<d?-1:0}),i.detach().appendTo(d)})}).trigger("wc_address_i18n_ready")});
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(r){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=!0,o=wc_cart_fragments_params.cart_hash_key;try{t="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(f){t=!1}function a(){t&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function s(e){t&&(localStorage.setItem(o,e),sessionStorage.setItem(o,e))}var e={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",data:{time:(new Date).getTime()},timeout:wc_cart_fragments_params.request_timeout,success:function(e){e&&e.fragments&&(r.each(e.fragments,function(e,t){r(e).replaceWith(t)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(e.fragments)),s(e.cart_hash),e.cart_hash&&a()),r(document.body).trigger("wc_fragments_refreshed"))},error:function(){r(document.body).trigger("wc_fragments_ajax_error")}};function n(){r.ajax(e)}if(t){var i=null;r(document.body).on("wc_fragment_refresh updated_wc_div",function(){n()}),r(document.body).on("added_to_cart removed_from_cart",function(e,t,r){var n=sessionStorage.getItem(o);null!==n&&n!==undefined&&""!==n||a(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),s(r)}),r(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(n,864e5)}),r(window).on("storage onstorage",function(e){o===e.originalEvent.key&&localStorage.getItem(o)!==sessionStorage.getItem(o)&&n()}),r(window).on("pageshow",function(e){e.originalEvent.persisted&&(r(".widget_shopping_cart_content").empty(),r(document.body).trigger("wc_fragment_refresh"))});try{var c=r.parseJSON(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),_=sessionStorage.getItem(o),g=Cookies.get("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if(null!==_&&_!==undefined&&""!==_||(_=""),null!==g&&g!==undefined&&""!==g||(g=""),_&&(null===m||m===undefined||""===m))throw"No cart_created";if(m){var d=1*m+864e5,w=(new Date).getTime();if(d<w)throw"Fragment expired";i=setTimeout(n,d-w)}if(!c||!c["div.widget_shopping_cart_content"]||_!==g)throw"No fragment";r.each(c,function(e,t){r(e).replaceWith(t)}),r(document.body).trigger("wc_fragments_loaded")}catch(f){n()}}else n();0<Cookies.get("woocommerce_items_in_cart")?r(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():r(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),r(document.body).on("adding_to_cart",function(){r(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()}),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){n()})});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
jQuery(function(p){if("undefined"==typeof wc_country_select_params)return!1;if(p().selectWoo){var t=function(){p("select.country_select:visible, select.state_select:visible").each(function(){var t=p.extend({placeholder:p(this).attr("data-placeholder")||p(this).attr("placeholder")||"",width:"100%"},{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(t){var e=t.input.length-t.maximum;return 1==e?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",e)},inputTooShort:function(t){var e=t.minimum-t.input.length;return 1==e?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",e)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(t){return 1===t.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",t.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}});p(this).on("select2:select",function(){p(this).focus()}).selectWoo(t)})};t(),p(document.body).bind("country_to_state_changed",function(){t()})}var e=wc_country_select_params.countries.replace(/"/g,'"'),u=p.parseJSON(e),d=".woocommerce-billing-fields,.woocommerce-shipping-fields,.woocommerce-address-fields,.woocommerce-shipping-calculator";p(document.body).on("change refresh","select.country_to_state, input.country_to_state",function(){var t=p(this).closest(d);t.length||(t=p(this).closest(".form-row").parent());var e,n=p(this).val(),o=t.find("#billing_state, #shipping_state, #calc_shipping_state"),c=o.closest("p.form-row"),r=o.attr("name"),a=o.attr("id"),i=o.val(),s=o.attr("placeholder")||o.attr("data-placeholder")||"";if(u[n])if(p.isEmptyObject(u[n]))e=p('<input type="hidden" />').prop("id",a).prop("name",r).prop("placeholder",s).addClass("hidden"),c.hide().find(".select2-container").remove(),o.replaceWith(e),p(document.body).trigger("country_to_state_changed",[n,t]);else{var _=u[n],l=p('<option value=""></option>').text(wc_country_select_params.i18n_select_state_text);s||(s=wc_country_select_params.i18n_select_state_text),c.show(),o.is("input")&&(e=p("<select></select>").prop("id",a).prop("name",r).data("placeholder",s).addClass("state_select"),o.replaceWith(e),o=t.find("#billing_state, #shipping_state, #calc_shipping_state")),o.empty().append(l),p.each(_,function(t){var e=p("<option></option>").prop("value",t).text(_[t]);o.append(e)}),o.val(i).change(),p(document.body).trigger("country_to_state_changed",[n,t])}else o.is('select, input[type="hidden"]')&&(e=p('<input type="text" />').prop("id",a).prop("name",r).prop("placeholder",s).addClass("input-text"),c.show().find(".select2-container").remove(),o.replaceWith(e),p(document.body).trigger("country_to_state_changed",[n,t]));p(document.body).trigger("country_to_state_changing",[n,t])}),p(document.body).on("wc_address_i18n_ready",function(){p(d).each(function(){var t=p(this).find("#billing_country, #shipping_country, #calc_shipping_country");0!==t.length&&0!==t.val().length&&t.trigger("refresh")})})});
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(r){r(".wc-credit-card-form-card-number").payment("formatCardNumber"),r(".wc-credit-card-form-card-expiry").payment("formatCardExpiry"),r(".wc-credit-card-form-card-cvc").payment("formatCardCVC"),r(document.body).on("updated_checkout wc-credit-card-form-init",function(){r(".wc-credit-card-form-card-number").payment("formatCardNumber"),r(".wc-credit-card-form-card-expiry").payment("formatCardExpiry"),r(".wc-credit-card-form-card-cvc").payment("formatCardCVC")}).trigger("wc-credit-card-form-init")});
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(e){var o=window.location.toString(),a=function(){wc_geolocation_params.hash&&e('a[href^="'+wc_geolocation_params.home_url+'"]:not(a[href*="v="]), a[href^="/"]:not(a[href*="v="])').each(function(){var a=e(this),o=a.attr("href"),t=o.split("#");o=0<(o=t[0]).indexOf("?")?o+"&v="+wc_geolocation_params.hash:o+"?v="+wc_geolocation_params.hash,"undefined"!=typeof t[1]&&null!==t[1]&&(o=o+"#"+t[1]),a.attr("href",o)})},t={url:wc_geolocation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_customer_location"),type:"GET",success:function(a){a.success&&a.data.hash&&a.data.hash!==wc_geolocation_params.hash&&function(a){o=0<o.indexOf("?v=")||0<o.indexOf("&v=")?o.replace(/v=[^&]+/,"v="+a):0<o.indexOf("?")?o+"&v="+a:o+"?v="+a,window.location=o}(a.data.hash)}};"1"===wc_geolocation_params.is_available&&(e.ajax(t),e("form").each(function(){var a=e(this),o=a.attr("method"),t=0<a.find('input[name="v"]').length;if(o&&"get"===o.toLowerCase()&&!t)a.append('<input type="hidden" name="v" value="'+wc_geolocation_params.hash+'" />');else{var n=a.attr("action");n&&(0<n.indexOf("?")?a.attr("action",n+"&v="+wc_geolocation_params.hash):a.attr("action",n+"?v="+wc_geolocation_params.hash))}}),a()),e(document.body).on("added_to_cart",function(){a()})});
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(t){t(".lost_reset_password").on("submit",function(){t('button[type="submit"]',this).attr("disabled","disabled")})});
|
|
@ -1 +0,0 @@
|
|||
!function(d){"use strict";var n={init:function(){d(document.body).on("keyup change","form.register #reg_password, form.checkout #account_password, form.edit-account #password_1, form.lost_reset_password #password_1",this.strengthMeter),d("form.checkout #createaccount").change()},strengthMeter:function(){var s,r=d("form.register, form.checkout, form.edit-account, form.lost_reset_password"),e=d('button[type="submit"]',r),t=d("#reg_password, #account_password, #password_1",r),o=t.val(),a=!r.is("form.checkout");n.includeMeter(r,t),s=n.checkPasswordStrength(r,t),wc_password_strength_meter_params.stop_checkout&&(a=!0),0<o.length&&s<wc_password_strength_meter_params.min_password_strength&&-1!==s&&a?e.attr("disabled","disabled").addClass("disabled"):e.removeAttr("disabled","disabled").removeClass("disabled")},includeMeter:function(s,r){var e=s.find(".woocommerce-password-strength");""===r.val()?(e.hide(),d(document.body).trigger("wc-password-strength-hide")):0===e.length?(r.after('<div class="woocommerce-password-strength" aria-live="polite"></div>'),d(document.body).trigger("wc-password-strength-added")):(e.show(),d(document.body).trigger("wc-password-strength-show"))},checkPasswordStrength:function(s,r){var e=s.find(".woocommerce-password-strength"),t=s.find(".woocommerce-password-hint"),o='<small class="woocommerce-password-hint">'+wc_password_strength_meter_params.i18n_password_hint+"</small>",a=wp.passwordStrength.meter(r.val(),wp.passwordStrength.userInputBlacklist()),d="";if(e.removeClass("short bad good strong"),t.remove(),e.is(":hidden"))return a;switch(a<wc_password_strength_meter_params.min_password_strength&&(d=" - "+wc_password_strength_meter_params.i18n_password_error),a){case 0:e.addClass("short").html(pwsL10n["short"]+d),e.after(o);break;case 1:case 2:e.addClass("bad").html(pwsL10n.bad+d),e.after(o);break;case 3:e.addClass("good").html(pwsL10n.good+d);break;case 4:e.addClass("strong").html(pwsL10n.strong+d);break;case 5:e.addClass("short").html(pwsL10n.mismatch)}return a}};n.init()}(jQuery);
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(_){if("undefined"==typeof woocommerce_price_slider_params)return!1;function e(){_("input#min_price, input#max_price").hide(),_(".price_slider, .price_label").show();var e=_(".price_slider_amount #min_price").data("min"),r=_(".price_slider_amount #max_price").data("max"),i=_(".price_slider_amount").data("step")||1,c=_(".price_slider_amount #min_price").val(),a=_(".price_slider_amount #max_price").val();_(".price_slider:not(.ui-slider)").slider({range:!0,animate:!0,min:e,max:r,step:i,values:[c,a],create:function(){_(".price_slider_amount #min_price").val(c),_(".price_slider_amount #max_price").val(a),_(document.body).trigger("price_slider_create",[c,a])},slide:function(e,r){_("input#min_price").val(r.values[0]),_("input#max_price").val(r.values[1]),_(document.body).trigger("price_slider_slide",[r.values[0],r.values[1]])},change:function(e,r){_(document.body).trigger("price_slider_change",[r.values[0],r.values[1]])}})}_(document.body).bind("price_slider_create price_slider_slide",function(e,r,i){_(".price_slider_amount span.from").html(accounting.formatMoney(r,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format})),_(".price_slider_amount span.to").html(accounting.formatMoney(i,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format})),_(document.body).trigger("price_slider_updated",[r,i])}),e(),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){e()})});
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
jQuery(function(t){var o=function(e){this.$target=e,this.$formWrap=e.closest(".payment_box"),this.params=t.extend({},{is_registration_required:!1,is_logged_in:!1},wc_tokenization_form_params),this.onDisplay=this.onDisplay.bind(this),this.hideForm=this.hideForm.bind(this),this.showForm=this.showForm.bind(this),this.showSaveNewCheckbox=this.showSaveNewCheckbox.bind(this),this.hideSaveNewCheckbox=this.hideSaveNewCheckbox.bind(this),this.$target.on("click change",":input.woocommerce-SavedPaymentMethods-tokenInput",{tokenizationForm:this},this.onTokenChange),t("input#createaccount").change({tokenizationForm:this},this.onCreateAccountChange),this.onDisplay()};o.prototype.onDisplay=function(){0===t(":input.woocommerce-SavedPaymentMethods-tokenInput:checked",this.$target).length&&t(":input.woocommerce-SavedPaymentMethods-tokenInput:last",this.$target).prop("checked",!0),0===this.$target.data("count")&&t(".woocommerce-SavedPaymentMethods-new",this.$target).remove(),0<t("input#createaccount").length&&t("input#createaccount").is(":checked")||this.params.is_logged_in||this.params.is_registration_required?this.showSaveNewCheckbox():this.hideSaveNewCheckbox(),t(":input.woocommerce-SavedPaymentMethods-tokenInput:checked",this.$target).trigger("change")},o.prototype.onTokenChange=function(e){"new"===t(this).val()?(e.data.tokenizationForm.showForm(),e.data.tokenizationForm.showSaveNewCheckbox()):(e.data.tokenizationForm.hideForm(),e.data.tokenizationForm.hideSaveNewCheckbox())},o.prototype.onCreateAccountChange=function(e){t(this).is(":checked")?e.data.tokenizationForm.showSaveNewCheckbox():e.data.tokenizationForm.hideSaveNewCheckbox()},o.prototype.hideForm=function(){t(".wc-payment-form",this.$formWrap).hide()},o.prototype.showForm=function(){t(".wc-payment-form",this.$formWrap).show()},o.prototype.showSaveNewCheckbox=function(){t(".woocommerce-SavedPaymentMethods-saveNew",this.$formWrap).show()},o.prototype.hideSaveNewCheckbox=function(){t(".woocommerce-SavedPaymentMethods-saveNew",this.$formWrap).hide()},t.fn.wc_tokenization_form=function(e){return new o(this,e),this},t(document.body).on("updated_checkout wc-credit-card-form-init",function(){t("ul.woocommerce-SavedPaymentMethods").each(function(){t(this).wc_tokenization_form()})})});
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(i){i(".woocommerce-ordering").on("change","select.orderby",function(){i(this).closest("form").submit()}),i("input.qty:not(.product-quantity input.qty)").each(function(){var e=parseFloat(i(this).attr("min"));0<=e&&parseFloat(i(this).val())<e&&i(this).val(e)});var o="store_notice"+(i(".woocommerce-store-notice").data("notice-id")||"");"hidden"===Cookies.get(o)?i(".woocommerce-store-notice").hide():i(".woocommerce-store-notice").show(),i(".woocommerce-store-notice__dismiss-link").click(function(e){Cookies.set(o,"hidden",{path:"/"}),i(".woocommerce-store-notice").hide(),e.preventDefault()}),i(document.body).on("click",function(){i(".woocommerce-input-wrapper span.description:visible").prop("aria-hidden",!0).slideUp(250)}),i(".woocommerce-input-wrapper").on("click",function(e){e.stopPropagation()}),i(".woocommerce-input-wrapper :input").on("keydown",function(e){var o=i(this).parent().find("span.description");if(27===e.which&&o.length&&o.is(":visible"))return o.prop("aria-hidden",!0).slideUp(250),e.preventDefault(),!1}).on("click focus",function(){var e=i(this).parent(),o=e.find("span.description");e.addClass("currentTarget"),i(".woocommerce-input-wrapper:not(.currentTarget) span.description:visible").prop("aria-hidden",!0).slideUp(250),o.length&&o.is(":hidden")&&o.prop("aria-hidden",!1).slideDown(250),e.removeClass("currentTarget")}),i.scroll_to_notices=function(e){e.length&&i("html, body").animate({scrollTop:e.offset().top-100},1e3)}});
|
File diff suppressed because it is too large
Load Diff
|
@ -200,16 +200,32 @@ abstract class WC_Data {
|
|||
* @return int
|
||||
*/
|
||||
public function save() {
|
||||
if ( $this->data_store ) {
|
||||
// Trigger action before saving to the DB. Allows you to adjust object props before save.
|
||||
do_action( 'woocommerce_before_' . $this->object_type . '_object_save', $this, $this->data_store );
|
||||
|
||||
if ( $this->get_id() ) {
|
||||
$this->data_store->update( $this );
|
||||
} else {
|
||||
$this->data_store->create( $this );
|
||||
}
|
||||
if ( ! $this->data_store ) {
|
||||
return $this->get_id();
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger action before saving to the DB. Allows you to adjust object props before save.
|
||||
*
|
||||
* @param WC_Data $this The object being saved.
|
||||
* @param WC_Data_Store_WP $data_store THe data store persisting the data.
|
||||
*/
|
||||
do_action( 'woocommerce_before_' . $this->object_type . '_object_save', $this, $this->data_store );
|
||||
|
||||
if ( $this->get_id() ) {
|
||||
$this->data_store->update( $this );
|
||||
} else {
|
||||
$this->data_store->create( $this );
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger action after saving to the DB.
|
||||
*
|
||||
* @param WC_Data $this The object being saved.
|
||||
* @param WC_Data_Store_WP $data_store THe data store persisting the data.
|
||||
*/
|
||||
do_action( 'woocommerce_after_' . $this->object_type . '_object_save', $this, $this->data_store );
|
||||
|
||||
return $this->get_id();
|
||||
}
|
||||
|
||||
|
|
|
@ -165,8 +165,17 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
|||
* @return int order ID
|
||||
*/
|
||||
public function save() {
|
||||
if ( $this->data_store ) {
|
||||
// Trigger action before saving to the DB. Allows you to adjust object props before save.
|
||||
if ( ! $this->data_store ) {
|
||||
return $this->get_id();
|
||||
}
|
||||
|
||||
try {
|
||||
/**
|
||||
* Trigger action before saving to the DB. Allows you to adjust object props before save.
|
||||
*
|
||||
* @param WC_Data $this The object being saved.
|
||||
* @param WC_Data_Store_WP $data_store THe data store persisting the data.
|
||||
*/
|
||||
do_action( 'woocommerce_before_' . $this->object_type . '_object_save', $this, $this->data_store );
|
||||
|
||||
if ( $this->get_id() ) {
|
||||
|
@ -174,11 +183,41 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
|||
} else {
|
||||
$this->data_store->create( $this );
|
||||
}
|
||||
|
||||
$this->save_items();
|
||||
|
||||
/**
|
||||
* Trigger action after saving to the DB.
|
||||
*
|
||||
* @param WC_Data $this The object being saved.
|
||||
* @param WC_Data_Store_WP $data_store THe data store persisting the data.
|
||||
*/
|
||||
do_action( 'woocommerce_after_' . $this->object_type . '_object_save', $this, $this->data_store );
|
||||
|
||||
} catch ( Exception $e ) {
|
||||
$this->handle_exception( $e, __( 'Error saving order.', 'woocommerce' ) );
|
||||
}
|
||||
$this->save_items();
|
||||
|
||||
return $this->get_id();
|
||||
}
|
||||
|
||||
/**
|
||||
* Log an error about this order is exception is encountered.
|
||||
*
|
||||
* @param Exception $e Exception object.
|
||||
* @param string $message Message regarding exception thrown.
|
||||
* @since 3.7.0
|
||||
*/
|
||||
protected function handle_exception( $e, $message = 'Error' ) {
|
||||
wc_get_logger()->error(
|
||||
$message,
|
||||
array(
|
||||
'order' => $this,
|
||||
'error' => $e,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save all order items which are part of this order.
|
||||
*/
|
||||
|
|
|
@ -1360,19 +1360,36 @@ class WC_Product extends WC_Abstract_Legacy_Product {
|
|||
public function save() {
|
||||
$this->validate_props();
|
||||
|
||||
if ( $this->data_store ) {
|
||||
// Trigger action before saving to the DB. Use a pointer to adjust object props before save.
|
||||
do_action( 'woocommerce_before_' . $this->object_type . '_object_save', $this, $this->data_store );
|
||||
|
||||
if ( $this->get_id() ) {
|
||||
$this->data_store->update( $this );
|
||||
} else {
|
||||
$this->data_store->create( $this );
|
||||
}
|
||||
if ( $this->get_parent_id() ) {
|
||||
wc_deferred_product_sync( $this->get_parent_id() );
|
||||
}
|
||||
if ( ! $this->data_store ) {
|
||||
return $this->get_id();
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger action before saving to the DB. Allows you to adjust object props before save.
|
||||
*
|
||||
* @param WC_Data $this The object being saved.
|
||||
* @param WC_Data_Store_WP $data_store THe data store persisting the data.
|
||||
*/
|
||||
do_action( 'woocommerce_before_' . $this->object_type . '_object_save', $this, $this->data_store );
|
||||
|
||||
if ( $this->get_id() ) {
|
||||
$this->data_store->update( $this );
|
||||
} else {
|
||||
$this->data_store->create( $this );
|
||||
}
|
||||
|
||||
if ( $this->get_parent_id() ) {
|
||||
wc_deferred_product_sync( $this->get_parent_id() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger action after saving to the DB.
|
||||
*
|
||||
* @param WC_Data $this The object being saved.
|
||||
* @param WC_Data_Store_WP $data_store THe data store persisting the data.
|
||||
*/
|
||||
do_action( 'woocommerce_after_' . $this->object_type . '_object_save', $this, $this->data_store );
|
||||
|
||||
return $this->get_id();
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
/**
|
||||
* Load assets
|
||||
*
|
||||
* @package WooCommerce/Admin
|
||||
* @version 2.1.0
|
||||
* @package WooCommerce/Admin
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -275,6 +275,17 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) :
|
|||
}
|
||||
if ( in_array( $screen_id, array( 'shop_coupon', 'edit-shop_coupon' ) ) ) {
|
||||
wp_enqueue_script( 'wc-admin-coupon-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-coupon' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION );
|
||||
wp_localize_script(
|
||||
'wc-admin-coupon-meta-boxes',
|
||||
'woocommerce_admin_meta_boxes_coupon',
|
||||
array(
|
||||
'generate_button_text' => esc_html__( 'Generate coupon code', 'woocommerce' ),
|
||||
'characters' => apply_filters( 'woocommerce_coupon_code_generator_characters', 'ABCDEFGHJKMNPQRSTUVWXYZ23456789' ),
|
||||
'char_length' => apply_filters( 'woocommerce_coupon_code_generator_character_length', 8 ),
|
||||
'prefix' => apply_filters( 'woocommerce_coupon_code_generator_prefix', '' ),
|
||||
'suffix' => apply_filters( 'woocommerce_coupon_code_generator_suffix', '' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
if ( in_array( str_replace( 'edit-', '', $screen_id ), array_merge( array( 'shop_coupon', 'product' ), wc_get_order_types( 'order-meta-boxes' ) ) ) ) {
|
||||
$post_id = isset( $post->ID ) ? $post->ID : '';
|
||||
|
|
|
@ -44,6 +44,9 @@ class WC_Admin_Menus {
|
|||
if ( apply_filters( 'woocommerce_show_admin_bar_visit_store', true ) ) {
|
||||
add_action( 'admin_bar_menu', array( $this, 'admin_bar_menus' ), 31 );
|
||||
}
|
||||
|
||||
// Handle saving settings earlier than load-{page} hook to avoid race conditions in conditional menus.
|
||||
add_action( 'wp_loaded', array( $this, 'save_settings' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,14 +88,40 @@ class WC_Admin_Menus {
|
|||
* Loads gateways and shipping methods into memory for use within settings.
|
||||
*/
|
||||
public function settings_page_init() {
|
||||
global $current_tab, $current_section;
|
||||
|
||||
WC()->payment_gateways();
|
||||
WC()->shipping();
|
||||
|
||||
// Include settings pages.
|
||||
WC_Admin_Settings::get_settings_pages();
|
||||
|
||||
// Add any posted messages.
|
||||
if ( ! empty( $_GET['wc_error'] ) ) { // WPCS: input var okay, CSRF ok.
|
||||
WC_Admin_Settings::add_error( wp_kses_post( wp_unslash( $_GET['wc_error'] ) ) ); // WPCS: input var okay, CSRF ok.
|
||||
}
|
||||
|
||||
if ( ! empty( $_GET['wc_message'] ) ) { // WPCS: input var okay, CSRF ok.
|
||||
WC_Admin_Settings::add_message( wp_kses_post( wp_unslash( $_GET['wc_message'] ) ) ); // WPCS: input var okay, CSRF ok.
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_settings_page_init' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle saving of settings.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function save_settings() {
|
||||
global $current_tab, $current_section;
|
||||
|
||||
// We should only save on the settings page.
|
||||
if ( ! is_admin() || ! isset( $_GET['page'] ) || 'wc-settings' !== $_GET['page'] ) { // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
|
||||
return;
|
||||
}
|
||||
|
||||
// Include settings pages.
|
||||
WC_Admin_Settings::get_settings_pages();
|
||||
|
||||
// Get current tab/section.
|
||||
$current_tab = empty( $_GET['tab'] ) ? 'general' : sanitize_title( wp_unslash( $_GET['tab'] ) ); // WPCS: input var okay, CSRF ok.
|
||||
$current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( wp_unslash( $_REQUEST['section'] ) ); // WPCS: input var okay, CSRF ok.
|
||||
|
@ -103,17 +132,6 @@ class WC_Admin_Menus {
|
|||
} elseif ( '' === $current_section && apply_filters( "woocommerce_save_settings_{$current_tab}", ! empty( $_POST['save'] ) ) ) { // WPCS: input var okay, CSRF ok.
|
||||
WC_Admin_Settings::save();
|
||||
}
|
||||
|
||||
// Add any posted messages.
|
||||
if ( ! empty( $_GET['wc_error'] ) ) { // WPCS: input var okay, CSRF ok.
|
||||
WC_Admin_Settings::add_error( wp_kses_post( wp_unslash( $_GET['wc_error'] ) ) ); // WPCS: input var okay, CSRF ok.
|
||||
}
|
||||
|
||||
if ( ! empty( $_GET['wc_message'] ) ) { // WPCS: input var okay, CSRF ok.
|
||||
WC_Admin_Settings::add_message( wp_kses_post( wp_unslash( $_GET['wc_message'] ) ) ); // WPCS: input var okay, CSRF ok.
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_settings_page_init' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -159,6 +159,10 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
* @return mixed
|
||||
*/
|
||||
public static function get_option( $option_name, $default = '' ) {
|
||||
if ( ! $option_name ) {
|
||||
return $default;
|
||||
}
|
||||
|
||||
// Array value.
|
||||
if ( strstr( $option_name, '[' ) ) {
|
||||
|
||||
|
@ -230,6 +234,9 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
if ( ! isset( $value['suffix'] ) ) {
|
||||
$value['suffix'] = '';
|
||||
}
|
||||
if ( ! isset( $value['value'] ) ) {
|
||||
$value['value'] = self::get_option( $value['id'], $value['default'] );
|
||||
}
|
||||
|
||||
// Custom attribute handling.
|
||||
$custom_attributes = array();
|
||||
|
@ -288,7 +295,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
case 'email':
|
||||
case 'url':
|
||||
case 'tel':
|
||||
$option_value = self::get_option( $value['id'], $value['default'] );
|
||||
$option_value = $value['value'];
|
||||
|
||||
?><tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
|
@ -312,7 +319,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
|
||||
// Color picker.
|
||||
case 'color':
|
||||
$option_value = self::get_option( $value['id'], $value['default'] );
|
||||
$option_value = $value['value'];
|
||||
|
||||
?>
|
||||
<tr valign="top">
|
||||
|
@ -340,7 +347,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
|
||||
// Textarea.
|
||||
case 'textarea':
|
||||
$option_value = self::get_option( $value['id'], $value['default'] );
|
||||
$option_value = $value['value'];
|
||||
|
||||
?>
|
||||
<tr valign="top">
|
||||
|
@ -366,7 +373,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
// Select boxes.
|
||||
case 'select':
|
||||
case 'multiselect':
|
||||
$option_value = self::get_option( $value['id'], $value['default'] );
|
||||
$option_value = $value['value'];
|
||||
|
||||
?>
|
||||
<tr valign="top">
|
||||
|
@ -407,7 +414,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
|
||||
// Radio inputs.
|
||||
case 'radio':
|
||||
$option_value = self::get_option( $value['id'], $value['default'] );
|
||||
$option_value = $value['value'];
|
||||
|
||||
?>
|
||||
<tr valign="top">
|
||||
|
@ -444,7 +451,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
|
||||
// Checkbox input.
|
||||
case 'checkbox':
|
||||
$option_value = self::get_option( $value['id'], $value['default'] );
|
||||
$option_value = $value['value'];
|
||||
$visibility_class = array();
|
||||
|
||||
if ( ! isset( $value['hide_if_checked'] ) ) {
|
||||
|
@ -550,7 +557,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
'show_option_none' => ' ',
|
||||
'class' => $value['class'],
|
||||
'echo' => false,
|
||||
'selected' => absint( self::get_option( $value['id'], $value['default'] ) ),
|
||||
'selected' => absint( $value['value'] ),
|
||||
'post_status' => 'publish,private,draft',
|
||||
);
|
||||
|
||||
|
@ -572,7 +579,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
|
||||
// Single country selects.
|
||||
case 'single_select_country':
|
||||
$country_setting = (string) self::get_option( $value['id'], $value['default'] );
|
||||
$country_setting = (string) $value['value'];
|
||||
|
||||
if ( strstr( $country_setting, ':' ) ) {
|
||||
$country_setting = explode( ':', $country_setting );
|
||||
|
@ -597,7 +604,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
|
||||
// Country multiselects.
|
||||
case 'multi_select_countries':
|
||||
$selections = (array) self::get_option( $value['id'], $value['default'] );
|
||||
$selections = (array) $value['value'];
|
||||
|
||||
if ( ! empty( $value['options'] ) ) {
|
||||
$countries = $value['options'];
|
||||
|
@ -634,7 +641,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
'months' => __( 'Month(s)', 'woocommerce' ),
|
||||
'years' => __( 'Year(s)', 'woocommerce' ),
|
||||
);
|
||||
$option_value = wc_parse_relative_date_option( self::get_option( $value['id'], $value['default'] ) );
|
||||
$option_value = wc_parse_relative_date_option( $value['value'] );
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
|
@ -737,7 +744,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
|
||||
// Loop options and get values to save.
|
||||
foreach ( $options as $option ) {
|
||||
if ( ! isset( $option['id'] ) || ! isset( $option['type'] ) ) {
|
||||
if ( ! isset( $option['id'] ) || ! isset( $option['type'] ) || ( isset( $option['is_option'] ) && false === $option['is_option'] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -144,6 +144,17 @@ class WC_Admin_Setup_Wizard {
|
|||
return current_user_can( 'install_plugins' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Should we show the WooCommerce Admin install option?
|
||||
* True only if the user can install plugins,
|
||||
* and up until the end date of the recommendation.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function should_show_wc_admin() {
|
||||
return current_user_can( 'install_plugins' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Should we display the 'Recommended' step?
|
||||
* True if at least one of the recommendations will be displayed.
|
||||
|
@ -154,7 +165,8 @@ class WC_Admin_Setup_Wizard {
|
|||
return $this->should_show_theme()
|
||||
|| $this->should_show_automated_tax()
|
||||
|| $this->should_show_mailchimp()
|
||||
|| $this->should_show_facebook();
|
||||
|| $this->should_show_facebook()
|
||||
|| $this->should_show_wc_admin();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -917,6 +929,41 @@ class WC_Admin_Setup_Wizard {
|
|||
<p><?php echo wp_kses_post( $intro_text ); ?></p>
|
||||
<?php endif; ?>
|
||||
<form method="post">
|
||||
<?php if ( $is_wcs_labels_supported || $is_shipstation_supported ) : ?>
|
||||
<ul class="wc-setup-shipping-recommended">
|
||||
<?php
|
||||
if ( $is_wcs_labels_supported ) :
|
||||
$this->display_recommended_item(
|
||||
array(
|
||||
'type' => 'woocommerce_services',
|
||||
'title' => __( 'Did you know you can print shipping labels at home?', 'woocommerce' ),
|
||||
'description' => __( 'Use WooCommerce Shipping (powered by WooCommerce Services & Jetpack) to save time at the post office by printing your shipping labels at home.', 'woocommerce' ),
|
||||
'img_url' => WC()->plugin_url() . '/assets/images/obw-woocommerce-services-icon.png',
|
||||
'img_alt' => __( 'WooCommerce Services icon', 'woocommerce' ),
|
||||
'plugins' => $this->get_wcs_requisite_plugins(),
|
||||
)
|
||||
);
|
||||
elseif ( $is_shipstation_supported ) :
|
||||
$this->display_recommended_item(
|
||||
array(
|
||||
'type' => 'shipstation',
|
||||
'title' => __( 'Did you know you can print shipping labels at home?', 'woocommerce' ),
|
||||
'description' => __( 'We recommend using ShipStation to save time at the post office by printing your shipping labels at home. Try ShipStation free for 30 days.', 'woocommerce' ),
|
||||
'img_url' => WC()->plugin_url() . '/assets/images/obw-shipstation-icon.png',
|
||||
'img_alt' => __( 'ShipStation icon', 'woocommerce' ),
|
||||
'plugins' => array(
|
||||
array(
|
||||
'name' => __( 'ShipStation', 'woocommerce' ),
|
||||
'slug' => 'woocommerce-shipstation-integration',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
endif;
|
||||
?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( empty( $existing_zones ) ) : ?>
|
||||
<ul class="wc-wizard-services shipping">
|
||||
<li class="wc-wizard-service-item">
|
||||
|
@ -982,41 +1029,6 @@ class WC_Admin_Setup_Wizard {
|
|||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $is_wcs_labels_supported || $is_shipstation_supported ) : ?>
|
||||
<ul class="wc-setup-shipping-recommended">
|
||||
<?php
|
||||
if ( $is_wcs_labels_supported ) :
|
||||
$this->display_recommended_item(
|
||||
array(
|
||||
'type' => 'woocommerce_services',
|
||||
'title' => __( 'Print shipping labels at home', 'woocommerce' ),
|
||||
'description' => __( 'We recommend WooCommerce Services & Jetpack. These plugins will save you time at the Post Office by enabling you to print your shipping labels at home.', 'woocommerce' ),
|
||||
'img_url' => WC()->plugin_url() . '/assets/images/obw-woocommerce-services-icon.png',
|
||||
'img_alt' => __( 'WooCommerce Services icon', 'woocommerce' ),
|
||||
'plugins' => $this->get_wcs_requisite_plugins(),
|
||||
)
|
||||
);
|
||||
elseif ( $is_shipstation_supported ) :
|
||||
$this->display_recommended_item(
|
||||
array(
|
||||
'type' => 'shipstation',
|
||||
'title' => __( 'Print shipping labels at home', 'woocommerce' ),
|
||||
'description' => __( 'We recommend using ShipStation to save time at the Post Office by printing your shipping labels at home. Try ShipStation free for 30 days.', 'woocommerce' ),
|
||||
'img_url' => WC()->plugin_url() . '/assets/images/obw-shipstation-icon.png',
|
||||
'img_alt' => __( 'ShipStation icon', 'woocommerce' ),
|
||||
'plugins' => array(
|
||||
array(
|
||||
'name' => __( 'ShipStation', 'woocommerce' ),
|
||||
'slug' => 'woocommerce-shipstation-integration',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<div class="wc-setup-shipping-units">
|
||||
<p>
|
||||
<?php
|
||||
|
@ -1860,7 +1872,7 @@ class WC_Admin_Setup_Wizard {
|
|||
?>
|
||||
<h1><?php esc_html_e( 'Recommended for All WooCommerce Stores', 'woocommerce' ); ?></h1>
|
||||
<p>
|
||||
<?php esc_html_e( 'Enhance your store with these recommended features.', 'woocommerce' ); ?>
|
||||
<?php esc_html_e( 'Enhance your store with these recommended free features.', 'woocommerce' ); ?>
|
||||
</p>
|
||||
<form method="post">
|
||||
<ul class="recommended-step">
|
||||
|
@ -1891,6 +1903,17 @@ class WC_Admin_Setup_Wizard {
|
|||
) );
|
||||
endif;
|
||||
|
||||
if ( $this->should_show_wc_admin() ) :
|
||||
$this->display_recommended_item( array(
|
||||
'type' => 'wc_admin',
|
||||
'title' => __( 'WooCommerce Admin', 'woocommerce' ),
|
||||
'description' => __( 'Manage your store\'s reports and monitor key metrics with a new and improved interface and dashboard.', 'woocommerce' ),
|
||||
'img_url' => WC()->plugin_url() . '/assets/images/obw-woocommerce-admin-icon.svg',
|
||||
'img_alt' => __( 'WooCommerce Admin icon', 'woocommerce' ),
|
||||
'plugins' => array( array( 'name' => __( 'WooCommerce Admin', 'woocommerce' ), 'slug' => 'woocommerce-admin' ) ),
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( $this->should_show_mailchimp() ) :
|
||||
$this->display_recommended_item( array(
|
||||
'type' => 'mailchimp',
|
||||
|
@ -1933,6 +1956,7 @@ class WC_Admin_Setup_Wizard {
|
|||
$setup_automated_tax = isset( $_POST['setup_automated_taxes'] ) && 'yes' === $_POST['setup_automated_taxes'];
|
||||
$setup_mailchimp = isset( $_POST['setup_mailchimp'] ) && 'yes' === $_POST['setup_mailchimp'];
|
||||
$setup_facebook = isset( $_POST['setup_facebook'] ) && 'yes' === $_POST['setup_facebook'];
|
||||
$setup_wc_admin = isset( $_POST['setup_wc_admin'] ) && 'yes' === $_POST['setup_wc_admin'];
|
||||
|
||||
update_option( 'woocommerce_calc_taxes', $setup_automated_tax ? 'yes' : 'no' );
|
||||
update_option( 'woocommerce_setup_automated_taxes', $setup_automated_tax );
|
||||
|
@ -1969,6 +1993,16 @@ class WC_Admin_Setup_Wizard {
|
|||
);
|
||||
}
|
||||
|
||||
if ( $setup_wc_admin ) {
|
||||
$this->install_plugin(
|
||||
'woocommerce-admin',
|
||||
array(
|
||||
'name' => __( 'WooCommerce Admin', 'woocommerce' ),
|
||||
'repo-slug' => 'woocommerce-admin',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
wp_redirect( esc_url_raw( $this->get_next_step_link() ) );
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -157,6 +157,9 @@ class WC_Product_CSV_Importer_Controller {
|
|||
$this->map_preferences = isset( $_REQUEST['map_preferences'] ) ? (bool) $_REQUEST['map_preferences'] : false;
|
||||
// phpcs:enable
|
||||
|
||||
// Import mappings for CSV data.
|
||||
include_once dirname( __FILE__ ) . '/mappings/mappings.php';
|
||||
|
||||
if ( $this->map_preferences ) {
|
||||
add_filter( 'woocommerce_csv_product_import_mapped_columns', array( $this, 'auto_map_user_preferences' ), 9999 );
|
||||
}
|
||||
|
@ -488,8 +491,6 @@ class WC_Product_CSV_Importer_Controller {
|
|||
$weight_unit = get_option( 'woocommerce_weight_unit' );
|
||||
$dimension_unit = get_option( 'woocommerce_dimension_unit' );
|
||||
|
||||
include dirname( __FILE__ ) . '/mappings/mappings.php';
|
||||
|
||||
/*
|
||||
* @hooked wc_importer_generic_mappings - 10
|
||||
* @hooked wc_importer_wordpress_mappings - 10
|
||||
|
@ -542,7 +543,8 @@ class WC_Product_CSV_Importer_Controller {
|
|||
__( 'External URL', 'woocommerce' ) => 'product_url',
|
||||
__( 'Button text', 'woocommerce' ) => 'button_text',
|
||||
__( 'Position', 'woocommerce' ) => 'menu_order',
|
||||
)
|
||||
),
|
||||
$raw_headers
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -567,7 +569,8 @@ class WC_Product_CSV_Importer_Controller {
|
|||
__( 'Download %d URL', 'woocommerce' ) => 'downloads:url',
|
||||
/* translators: %d: Meta number */
|
||||
__( 'Meta: %s', 'woocommerce' ) => 'meta:',
|
||||
)
|
||||
),
|
||||
$raw_headers
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -697,7 +700,8 @@ class WC_Product_CSV_Importer_Controller {
|
|||
),
|
||||
),
|
||||
'category_ids' => __( 'Categories', 'woocommerce' ),
|
||||
'tag_ids' => __( 'Tags', 'woocommerce' ),
|
||||
'tag_ids' => __( 'Tags (comma separated)', 'woocommerce' ),
|
||||
'tag_ids_spaces' => __( 'Tags (space separated)', 'woocommerce' ),
|
||||
'shipping_class_id' => __( 'Shipping class', 'woocommerce' ),
|
||||
'images' => __( 'Images', 'woocommerce' ),
|
||||
'parent_id' => __( 'Parent', 'woocommerce' ),
|
||||
|
@ -732,7 +736,7 @@ class WC_Product_CSV_Importer_Controller {
|
|||
),
|
||||
'reviews_allowed' => __( 'Allow customer reviews?', 'woocommerce' ),
|
||||
'purchase_note' => __( 'Purchase note', 'woocommerce' ),
|
||||
'meta:' . $meta => __( 'Import as meta', 'woocommerce' ),
|
||||
'meta:' . $meta => __( 'Import as meta data', 'woocommerce' ),
|
||||
'menu_order' => __( 'Position', 'woocommerce' ),
|
||||
);
|
||||
|
||||
|
|
|
@ -11,4 +11,5 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
require dirname( __FILE__ ) . '/default.php';
|
||||
require dirname( __FILE__ ) . '/generic.php';
|
||||
require dirname( __FILE__ ) . '/shopify.php';
|
||||
require dirname( __FILE__ ) . '/wordpress.php';
|
||||
|
|
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
/**
|
||||
* Shopify mappings
|
||||
*
|
||||
* @package WooCommerce\Admin\Importers
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Shopify mappings.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @param array $mappings Importer columns mappings.
|
||||
* @param array $raw_headers Raw headers from CSV being imported.
|
||||
* @return array
|
||||
*/
|
||||
function wc_importer_shopify_mappings( $mappings, $raw_headers ) {
|
||||
// Only map if this is looks like a Shopify export.
|
||||
if ( 0 !== count( array_diff( array( 'Title', 'Body (HTML)', 'Type', 'Variant SKU' ), $raw_headers ) ) ) {
|
||||
return $mappings;
|
||||
}
|
||||
$shopify_mappings = array(
|
||||
'Variant SKU' => 'sku',
|
||||
'Title' => 'name',
|
||||
'Body (HTML)' => 'description',
|
||||
'Quantity' => 'stock_quantity',
|
||||
'Variant Inventory Qty' => 'stock_quantity',
|
||||
'Image Src' => 'images',
|
||||
'Variant Image' => 'images',
|
||||
'Variant SKU' => 'sku',
|
||||
'Variant Price' => 'sale_price',
|
||||
'Variant Compare At Price' => 'regular_price',
|
||||
'Type' => 'category_ids',
|
||||
'Tags' => 'tag_ids_spaces',
|
||||
'Variant Grams' => 'weight',
|
||||
'Variant Requires Shipping' => 'meta:shopify_requires_shipping',
|
||||
'Variant Taxable' => 'tax_status',
|
||||
);
|
||||
return array_merge( $mappings, $shopify_mappings );
|
||||
}
|
||||
add_filter( 'woocommerce_csv_product_import_mapping_default_columns', 'wc_importer_shopify_mappings', 10, 2 );
|
||||
|
||||
/**
|
||||
* Add special wildcard Shopify mappings.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @param array $mappings Importer columns mappings.
|
||||
* @param array $raw_headers Raw headers from CSV being imported.
|
||||
* @return array
|
||||
*/
|
||||
function wc_importer_shopify_special_mappings( $mappings, $raw_headers ) {
|
||||
// Only map if this is looks like a Shopify export.
|
||||
if ( 0 !== count( array_diff( array( 'Title', 'Body (HTML)', 'Type', 'Variant SKU' ), $raw_headers ) ) ) {
|
||||
return $mappings;
|
||||
}
|
||||
$shopify_mappings = array(
|
||||
'Option%d Name' => 'attributes:name',
|
||||
'Option%d Value' => 'attributes:value',
|
||||
);
|
||||
return array_merge( $mappings, $shopify_mappings );
|
||||
}
|
||||
add_filter( 'woocommerce_csv_product_import_mapping_special_columns', 'wc_importer_shopify_special_mappings', 10, 2 );
|
||||
|
||||
/**
|
||||
* Expand special Shopify columns to WC format.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @param array $data Array of data.
|
||||
* @return array Expanded data.
|
||||
*/
|
||||
function wc_importer_shopify_expand_data( $data ) {
|
||||
if ( isset( $data['meta:shopify_requires_shipping'] ) ) {
|
||||
$requires_shipping = wc_string_to_bool( $data['meta:shopify_requires_shipping'] );
|
||||
|
||||
if ( ! $requires_shipping ) {
|
||||
if ( isset( $data['type'] ) ) {
|
||||
$data['type'][] = 'virtual';
|
||||
} else {
|
||||
$data['type'] = array( 'virtual' );
|
||||
}
|
||||
}
|
||||
|
||||
unset( $data['meta:shopify_requires_shipping'] );
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
add_filter( 'woocommerce_product_importer_pre_expand_data', 'wc_importer_shopify_expand_data' );
|
|
@ -7,6 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<h3>
|
||||
<a href="#" class="remove_row delete"><?php esc_html_e( 'Remove', 'woocommerce' ); ?></a>
|
||||
<div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'woocommerce' ); ?>"></div>
|
||||
<div class="tips sort" data-tip="<?php esc_attr_e( 'Drag and drop to set admin attribute order', 'woocommerce' ); ?>"></div>
|
||||
<strong class="attribute_name"><?php echo wc_attribute_label( $attribute->get_name() ); ?></strong>
|
||||
</h3>
|
||||
<div class="woocommerce_attribute_data wc-metabox-content hidden">
|
||||
|
|
|
@ -108,12 +108,17 @@ class WC_Settings_Tax extends WC_Settings_Page {
|
|||
* Save settings.
|
||||
*/
|
||||
public function save() {
|
||||
// phpcs:disable WordPress.Security.NonceVerification.NoNonceVerification
|
||||
global $current_section;
|
||||
|
||||
if ( ! $current_section ) {
|
||||
$settings = $this->get_settings();
|
||||
WC_Admin_Settings::save_fields( $settings );
|
||||
|
||||
if ( isset( $_POST['woocommerce_tax_classes'] ) ) {
|
||||
$this->save_tax_classes( wp_unslash( $_POST['woocommerce_tax_classes'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
||||
}
|
||||
|
||||
} elseif ( ! empty( $_POST['tax_rate_country'] ) ) {
|
||||
$this->save_tax_rates();
|
||||
}
|
||||
|
@ -125,6 +130,30 @@ class WC_Settings_Tax extends WC_Settings_Page {
|
|||
// Invalidate caches.
|
||||
WC_Cache_Helper::incr_cache_prefix( 'taxes' );
|
||||
WC_Cache_Helper::get_transient_version( 'shipping', true );
|
||||
// phpcs:enable WordPress.Security.NonceVerification.NoNonceVerification
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves tax classes defined in the textarea to the tax class table instead of an option.
|
||||
*
|
||||
* @param string $raw_tax_classes Posted value.
|
||||
* @return null
|
||||
*/
|
||||
public function save_tax_classes( $raw_tax_classes ) {
|
||||
$tax_classes = array_filter( array_map( 'trim', explode( "\n", $raw_tax_classes ) ) );
|
||||
$existing_tax_classes = WC_Tax::get_tax_classes();
|
||||
$removed = array_diff( $existing_tax_classes, $tax_classes );
|
||||
$added = array_diff( $tax_classes, $existing_tax_classes );
|
||||
|
||||
foreach ( $removed as $name ) {
|
||||
WC_Tax::delete_tax_class_by( 'name', $name );
|
||||
}
|
||||
|
||||
foreach ( $added as $name ) {
|
||||
WC_Tax::create_tax_class( $name );
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -63,13 +63,14 @@ $settings = array(
|
|||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Additional tax classes', 'woocommerce' ),
|
||||
'desc_tip' => __( 'List additional tax classes below (1 per line). This is in addition to the default "Standard rate".', 'woocommerce' ),
|
||||
'id' => 'woocommerce_tax_classes',
|
||||
'css' => 'width:100%; height: 65px;',
|
||||
'type' => 'textarea',
|
||||
/* Translators: %s New line char. */
|
||||
'default' => sprintf( __( 'Reduced rate%sZero rate', 'woocommerce' ), PHP_EOL ),
|
||||
'title' => __( 'Additional tax classes', 'woocommerce' ),
|
||||
'desc_tip' => __( 'List additional tax classes you need below (1 per line, e.g. Reduced Rates). These are in addition to "Standard rate" which exists by default.', 'woocommerce' ),
|
||||
'id' => 'woocommerce_tax_classes',
|
||||
'css' => 'height: 65px;',
|
||||
'type' => 'textarea',
|
||||
'default' => '',
|
||||
'is_option' => false,
|
||||
'value' => implode( "\n", WC_Tax::get_tax_classes() ),
|
||||
),
|
||||
|
||||
array(
|
||||
|
|
|
@ -900,7 +900,7 @@ class WC_AJAX {
|
|||
}
|
||||
|
||||
$item_id = $order->add_product( $product, $qty );
|
||||
$item = apply_filters( 'woocommerce_ajax_order_item', $order->get_item( $item_id ), $item_id );
|
||||
$item = apply_filters( 'woocommerce_ajax_order_item', $order->get_item( $item_id ), $item_id, $order, $product );
|
||||
$added_items[ $item_id ] = $item;
|
||||
$order_notes[ $item_id ] = $product->get_formatted_name();
|
||||
|
||||
|
|
|
@ -464,7 +464,7 @@ final class WC_Cart_Totals {
|
|||
$new_taxes = WC_Tax::calc_tax( $item->price - array_sum( $taxes ), $item->tax_rates, false );
|
||||
|
||||
// Now we have a new item price.
|
||||
$item->price = round( $item->price - array_sum( $taxes ) + array_sum( $new_taxes ) );
|
||||
$item->price = $item->price - array_sum( $taxes ) + array_sum( $new_taxes );
|
||||
}
|
||||
}
|
||||
return $item;
|
||||
|
@ -591,7 +591,6 @@ final class WC_Cart_Totals {
|
|||
$taxes[ $rate_id ] += $this->round_line_tax( $rate );
|
||||
}
|
||||
}
|
||||
$taxes = $this->round_merged_taxes( $taxes );
|
||||
|
||||
return $in_cents ? $taxes : wc_remove_number_precision_deep( $taxes );
|
||||
}
|
||||
|
@ -682,7 +681,13 @@ final class WC_Cart_Totals {
|
|||
$this->cart->cart_contents[ $item_key ]['line_tax'] = wc_remove_number_precision( $item->total_tax );
|
||||
}
|
||||
|
||||
$this->set_total( 'items_total', array_sum( array_map( 'round', array_values( wp_list_pluck( $this->items, 'total' ) ) ) ) );
|
||||
$items_total = array_sum(
|
||||
array_map(
|
||||
array( $this, 'round_item_subtotal' ),
|
||||
array_values( wp_list_pluck( $this->items, 'total' ) )
|
||||
)
|
||||
);
|
||||
$this->set_total( 'items_total', round( $items_total ) );
|
||||
$this->set_total( 'items_total_tax', array_sum( array_values( wp_list_pluck( $this->items, 'total_tax' ) ) ) );
|
||||
|
||||
$this->cart->set_cart_contents_total( $this->get_total( 'items_total' ) );
|
||||
|
@ -740,8 +745,14 @@ final class WC_Cart_Totals {
|
|||
$this->cart->cart_contents[ $item_key ]['line_subtotal_tax'] = wc_remove_number_precision( $item->subtotal_tax );
|
||||
}
|
||||
|
||||
$this->set_total( 'items_subtotal', array_sum( array_map( 'round', array_values( wp_list_pluck( $this->items, 'subtotal' ) ) ) ) );
|
||||
$this->set_total( 'items_subtotal_tax', array_sum( $this->round_merged_taxes( $merged_subtotal_taxes ) ) );
|
||||
$items_subtotal = array_sum(
|
||||
array_map(
|
||||
array( $this, 'round_item_subtotal' ),
|
||||
array_values( wp_list_pluck( $this->items, 'subtotal' ) )
|
||||
)
|
||||
);
|
||||
$this->set_total( 'items_subtotal', round( $items_subtotal ) );
|
||||
$this->set_total( 'items_subtotal_tax', wc_round_tax_total( array_sum( $merged_subtotal_taxes ), 0 ) );
|
||||
|
||||
$this->cart->set_subtotal( $this->get_total( 'items_subtotal' ) );
|
||||
$this->cart->set_subtotal_tax( $this->get_total( 'items_subtotal_tax' ) );
|
||||
|
@ -876,4 +887,18 @@ final class WC_Cart_Totals {
|
|||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply rounding to item subtotal before summing.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @param float $value Item subtotal value.
|
||||
* @return float
|
||||
*/
|
||||
protected function round_item_subtotal( $value ) {
|
||||
if ( ! $this->round_at_subtotal() ) {
|
||||
$value = round( $value );
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -332,32 +332,6 @@ WHERE permission_id = %d",
|
|||
$download_log->save();
|
||||
}
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CRUD methods
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Save data to the database.
|
||||
*
|
||||
* @since 3.0.0
|
||||
* @return int Item ID
|
||||
*/
|
||||
public function save() {
|
||||
if ( $this->data_store ) {
|
||||
// Trigger action before saving to the DB. Use a pointer to adjust object props before save.
|
||||
do_action( 'woocommerce_before_' . $this->object_type . '_object_save', $this, $this->data_store );
|
||||
|
||||
if ( $this->get_id() ) {
|
||||
$this->data_store->update( $this );
|
||||
} else {
|
||||
$this->data_store->create( $this );
|
||||
}
|
||||
}
|
||||
return $this->get_id();
|
||||
}
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| ArrayAccess/Backwards compatibility.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue