Merge branch 'master' into update/22895
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
name: "\U0001F46E♂️Security issue"
|
||||
about: Please report security issues *only* via https://www.hackerone.com
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
For security reasons, please report all security issues via https://hackerone.com/automattic/. Also, if the issue is valid, a bug bounty will be paid out to you.
|
||||
|
||||
Please disclose responsibly and not via GitHub (which allows for exploiting issues in the wild before the patch is released).
|
|
@ -1,34 +1,37 @@
|
|||
---
|
||||
name: "\U0001F41E Bug report"
|
||||
about: Report a bug if something isn't working as expected in the core WooCommerce
|
||||
plugin.
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is. Please be as descriptive as possible; issues lacking detail, or for any other reason than to report a bug, may be closed without action.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Isolating the problem (mark completed items with an [x]):**
|
||||
- [ ] I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
|
||||
- [ ] This bug happens with a default WordPress theme active, or [Storefront](https://woocommerce.com/storefront/).
|
||||
- [ ] I can reproduce this bug consistently using the steps above.
|
||||
|
||||
**WordPress Environment**
|
||||
<details>
|
||||
```
|
||||
Copy and paste the system status report from **WooCommerce > System Status** in WordPress admin.
|
||||
```
|
||||
</details>
|
||||
---
|
||||
name: "\U0001F41E Bug report"
|
||||
about: Report a bug if something isn't working as expected in the core WooCommerce
|
||||
plugin.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is. Please be as descriptive as possible; issues lacking detail, or for any other reason than to report a bug, may be closed without action.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Isolating the problem (mark completed items with an [x]):**
|
||||
- [ ] I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
|
||||
- [ ] This bug happens with a default WordPress theme active, or [Storefront](https://woocommerce.com/storefront/).
|
||||
- [ ] I can reproduce this bug consistently using the steps above.
|
||||
|
||||
**WordPress Environment**
|
||||
<details>
|
||||
```
|
||||
Copy and paste the system status report from **WooCommerce > System Status** in WordPress admin.
|
||||
```
|
||||
</details>
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
---
|
||||
name: "✨ New Enhancement"
|
||||
about: "If you have an idea to improve an existing feature in core or need something for development (such as a new hook) please let us know or submit a Pull Request!"
|
||||
about: If you have an idea to improve an existing feature in core or need something
|
||||
for development (such as a new hook) please let us know or submit a Pull Request!
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
---
|
||||
name: "\U0001F680 Feature request"
|
||||
about: "Suggest a new feature \U0001F389 We'll consider building it if it receives sufficient interest! \U0001F44D"
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
---
|
||||
name: "\U0001F680 Feature request"
|
||||
about: "Suggest a new feature \U0001F389 We'll consider building it if it receives
|
||||
sufficient interest! \U0001F44D"
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
|
|
|
@ -1,22 +1,25 @@
|
|||
---
|
||||
name: "❓ Support Question"
|
||||
about: "If you have a question \U0001F4AC please see our docs or use our forums, helpdesk,
|
||||
or Slack Community!"
|
||||
|
||||
---
|
||||
|
||||
We don't offer technical support on GitHub so we recommend using the following:
|
||||
|
||||
**Reading our documentation**
|
||||
Usage docs can be found here: https://docs.woocommerce.com/
|
||||
|
||||
If you have a problem, you may want to start with the self help guide here: https://docs.woocommerce.com/document/woocommerce-self-service-guide/
|
||||
|
||||
**Technical support for premium extensions or if you're a WooCommerce.com customer**
|
||||
from a human being - submit a ticket via the helpdesk
|
||||
https://woocommerce.com/contact-us/
|
||||
|
||||
**General usage and development questions**
|
||||
- WooCommerce Slack Community: https://woocommerce.com/community-slack/
|
||||
- WordPress.org Forums: https://wordpress.org/support/plugin/woocommerce
|
||||
- The WooCommerce Help and Share Facebook group
|
||||
---
|
||||
name: "❓ Support Question"
|
||||
about: "If you have a question \U0001F4AC please see our docs or use our forums, helpdesk,
|
||||
or Slack Community!"
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
We don't offer technical support on GitHub so we recommend using the following:
|
||||
|
||||
**Reading our documentation**
|
||||
Usage docs can be found here: https://docs.woocommerce.com/
|
||||
|
||||
If you have a problem, you may want to start with the self help guide here: https://docs.woocommerce.com/document/woocommerce-self-service-guide/
|
||||
|
||||
**Technical support for premium extensions or if you're a WooCommerce.com customer**
|
||||
from a human being - submit a ticket via the helpdesk
|
||||
https://woocommerce.com/contact-us/
|
||||
|
||||
**General usage and development questions**
|
||||
- WooCommerce Slack Community: https://woocommerce.com/community-slack/
|
||||
- WordPress.org Forums: https://wordpress.org/support/plugin/woocommerce
|
||||
- The WooCommerce Help and Share Facebook group
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
### Changes proposed in this Pull Request:
|
||||
|
||||
<!-- Describe the changes made to this Pull Request, and the reason for such changes. -->
|
||||
<!-- Describe the changes made to this Pull Request and the reason for such changes. -->
|
||||
|
||||
Closes # .
|
||||
|
||||
|
@ -24,10 +24,10 @@ Closes # .
|
|||
|
||||
* [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
|
||||
* [ ] Have you written new tests for your changes, as applicable?
|
||||
* [ ] Have you successfully ran tests with your changes locally?
|
||||
* [ ] Have you successfully run tests with your changes locally?
|
||||
|
||||
<!-- Mark completed items with an [x] -->
|
||||
|
||||
### Changelog entry
|
||||
|
||||
> Enter a short summary of all changes on this Pull Request. This will appear in the changelog if accepted.
|
||||
> Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
"trailing": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"multistr": true,
|
||||
|
||||
"browser": true,
|
||||
|
||||
|
|
39
.travis.yml
|
@ -1,13 +1,13 @@
|
|||
language: php
|
||||
|
||||
addons:
|
||||
chrome: stable
|
||||
apt:
|
||||
packages:
|
||||
- nginx
|
||||
dist: trusty
|
||||
|
||||
sudo: false
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- vendor
|
||||
- $HOME/.composer/cache
|
||||
|
||||
# Test main supported versions of PHP against latest WP.
|
||||
php:
|
||||
- 5.6
|
||||
|
@ -34,17 +34,23 @@ matrix:
|
|||
- name: "e2e tests"
|
||||
php: 7.2
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_E2E=1
|
||||
addons:
|
||||
chrome: stable
|
||||
apt:
|
||||
packages:
|
||||
- nginx
|
||||
- name: "Unit tests code coverage"
|
||||
php: 7.1
|
||||
php: 7.3
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
|
||||
- name: "WooCommerce unit tests using WordPress nightly"
|
||||
php: 7.3
|
||||
env: WP_VERSION=nightly WP_MULTISITE=0
|
||||
allow_failures:
|
||||
- php: 7.1
|
||||
- php: 7.3
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
|
||||
|
||||
before_script:
|
||||
- export PATH="$HOME/.composer/vendor/bin:$PATH"
|
||||
- |
|
||||
# Remove Xdebug for a huge performance increase:
|
||||
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
|
||||
|
@ -52,9 +58,20 @@ before_script:
|
|||
else
|
||||
echo "xdebug.ini does not exist"
|
||||
fi
|
||||
- export PATH="$HOME/.config/composer/vendor/bin:$PATH"
|
||||
- bash tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION
|
||||
- bash tests/bin/travis.sh before
|
||||
- |
|
||||
# Install WP Test suite, install PHPUnit globally if needed:
|
||||
if [[ ! -z "$WP_VERSION" ]]; then
|
||||
bash tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION
|
||||
# PHP 5.2 does not have composer, do not try to run it.
|
||||
if [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
|
||||
composer global require "phpunit/phpunit=4.8.*|6.5.*"
|
||||
fi
|
||||
fi
|
||||
- |
|
||||
# Install wpcs globally if needed:
|
||||
if [[ ${RUN_PHPCS} == 1 ]] && [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
|
||||
composer require woocommerce/woocommerce-sniffs
|
||||
fi
|
||||
|
||||
script:
|
||||
- bash tests/bin/phpunit.sh
|
||||
|
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 236 KiB |
Before Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 332 KiB |
Before Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 255 KiB |
Before Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 242 KiB |
Before Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 368 KiB |
Before Width: | Height: | Size: 152 KiB |
After Width: | Height: | Size: 324 KiB |
Before Width: | Height: | Size: 148 KiB |
305
CHANGELOG.txt
|
@ -1,5 +1,310 @@
|
|||
== Changelog ==
|
||||
|
||||
= 3.6.3 - 2019-05-16 =
|
||||
* Fix - State not required for Serbia. #23430
|
||||
* Fix - # symbol in product category name broke product export. #23454
|
||||
* Fix - XML export caused fatal errors due to Action Scheduler adding invalid characters. #23456
|
||||
* Fix - Invalid password messages when password contains backslashes. #23499
|
||||
* Fix - Dismiss button in WC admin notices "legacy_shipping" and "no_shipping_methods" were not clickable. #23517
|
||||
* Fix - WC $wpdb->tables not defined early enough. #23529
|
||||
* Fix - Tracks JS not printed on last page of OBW. #23519
|
||||
* Fix - Error in the logic used to build fields for external products when the query string contained full-stops, pluses or spaces in the values of the parameters. #23535
|
||||
* Fix - UI page width issue on OBW. #23526
|
||||
* Fix - Customer address not auto populated on checkout after registering and filling in address prior. #23528
|
||||
* Fix - Available WooCommerce extension updates not showing in System Status report. #23601
|
||||
* Fix - wc_change_get_terms_defaults throwing undefined index notices. #23611
|
||||
* Fix - System Status report alway showing checkmark next to Connected to WooCommerce.com. #23617
|
||||
* Fix - State field never populated when loading customer address on order via wp-admin. #23615
|
||||
* Fix - Order sorting not working in wp-admin when Yoast SEO active. #23590
|
||||
* Fix - Attribute ordering not working in product edit screen. #23625
|
||||
* Fix - Tracks reporting incorrect order totals due to refunds being excluded in calculation. #23671
|
||||
* Fix - Reload state options when creating a new order in WP-Admin and changing country. #23602
|
||||
* Fix - New webhooks not showing in the webhook admin list page when you have object caching enabled. #23713
|
||||
* Fix - Missing coupon expiry dates, restore coupons expiry_date backward compatibility. #23714
|
||||
* Fix - Bulk stock update could result in all products set to out of stock, change ensures consistency between db and Product instance in memory. #23534
|
||||
* Fix - Dashboard stats widget including unpublished products in out of stock and low in stock counts. #23734
|
||||
* Fix - PayPal payment not captured when you transition an order from a custom order status to completed or processing. #23634
|
||||
* Tweak - Confirm before saving empty list of countries to sell to in settings. #23597
|
||||
* Tweak - Change default WC API version used when creating webhooks to the latest WC API version. #23515
|
||||
* Tweak - Report a bug button now points to the new issue template in GitHub. #23580
|
||||
* Tweak - Do not display taxes in totals columns when taxes not enabled. #23579
|
||||
* Tweak - WC WP-CLI upgrade routine mimics wp-admin upgrade when no updates found by setting DB version to current version. #23666
|
||||
* Tweak - Template caching now cache based on WC_VERSION to avoid issues with symlinked plugin folders. #23546
|
||||
* Tweak - OBW payment gateway selection defaults. #23690
|
||||
* Localization - Add Serbia locale defaults. #23428
|
||||
* Localization - Add address format for Serbia. #23429
|
||||
|
||||
= 3.6.2 - 2019-04-24 =
|
||||
* Fix - Fix CSS classname conflict with themes due to missing product object global. #23377
|
||||
* Fix - Fix security check on email template preview page. #23356
|
||||
* Fix - Prevent `wc_ascii_uasort_comparison` throwing notices in some server configs. #23363
|
||||
* Fix - `is_request_to_rest_api` should check for wc endpoints only. #23372
|
||||
* Fix - Fixed use of get_term_meta in REST API endpoints. #23457
|
||||
* Fix - Fixed missing closing tag for log-in link for reviews. #23445
|
||||
* Fix - Fixed average_rating in the db upgrade routine for lookup table. #23465
|
||||
* Fix - More useful update notices if cron is disabled. #23383
|
||||
* Fix - Prevent term ordering queries inserted by wc_terms_clauses from conflicting with custom where clauses. #23449
|
||||
* Fix - When product lookup table is generating for the first time, avoid wrong stock statuses being set for variable products. #23455
|
||||
* Fix - Ensure webhooks respect registered order args. #23444
|
||||
* Fix - REST API - Return custom attribute with defined name instead of lowercase name. #23482
|
||||
* Fix - Fix 3.6 conflict with Woo Blocks plugin 1.4. #23399
|
||||
* Fix - Allow default sorting of WC taxonomies to be overwritten by get_terms orderby. #23477
|
||||
* Fix - Improve wc_rating_count lookup table generation with large numbers of posts. #23486
|
||||
* Fix - Avoid recurring event for suggestions updates. #23484
|
||||
* Fix - Revert selectWoo escaping change and instead escape user names. Avoids issues displaying slash characters. #23334
|
||||
* Fix - If an empty array is passed to the v3 API for images, images should be unset. #23339
|
||||
* Fix - Fix attribute renaming when dealing with unicode characters. #23132
|
||||
* Fix - Preserve full-stops in external product URLs. #23196
|
||||
* Fix - Add check for VAT exemption inside `display_prices_including_tax`. #23201
|
||||
* Fix - Avoid post update in `wc_update_product_stock` to prevent product titles being updated. #23249
|
||||
* Fix - Updated Back to Items link when editing attribute terms. #23238
|
||||
* Fix - Network orders widget not showing orders when installed as a network plugin. #23270
|
||||
* Fix - Correctly map attributes in CSV when the number is not at the end of the cell. #23251
|
||||
* Fix - Fixed highlighting of Orders list item in My Account when looking at individual order. #23236
|
||||
* Fix - Applies `wp_strip_all_tags` to the line item name when building PayPal request URL. #23297
|
||||
* Fix - Non int value handling in `wc_let_to_num`. #23329
|
||||
* Fix - Style span.description elements after select2 boxes. #23252
|
||||
* Fix - Switch to subquery for sale products to prevent large query errors on some hosting environments. #23266
|
||||
* Fix - Add offerCount to variable product structured data. #23349
|
||||
* Fix - Cart widget - Allow title to be removed. #23370
|
||||
* Fix - Prevent order data being escaped incorrectly on save when using quotes. #23380
|
||||
* Fix - Prevent plugins causing notices by calling get_catalog_ordering_args incorrectly. #23451
|
||||
* Fix - Product list view shipping class filter display correct products. #23446
|
||||
* Fix - Twenty Seventeen On Sale badge hidden behind product image. #23450
|
||||
* Fix - Correct postcode validation on my-account page. #23483
|
||||
* Fix - Fixed compatibility with the Jetpack Beta Tester plugin when loading the Tracks client library. #23397
|
||||
* Fix - Updated anchor for "How to create a child theme" with the correct target address in the Codex. #23469
|
||||
* Tweak - Update action scheduler to version 2.2.5. #23489
|
||||
* Tweak - Removed 2 old admin notices for featured moved in past versions. #23263
|
||||
* Localization - Make the state/county field optional at checkout for Greece. #23365
|
||||
|
||||
= 3.6.1 - 2019-04-18 =
|
||||
* Fix - Remove calls to 'header_register_callback' to prevent conflicts with some hosting providers and PHP versions.
|
||||
|
||||
= 3.6.0 - 2019-04-17 =
|
||||
* Enhancement - Merged WooCommerce Gutenberg Products Block feature plugin. Adds blocks for the new editor, including
|
||||
hand picked products, featured products, products by category/attribute, sale products, new products, top rated
|
||||
products, and best selling products. #22954
|
||||
* Enhancement - Only include order erasure bulk action if erasure is enabled in settings. #22354
|
||||
* Enhancement - Customer notes containing URLs now automatically converts to clickable links. #21927
|
||||
* Enhancement - Add increase and decrease stock options to bulk edit form. #22475
|
||||
* Enhancement - Allow states in zones to be searched by country name. #22339
|
||||
* Enhancement - Added registration success notices to account pages. #22650
|
||||
* Enhancement - Store notice is visible again if the notice text is changed. #22645
|
||||
* Enhancement - Add aria-label attribute to shop orderby selector to improve accessibility. #22683
|
||||
* Enhancement - When adding, editing, and deleting items manually from orders, the corresponding product stock will be
|
||||
updated to reflect the event and an order note will log the event. #22329
|
||||
* Enhancement - Added suggestions for official extensions to Products, Edit Product and Orders screens.
|
||||
* Enhancement - Store attribute values as post_excerpt for variations to support easier searching for variations. #22083
|
||||
* Enhancement - Improved username generation and introduced wc_create_new_customer_username function. #23145
|
||||
* Enhancement - Allow opting out of Marketplace Suggestions 23218
|
||||
* Tweak - Generalize shipping estimate text on cart page. #22467
|
||||
* Tweak - Include auto draft orders in order list filters. #22380
|
||||
* Tweak - Only include the network orders widget on the main site dashboard. #22318
|
||||
* Tweak - Only show available shipping continents when selecting shipping zone region. #22131
|
||||
* Tweak - Use Shortcode block on default WooCommerce pages. #21817
|
||||
* Tweak - Show full category hierarchy in product URLs when term IDs are not sequential. #22526
|
||||
* Tweak - Make sure account and checkout endpoints only work under account and checkout pages. #22631
|
||||
* Tweak - Show loading graphic when order form is submitted. #22664
|
||||
* Tweak - Add alt text to gallery images #22863
|
||||
* Tweak - Improved `display_name` generation during checkout. #22786
|
||||
* Tweak - Send correct calling code and phone number to PayPal standard when using non-US addresses. #22693
|
||||
* Tweak - Added tooltip to refund-amount input box and made it readonly when taxes are enabled. #22820
|
||||
* Tweak - Remove admin alert for the WooCommerce Gutenberg Products Block feature plugin. #22982
|
||||
* Tweak - Setup Wizard: support keyboard navigation to toggle on/off features. #22936
|
||||
* Tweak - Set reply-to address for all emails. #22979
|
||||
* Tweak - Setup wizard redirection improvements. #22977
|
||||
* Tweak - Simplify display of discount amounts within orders. #22949
|
||||
* Tewak - Remove Marketplace Suggestions from product listing page. #23211
|
||||
* Template - Moved the order of rememberme checkboxes for accessibility so they tab in order. #21454
|
||||
* Template - New structure for attributes template, including new `woocommerce_display_product_attributes` filter. #22480
|
||||
* Template - Admin cancelled order email reworded. #22971
|
||||
* Dev - Update action scheduler to version 2.2.2. #23162
|
||||
* Dev - Update action scheduler to version 2.2.1. #23016
|
||||
* Dev - Use ActionScheduler for database updates. Improved update notice. #22904
|
||||
* Dev - Introduce `woocommerce_reviews_title` filter. #22216
|
||||
* Dev - Added `woocommerce_cheque_process_payment_order_status` filter allowing plugins to change the order status to the Cheque gateway. #21402
|
||||
* Dev - Add the current coupon object to the `woocommerce_get_shop_coupon_data` filter. #21442
|
||||
* Dev - New filter `woocommerce_gallery_image_html_attachment_image_params` for manipulating gallery images. #22005
|
||||
* Dev - New filter `woocommerce_widget_get_current_page_url` for manipulating links in widgets. #21537
|
||||
* Dev - Move wc_get_template filter to allow plugins to register locations for template files that do not exist in WooCommerce core. #21764
|
||||
* Dev - Add support for custom classes on global/quantity-input.php. #21553
|
||||
* Dev - Pass product object to `woocommerce_add_to_cart_redirect` filter where appropriate. #22123
|
||||
* Dev - Add support for forgetting the cart contents and user session when switching between accounts using the User Switching plugin. #21991
|
||||
* Dev - Added a consistent form class to the Track Order Form. #21991
|
||||
* Dev - Add $orderby and $order params to filter `woocommerce_get_catalog_ordering_args`. #22257
|
||||
* Dev - Add new pre query filter to WC_Product_Data_Store_CPT::search_products(). #22165
|
||||
* Dev - Added additional parameters to the `woocommerce_variation_option_name` filter. #21153
|
||||
* Dev - Added new filter `woocommerce_get_min_max_price_meta_query`. #22255
|
||||
* Dev - Added a filter to WC_REST_CRUD_Controller::get_collection_params method to allow developers to change params in
|
||||
the same way as WP_Rest_Posts_controller::get_collection_params. #21562
|
||||
* Dev - Add $zone param to woocommerce_shipping_zone_before_methods_table and woocommerce_shipping_zone_after_methods_table actions. #21961
|
||||
* Dev - Added `woocommerce_geolocation_ajax_get_location_hash` filter. #22350
|
||||
* Dev - Added `woocommerce_variation_prices_array` filter. #21003
|
||||
* Dev - Added `wc_emptied_cart` javascript event when cart is emptied. #22469
|
||||
* Dev - Switched `woocommerce_ordered_again` hook to ref_array. #22425
|
||||
* Dev - `woocommerce_checkout_before_order_review_heading` action added in checkout form template. #22481
|
||||
* Dev - Added `woocommerce_variation_header` hook in variations list. #21341
|
||||
* Dev - Add a filter, woocommerce_current_user_can_edit_customer_meta_fields, to bypass manage_woocommerce when editing customer meta fields. #22277
|
||||
* Dev - Adds filter on the return value of function 'get_item_tax_rates'. This gives developers the possibility to
|
||||
prevent the mandatory caching of tax rates. #22488
|
||||
* Dev - Add filters for mail callback in WC_Email::send method. #22394
|
||||
* Dev - Add an instance method to WC_Admin_Taxonomies. #21884
|
||||
* Dev - Added `woocommerce_order_is_pending_statuses` filter and `wc_get_is_pending_statuses` function. #22409
|
||||
* Dev - Filter save_payment_method_checkbox to allow "Save to account" checkbox to be removed from the checkout form. #21859
|
||||
* Dev - Added triggers to the gallery script to allow 3rd parties to run scripts before and after initialization. #22501
|
||||
* Dev - Added `woocommerce_add_to_cart_qty_html` filter. #21069
|
||||
* Dev - Prevent extract from polluting hook arguments in wc_get_template(). #21722
|
||||
* Dev - Add `woocommerce_pre_remove_cart_item_from_session` hook to allow removal of cart items when the cart is loaded from the session. #22290
|
||||
* Dev - Add `$attribute` to `woocommerce_product_option_terms` filter. #21648
|
||||
* Dev - Added error handling and timeout to cart fragment ajax call. #21043
|
||||
* Dev - Remove unused legacy 'woocommerce_lock_down_admin' option and use filter only instead. #17796
|
||||
* Dev - Allow custom settings sections in the Shipping tab. #21719
|
||||
* Dev - Update Emogrifier library to 2.1. #22342
|
||||
* Dev - Moved core state codes to a single file. #22339
|
||||
* Dev - Adds filter for product categories displayed by `product_categories` shortcode. #22571
|
||||
* Dev - Moves cart hash calculation to WC_Cart class. #21050
|
||||
* Dev - Removed deprecated Simplify gateway. #22410
|
||||
* Dev - Added `woocommerce_paypal_force_one_line_item` filter to control how items are sent to PayPal. #22653
|
||||
* Dev - Added `woocommerce_update_product_stock_query` to filter the direct sql query to update product stock. #22672
|
||||
* Dev - Added `woocommerce_product_loop_title_classes` filter to modify product title loop classes. #22717
|
||||
* Dev - Delay `woocommerce_loaded` hook until all plugins are loaded. #22536
|
||||
* Dev - Added `woocommerce_product_price_class` filter to modify product price classes. #22748
|
||||
* Dev - `woocommerce_product_stock_status_options` filter added for stock status options. #22834
|
||||
* Dev - `woocommerce_before_cart_emptied` action before cart is emptied. #22846
|
||||
* Dev - Added filters for shipping options - `woocommerce_shipping_ID_option` and `woocommerce_shipping_ID_instance_option`. #22771
|
||||
* Dev - Refactor comment/rating update functions. #22909
|
||||
* Dev - Introduced wc_sanitize_phone_number() function. #22962
|
||||
* Dev - Added `woocommerce_get_product_subcategories_cache_key` filter to allow the cache to be renamed if for instance
|
||||
the site runs in multiple languages and needs a unique cache per language. #22915
|
||||
* Dev - Inactive, MU, Dropin plugins and WooCommerce.com account connection status added to System Status Report. #22887
|
||||
* Dev - Make error handling consistent in payment processing for pay page and checkout. #22916
|
||||
* Dev - Improved usage and event tracking (if opted in). #22955
|
||||
* Dev - Pass class context to woocommerce_email_styles filter. #23027
|
||||
* Fix - Use correct address for taxes when applying/removing coupons. #22802
|
||||
* Fix - Hide ratings on the shop page when reviews are disabled. #22476
|
||||
* Fix - Fix W3C validation of single product page quantity input. #22333
|
||||
* Fix - Give product variations a unique guid after creation. #22324
|
||||
* Fix - Deduct correct refunded amounts in calculated net daily sales export CSV. #22518
|
||||
* Fix - Country sorting for stores which use a language that uses a lot of accented characters, e.g. Spanish. #22417
|
||||
* Fix - Customer VAT exempt status now carries through to order when placed via checkout. #22458
|
||||
* Fix - Handle full refunds for taxes by code report. #21843
|
||||
* Fix - Option "Used for variations" should show only for variable products when saving attributes. #22524
|
||||
* Fix - Allow pa_ in product attribute slugs. #22112
|
||||
* Fix - Fix customer creation dates in API. #22269
|
||||
* Fix - Get widget instance setting defaults so it shows in customiser before save. #22345
|
||||
* Fix - PR state codes. #22339
|
||||
* Fix - Allow selecting states from the Country / State drop-down for your store address when you have the option
|
||||
enabled to sell to specific countries. #22339
|
||||
* Fix - Restrict the price filter widget to filtering the main product query. #22621
|
||||
* Fix - Default placeholder image resizing. #22443
|
||||
* Fix - HTML tags should be stripped from description in Structured Data of Product. #22596
|
||||
* Fix - For logged in customers, pull default address fields from customer object, not session object, to avoid incorrect mixes of data. #22392
|
||||
* Fix - Misc tax rounding improvements. #22420
|
||||
* Fix - Respect shop page subcategories setting when `page/N/` is added to the URL. #22589
|
||||
* Fix - Check for decoded taxonomy name when unsetting product terms. #22740
|
||||
* Fix - If date paid is not set but payment complete status has passed, set it. #22735
|
||||
* Fix - Prevent webhooks for drafts, and correct create vs updated for manual orders. #22731
|
||||
* Fix - Ignore invalid default customer locations. #22357
|
||||
* Fix - The state select field was missing a placeholder. #22357
|
||||
* Fix - Fix state field rendering when customer address is not in a valid selling country. #22357
|
||||
* Fix - Correctly handle negative fees when using the REST API. #22782
|
||||
* Fix - Make sure local_pickup taxes do not hang around when local_pickup is not available for the selected location during checkout. #22826
|
||||
* Fix - Remove Plugin and Theme background installer hooks, cannot run as there are no events scheduled for it. #22799
|
||||
* Fix - Trigger zoom if moving cursor over image quickly in product gallery. #22784
|
||||
* Fix - PayPal: Add meta data, before changing order status. #22892
|
||||
* Fix - Make price filter widget tax aware when you have excl prices entered but show prices incl of tax. #22540
|
||||
* Fix - Loop attribute panels to disable options rather than look at values to prevent notices. #22891
|
||||
* Fix - When deleting zone methods, also remove setting options. #22867
|
||||
* Fix - Correctly show state fields after posting the edit address form. #22948
|
||||
* Fix - Validate coupon usage limit for manual orders correctly before order is saved. #22980
|
||||
* Fix - Make coupon code sanitization match post_title sanitization. #22945
|
||||
* Fix - Ensure WC_Helper sees plugin activation events via CLI. #22972
|
||||
* Fix - Setup wizard redirection improvements. #22977
|
||||
* Fix - Correctly show stock status for products when manually creating an order in the admin. #22997
|
||||
* Fix - After logging in update customer session ID. #23001
|
||||
* Fix - Narrow viewport css in setup wizard. #23033
|
||||
* Fix - Allow entering of date only ( no time ) when placing a singular product on sale. #22973
|
||||
* Fix - Download link URL in helper. #23146
|
||||
* Fix - Completed email wording update. #23128
|
||||
* Fix - REST API: Allow filtering by future status #23138
|
||||
* Fix - Update refund reason to make it clear process is manual. #23149
|
||||
* Fix - Hide stock status for variations when the parent is managing stock. #23069
|
||||
* Fix - Force variation product type in WC_Ajax::add_variation. #23131
|
||||
* Fix - WooCommerce writes current_theme_supports_woocommerce option on every regular page view. #23035
|
||||
* Fix - Update the rating request text in the footer to be friendlier for screen reader users. #23039
|
||||
* Fix - Null check variable before accessing its properties on checkout page. #23047
|
||||
* Fix - Recognize all input fields with ID for checkout fields. #23050
|
||||
* Fix - Avoid regenerating thumbnails on every page load. #21800
|
||||
* Fix - Changed 'private' methods on WC_Breadcrumb class to 'protected'. #23057
|
||||
* Fix - Jumping to top of page when dismissing store notice. #23066
|
||||
* Fix - Backwards compatibility issues with wc_get_template #23197
|
||||
* Fix - Remove date restriction of Facebook Plugin feature in OBW #23210
|
||||
* Fix - Updates to usage tracking logic #23231
|
||||
* Fix - Add get_post_status helper method and ensure prefix gets added for most statuses #23203
|
||||
* Fix - Add link to suggstions management #23229
|
||||
* Fix - Make usage tracking opt-out text more clear #23216
|
||||
* Fix - CSS Issues with suggestions display #23241
|
||||
* Fix - Product search may fail to return valid results when using the 'include' flag to search within a limited set.
|
||||
* Fix - Change aria-labelledby to aria-label on quantity input. #23186
|
||||
* Performance - Product meta data lookup table used for sorting and slow queries. #22718
|
||||
* Performance - Prime caches when reading variations. #22587
|
||||
* Performance - Only include REST API classes and objects during `rest_api_init` hook. #22615
|
||||
* Performance - Improved how versioned transients are set/cleanup to avoid cron. #22511
|
||||
* Performance - Optimized product CSS class functions to avoid multiple product reads and duplication. #22610
|
||||
* Performance - Improved caching of template loader, product types, and layered nav widget. #22612
|
||||
* Performance - Remove external lookup of IP addresses on localhost. #22608
|
||||
* Performance - Improved speed of the `find_matching_product_variation` variation lookup function. #22423
|
||||
* Performance - Prevent frontend code from being loaded during REST API. #21090
|
||||
* Performance - Load only active webhooks on pages and allow limits to be set by developers. #22760
|
||||
* Performance - Index on downloadable_product_permissions to improve speed when fetching downloads for customers. #22906
|
||||
* Performance - Improved term ordering queries, making the sorting apply by default via the DB query rather than sorting
|
||||
all terms with PHP. Removed legacy term meta table usage. #22570
|
||||
* Performance - Use day, not time, in status widget for caching. #22950
|
||||
* Performance - Improve slow term ordering by using queries instead of php. #22570
|
||||
* Performance - Removes legacy woocomerce_termmeta table and swap out all calls to legacy term meta functions to the new WP ones. #22570
|
||||
* Performance - Apply term sorting using get_terms_defaults hook instead of custom parameters. #22570
|
||||
* Performance - Use pre_get_terms hook to detect menu_order sorting param and apply to the term query. Meta sorting is now possible through WP. #22570
|
||||
* Performance - Use terms_clauses hook to support numeric name sorting and to improve the menu order sorting so it works if meta is missing. #22570
|
||||
* Performance - Added caching to System Status Report. #22887
|
||||
* Performance - Delete empty meta on update in data-stores. #22773
|
||||
* Performance - Image regeneration edge cases. #22818
|
||||
* Performance - Don’t query for an order count unnecessarily. #22984
|
||||
* Performance - Add caching to attribute functions. #22938
|
||||
* Performance - Add ability to run product lookup table updates via WP CLI. #23031
|
||||
* Localization - Modify administrative regions of Greece to default to their english ISO 3166-2 names, instead of using the native GR names. #21945
|
||||
* Localization - Added US Minor Outlying Islands as states to avoid confusion with US. #22468
|
||||
* Localization - Dutch postcode validation. #22316
|
||||
* Localization - Made municipality address field optional for Latvia. #22487
|
||||
* Localization - Added new Venezuelan currency Bs S. #22435
|
||||
* Localization - Added Danish locale. #22495
|
||||
* Localization - Update Peruvian currency. #22602
|
||||
* Localization - Update CA address format. #22692
|
||||
* Localization - Updated JP field order. #22774
|
||||
|
||||
= 3.5.8 - 2019-04-16 =
|
||||
* Security - Added escaping for states on the user profile screen.
|
||||
* Security - Added escaping for PhotoSwipe captions.
|
||||
* Security - Added escaping for SelectWoo selected options.
|
||||
|
||||
= 3.5.7 - 2019-03-19 =
|
||||
* Security - Improved the way in which state fields are regenerated by JavaScript to ensure values are properly escaped.
|
||||
|
||||
= 3.5.6 - 2019-03-07 =
|
||||
* Fix - Removes invalid product structured data from archives, and include more data on single product pages. #22925
|
||||
Product structured data should only be generated for visible data, and not on archives when there are single
|
||||
product pages available, as per the documentation.
|
||||
Since this change removes structured data from archives, the filters `woocommerce_structured_data_product_limit`
|
||||
and `woocommerce_structured_data_product_limited` have also been removed.
|
||||
To customize product structured data, for example adding custom fields or include on archives, see this article:
|
||||
https://github.com/woocommerce/woocommerce/wiki/Structured-data-for-products.
|
||||
* Fix - Fix last item in breadcrumb structured data, and include on shop page. #22925
|
||||
* Fix - Get insert ID before running actions in `_insert_tax_rate`. #22868
|
||||
* Fix - Add precision to tax in the discount class so min spend checks work correctly. #22888
|
||||
* Fix - Update troubleshooting link in failed order email. #22943
|
||||
* Fix - Update Flexslider to 2.7.2.
|
||||
* Fix - Fill user's account first name and last name only when those fields are empty. #22783
|
||||
|
||||
= 3.5.5 - 2019-02-20 =
|
||||
* Fix - Fix allow product low stock threshold be the WC settings default. #22777
|
||||
* Fix - Fix error on product category when sorting by multiple fields. #22066
|
||||
|
|
68
Gruntfile.js
|
@ -1,7 +1,7 @@
|
|||
/* jshint node:true */
|
||||
module.exports = function( grunt ) {
|
||||
'use strict';
|
||||
const sass = require( 'node-sass' );
|
||||
var sass = require( 'node-sass' );
|
||||
|
||||
grunt.initConfig({
|
||||
|
||||
|
@ -10,7 +10,8 @@ module.exports = function( grunt ) {
|
|||
css: 'assets/css',
|
||||
fonts: 'assets/fonts',
|
||||
images: 'assets/images',
|
||||
js: 'assets/js'
|
||||
js: 'assets/js',
|
||||
php: 'includes'
|
||||
},
|
||||
|
||||
// JavaScript linting with JSHint.
|
||||
|
@ -19,7 +20,6 @@ module.exports = function( grunt ) {
|
|||
jshintrc: '.jshintrc'
|
||||
},
|
||||
all: [
|
||||
'Gruntfile.js',
|
||||
'<%= dirs.js %>/admin/*.js',
|
||||
'!<%= dirs.js %>/admin/*.min.js',
|
||||
'<%= dirs.js %>/frontend/*.js',
|
||||
|
@ -88,6 +88,8 @@ module.exports = function( grunt ) {
|
|||
'<%= dirs.js %>/photoswipe/photoswipe.min.js': ['<%= dirs.js %>/photoswipe/photoswipe.js'],
|
||||
'<%= dirs.js %>/photoswipe/photoswipe-ui-default.min.js': ['<%= dirs.js %>/photoswipe/photoswipe-ui-default.js'],
|
||||
'<%= dirs.js %>/round/round.min.js': ['<%= dirs.js %>/round/round.js'],
|
||||
'<%= dirs.js %>/selectWoo/selectWoo.full.min.js': ['<%= dirs.js %>/selectWoo/selectWoo.full.js'],
|
||||
'<%= dirs.js %>/selectWoo/selectWoo.min.js': ['<%= dirs.js %>/selectWoo/selectWoo.js'],
|
||||
'<%= dirs.js %>/stupidtable/stupidtable.min.js': ['<%= dirs.js %>/stupidtable/stupidtable.js'],
|
||||
'<%= dirs.js %>/zeroclipboard/jquery.zeroclipboard.min.js': ['<%= dirs.js %>/zeroclipboard/jquery.zeroclipboard.js']
|
||||
}
|
||||
|
@ -295,6 +297,13 @@ module.exports = function( grunt ) {
|
|||
clean: {
|
||||
apidocs: {
|
||||
src: [ 'wc-apidocs' ]
|
||||
},
|
||||
blocks: {
|
||||
src: [
|
||||
'<%= dirs.js %>/blocks',
|
||||
'<%= dirs.css %>/blocks',
|
||||
'<%= dirs.php %>/blocks'
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -335,6 +344,52 @@ module.exports = function( grunt ) {
|
|||
'<%= dirs.css %>/*.css'
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
// Copy block files from npm package.
|
||||
copy: {
|
||||
js: {
|
||||
expand: true,
|
||||
cwd: 'node_modules/@woocommerce/block-library/build',
|
||||
src: '*.js',
|
||||
dest: '<%= dirs.js %>/blocks/',
|
||||
options: {
|
||||
process: ( content ) => content.replace( /'woo-gutenberg-products-block'/g, "'woocommerce'" )
|
||||
}
|
||||
},
|
||||
css: {
|
||||
expand: true,
|
||||
cwd: 'node_modules/@woocommerce/block-library/build',
|
||||
src: '*.css',
|
||||
dest: '<%= dirs.css %>/blocks/'
|
||||
},
|
||||
php: {
|
||||
expand: true,
|
||||
cwd: 'node_modules/@woocommerce/block-library/assets/php',
|
||||
src: '*.php',
|
||||
dest: '<%= dirs.php %>/blocks/',
|
||||
rename: ( dest, src ) => dest + '/' + src.replace( '-wgpb-', '-wc-' ),
|
||||
options: {
|
||||
process: ( content ) => content
|
||||
// Replace textdomain.
|
||||
.replace( /'woo-gutenberg-products-block'/g, "'woocommerce'" )
|
||||
// Replace source for JS files.
|
||||
.replace(
|
||||
/plugins_url\( 'build\/([\w-]*)\.js', WGPB_PLUGIN_FILE \)/g,
|
||||
"WC()->plugin_url() . '/assets/js/blocks/$1.js'"
|
||||
)
|
||||
// Replace source for CSS files.
|
||||
.replace(
|
||||
/plugins_url\( 'build\/([\w-]*)\.css', WGPB_PLUGIN_FILE \)/g,
|
||||
"WC()->plugin_url() . '/assets/css/blocks/$1.css'"
|
||||
)
|
||||
// Replace class & constant prefixes.
|
||||
.replace( /WGPB_/g, 'WC_' )
|
||||
.replace( /FP_VERSION/g, 'WGPB_VERSION' )
|
||||
// Replace file imports
|
||||
.replace( /-wgpb-/g, '-wc-' )
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -351,6 +406,7 @@ module.exports = function( grunt ) {
|
|||
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-concat' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-copy' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-clean' );
|
||||
grunt.loadNpmTasks( 'grunt-prompt' );
|
||||
|
@ -359,6 +415,7 @@ module.exports = function( grunt ) {
|
|||
grunt.registerTask( 'default', [
|
||||
'js',
|
||||
'css',
|
||||
'blocks',
|
||||
'i18n'
|
||||
]);
|
||||
|
||||
|
@ -377,6 +434,11 @@ module.exports = function( grunt ) {
|
|||
'concat'
|
||||
]);
|
||||
|
||||
grunt.registerTask( 'blocks', [
|
||||
'clean:blocks',
|
||||
'copy'
|
||||
]);
|
||||
|
||||
grunt.registerTask( 'docs', [
|
||||
'clean:apidocs',
|
||||
'shell:apidocs'
|
||||
|
|
|
@ -7,6 +7,8 @@ source:
|
|||
exclude:
|
||||
- includes/libraries/
|
||||
- includes/api/legacy/
|
||||
- api/legacy/
|
||||
- libraries/
|
||||
charset: [UTF-8]
|
||||
main: WC
|
||||
title: WooCommerce Code Reference
|
||||
|
|
|
@ -1 +1 @@
|
|||
div.woocommerce-message{overflow:hidden;position:relative;border-right-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}div.woocommerce-message p:last-child{max-width:inherit}.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;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;left:12px;position:absolute}
|
||||
div.woocommerce-message{overflow:hidden;position:relative;border-right-color:#cc99c2!important}.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 +1 @@
|
|||
div.woocommerce-message{overflow:hidden;position:relative;border-left-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}div.woocommerce-message p:last-child{max-width:inherit}.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;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;right:12px;position:absolute}
|
||||
div.woocommerce-message{overflow:hidden;position:relative;border-left-color:#cc99c2!important}.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}
|
|
@ -66,34 +66,3 @@ p.woocommerce-actions,
|
|||
.woocommerce-about-text {
|
||||
margin-bottom: 1em !important;
|
||||
}
|
||||
|
||||
div.woocommerce-legacy-shipping-notice,
|
||||
div.woocommerce-no-shipping-methods-notice {
|
||||
overflow: hidden;
|
||||
padding: 1px 12px;
|
||||
|
||||
p {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
line-height: 1.5em;
|
||||
margin: 12px 0;
|
||||
|
||||
&.main {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
}
|
||||
|
||||
&::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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3931,6 +3931,11 @@ img.help_tip {
|
|||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.select2-container + span.description {
|
||||
display: block;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
table.widefat th {
|
||||
padding-right: inherit;
|
||||
}
|
||||
|
@ -4352,6 +4357,10 @@ img.help_tip {
|
|||
content: "\f111";
|
||||
}
|
||||
|
||||
&.marketplace-suggestions_options a::before {
|
||||
content: none;
|
||||
}
|
||||
|
||||
&.variations_options a::before {
|
||||
content: "\f509";
|
||||
}
|
||||
|
@ -5950,6 +5959,27 @@ table.bar_chart {
|
|||
}
|
||||
}
|
||||
|
||||
.post-type-product .woocommerce-BlankState,
|
||||
.post-type-shop_order .woocommerce-BlankState {
|
||||
max-width: 764px;
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
|
||||
.woocommerce-BlankState-message {
|
||||
color: #444;
|
||||
font-size: 1.5em;
|
||||
margin: 0 auto 1em;
|
||||
}
|
||||
|
||||
.woocommerce-BlankState-message::before {
|
||||
font-size: 120px;
|
||||
}
|
||||
|
||||
.woocommerce-BlankState-buttons {
|
||||
margin-bottom: 4em;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Small screen optimisation
|
||||
*/
|
||||
|
@ -6759,7 +6789,7 @@ table.bar_chart {
|
|||
border-radius: 3px;
|
||||
box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.4);
|
||||
background: #a46497;
|
||||
background: linear-gradient(top, #a46497, #66405f), #a46497;
|
||||
background: linear-gradient(to bottom, #a46497, #66405f), #a46497;
|
||||
transition: width 1s ease;
|
||||
}
|
||||
|
||||
|
@ -6767,7 +6797,7 @@ table.bar_chart {
|
|||
border-radius: 3px;
|
||||
box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.4);
|
||||
background: #a46497;
|
||||
background: linear-gradient(top, #a46497, #66405f), #a46497;
|
||||
background: linear-gradient(to bottom, #a46497, #66405f), #a46497;
|
||||
transition: width 1s ease;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
.wc-block-featured-product{position:relative;background-color:#24292d;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em}.wc-block-featured-product,.wc-block-featured-product .wc-block-featured-product__wrapper{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-product .wc-block-featured-product__wrapper{overflow:hidden;height:100%}.wc-block-featured-product.has-left-content{justify-content:flex-start}.wc-block-featured-product.has-left-content .wc-block-featured-product__description,.wc-block-featured-product.has-left-content .wc-block-featured-product__price,.wc-block-featured-product.has-left-content .wc-block-featured-product__title{margin-left:0;text-align:left}.wc-block-featured-product.has-right-content{justify-content:flex-end}.wc-block-featured-product.has-right-content .wc-block-featured-product__description,.wc-block-featured-product.has-right-content .wc-block-featured-product__price,.wc-block-featured-product.has-right-content .wc-block-featured-product__title{margin-right:0;text-align:right}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-product .wc-block-featured-product__description a,.wc-block-featured-product .wc-block-featured-product__description a:active,.wc-block-featured-product .wc-block-featured-product__description a:focus,.wc-block-featured-product .wc-block-featured-product__description a:hover,.wc-block-featured-product .wc-block-featured-product__price a,.wc-block-featured-product .wc-block-featured-product__price a:active,.wc-block-featured-product .wc-block-featured-product__price a:focus,.wc-block-featured-product .wc-block-featured-product__price a:hover,.wc-block-featured-product .wc-block-featured-product__title a,.wc-block-featured-product .wc-block-featured-product__title a:active,.wc-block-featured-product .wc-block-featured-product__title a:focus,.wc-block-featured-product .wc-block-featured-product__title a:hover{color:#fff}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__link,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title{width:100%;padding:0 48px 16px;z-index:1}.wc-block-featured-product .wc-block-featured-product__title{margin-top:0}.wc-block-featured-product .wc-block-featured-product__title:before{display:none}.wc-block-featured-product .wc-block-featured-product__description p{margin:0}.wc-block-featured-product.has-background-dim:before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-product.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-product.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-product.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-product.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-product.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-product.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-product.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-product.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-product.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-product.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright{max-width:305px;width:100%}.wc-block-featured-product:after{display:block;content:"";font-size:0;min-height:inherit}@supports ((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-product:after{content:none}}.wc-block-featured-product.aligncenter,.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright{display:flex}
|
||||
.wp-block-woocommerce-handpicked-products.is-hidden-price .price,.wp-block-woocommerce-handpicked-products.is-hidden-title .woocommerce-loop-product__title,.wp-block-woocommerce-product-best-sellers.is-hidden-price .price,.wp-block-woocommerce-product-best-sellers.is-hidden-title .woocommerce-loop-product__title,.wp-block-woocommerce-product-category.is-hidden-price .price,.wp-block-woocommerce-product-category.is-hidden-title .woocommerce-loop-product__title,.wp-block-woocommerce-product-new.is-hidden-price .price,.wp-block-woocommerce-product-new.is-hidden-title .woocommerce-loop-product__title,.wp-block-woocommerce-product-on-sale.is-hidden-price .price,.wp-block-woocommerce-product-on-sale.is-hidden-title .woocommerce-loop-product__title,.wp-block-woocommerce-product-top-rated.is-hidden-price .price,.wp-block-woocommerce-product-top-rated.is-hidden-title .woocommerce-loop-product__title,.wp-block-woocommerce-products-by-attribute.is-hidden-price .price,.wp-block-woocommerce-products-by-attribute.is-hidden-title .woocommerce-loop-product__title{display:none!important}.wp-block-woocommerce-handpicked-products.is-hidden-rating .star-rating,.wp-block-woocommerce-product-best-sellers.is-hidden-rating .star-rating,.wp-block-woocommerce-product-category.is-hidden-rating .star-rating,.wp-block-woocommerce-product-new.is-hidden-rating .star-rating,.wp-block-woocommerce-product-on-sale.is-hidden-rating .star-rating,.wp-block-woocommerce-product-top-rated.is-hidden-rating .star-rating,.wp-block-woocommerce-products-by-attribute.is-hidden-rating .star-rating{display:none}.wp-block-woocommerce-handpicked-products.is-hidden-button .button[data-product_sku],.wp-block-woocommerce-product-best-sellers.is-hidden-button .button[data-product_sku],.wp-block-woocommerce-product-category.is-hidden-button .button[data-product_sku],.wp-block-woocommerce-product-new.is-hidden-button .button[data-product_sku],.wp-block-woocommerce-product-on-sale.is-hidden-button .button[data-product_sku],.wp-block-woocommerce-product-top-rated.is-hidden-button .button[data-product_sku],.wp-block-woocommerce-products-by-attribute.is-hidden-button .button[data-product_sku]{display:none!important}
|
|
@ -0,0 +1,304 @@
|
|||
/**
|
||||
* marketplace-suggestions.scss
|
||||
* Styling for in-product marketplace suggestions.
|
||||
*/
|
||||
|
||||
@import "mixins";
|
||||
@import "variables";
|
||||
|
||||
$suggestions-pale-gray: #ddd;
|
||||
$suggestions-metabox-pale-gray: #eee;
|
||||
|
||||
$suggestions-copy-text: #444;
|
||||
|
||||
a.suggestion-dismiss {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
color: $suggestions-pale-gray;
|
||||
}
|
||||
|
||||
a.suggestion-dismiss:hover {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
a.suggestion-dismiss::before {
|
||||
|
||||
@include iconbeforedashicons( "\f335" );
|
||||
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
#woocommerce-product-data ul.wc-tabs li.marketplace-suggestions_tab {
|
||||
|
||||
|
||||
a::before {
|
||||
|
||||
@include iconbeforedashicons( "\f106" );
|
||||
|
||||
@media only screen and (max-width: 900px) {
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
a span {
|
||||
margin: 0 0.618em;
|
||||
}
|
||||
}
|
||||
|
||||
.marketplace-suggestions-metabox-nosuggestions-placeholder {
|
||||
max-width: 325px;
|
||||
margin: 2em auto;
|
||||
text-align: center;
|
||||
|
||||
.marketplace-suggestion-placeholder-content {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
h4,
|
||||
a,
|
||||
p {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
display: block;
|
||||
margin-top: 0.75em;
|
||||
line-height: 1.75;
|
||||
}
|
||||
}
|
||||
|
||||
.marketplace-suggestions-container.showing-suggestion {
|
||||
text-align: left;
|
||||
|
||||
.marketplace-suggestion-container {
|
||||
align-items: flex-start;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
// Allows us to position the dismiss x button
|
||||
// relative to container on mobile.
|
||||
position: relative;
|
||||
|
||||
img.marketplace-suggestion-icon {
|
||||
height: 40px;
|
||||
margin: 0;
|
||||
margin-right: 1.5em;
|
||||
flex: 0 0 40px;
|
||||
}
|
||||
|
||||
.marketplace-suggestion-container-content {
|
||||
flex: 1 1 60%;
|
||||
|
||||
h4 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
margin-top: 4px;
|
||||
color: $suggestions-copy-text;
|
||||
}
|
||||
}
|
||||
|
||||
.marketplace-suggestion-container-cta {
|
||||
flex: 1 1 30%;
|
||||
min-width: 160px;
|
||||
text-align: right;
|
||||
|
||||
.suggestion-dismiss {
|
||||
text-decoration: none;
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
right: 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 600px) {
|
||||
|
||||
.marketplace-suggestion-container {
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
|
||||
img.marketplace-suggestion-icon {
|
||||
// display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-header"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-header"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-footer"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-header"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-footer"] {
|
||||
|
||||
.marketplace-suggestion-container {
|
||||
|
||||
.marketplace-suggestion-container-content {
|
||||
|
||||
h4 {
|
||||
font-size: 1.1em;
|
||||
margin: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Additional breathing space margin under empty-state footer.
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-footer"] {
|
||||
|
||||
margin-bottom: 6em;
|
||||
}
|
||||
|
||||
|
||||
// Optimise footer suggestion layout for left-aligned CTA link button only.
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-footer"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-footer"] {
|
||||
|
||||
.marketplace-suggestion-container {
|
||||
|
||||
flex-direction: row-reverse;
|
||||
|
||||
.marketplace-suggestion-container-cta {
|
||||
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.marketplace-suggestion-container-content.has-manage-link {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-header"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-footer"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-body"] {
|
||||
|
||||
.marketplace-suggestion-container {
|
||||
padding: 1em 1.5em;
|
||||
|
||||
.marketplace-suggestion-container-content {
|
||||
|
||||
p {
|
||||
padding: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-header"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-header"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-footer"] {
|
||||
|
||||
.marketplace-suggestion-container {
|
||||
padding: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-body"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-body"] {
|
||||
|
||||
.marketplace-suggestion-container {
|
||||
padding: 0.75em 1.5em;
|
||||
|
||||
&:first-child {
|
||||
padding-top: 1.5em;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
padding-bottom: 1.5em;
|
||||
}
|
||||
|
||||
.marketplace-suggestion-container-content {
|
||||
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-header"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-body"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-header"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-footer"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-body"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-header"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-footer"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-body"] {
|
||||
|
||||
// hide by default (mobile first)
|
||||
display: none;
|
||||
|
||||
.marketplace-suggestion-container .marketplace-suggestion-container-cta {
|
||||
|
||||
a.button {
|
||||
display: inline-block;
|
||||
min-width: 120px;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a.linkout {
|
||||
font-size: 1.1em;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.linkout .dashicons {
|
||||
margin-left: 4px;
|
||||
bottom: 2px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.suggestion-dismiss {
|
||||
position: relative;
|
||||
top: 5px;
|
||||
right: auto;
|
||||
margin-left: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 600px) {
|
||||
|
||||
// Display onboarding table suggestion on desktop only. (for now)
|
||||
// There's limited room on mobile, and there are edge-case
|
||||
// styling issues in some browsers.
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-header"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-footer"] {
|
||||
|
||||
border: none;
|
||||
}
|
||||
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-body"] {
|
||||
|
||||
border: none;
|
||||
border-top: 1px solid $suggestions-metabox-pale-gray;
|
||||
border-bottom: 1px solid $suggestions-metabox-pale-gray;
|
||||
}
|
||||
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-header"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-body"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-header"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-footer"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-body"] {
|
||||
|
||||
border: 1px solid $suggestions-pale-gray;
|
||||
border-bottom: none;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: 1px solid $suggestions-pale-gray;
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
#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: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}
|
||||
#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 +1 @@
|
|||
#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: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}
|
||||
#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}
|
|
@ -161,6 +161,7 @@
|
|||
font-size: 0.8125rem;
|
||||
text-transform: uppercase;
|
||||
font-weight: 800;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.price {
|
||||
|
|
|
@ -733,7 +733,7 @@ p.demo_store,
|
|||
}
|
||||
|
||||
&:hover {
|
||||
background-color: $secondary - #111;
|
||||
background-color: darken($secondary, 5%);
|
||||
text-decoration: none;
|
||||
background-image: none;
|
||||
color: $secondarytext;
|
||||
|
@ -745,7 +745,7 @@ p.demo_store,
|
|||
-webkit-font-smoothing: antialiased;
|
||||
|
||||
&:hover {
|
||||
background-color: $primary - #111;
|
||||
background-color: darken($primary, 5%);
|
||||
color: $primarytext;
|
||||
}
|
||||
|
||||
|
@ -1420,7 +1420,7 @@ p.demo_store,
|
|||
.select2-container,
|
||||
input.input-text,
|
||||
select {
|
||||
border-color: $green - #111;
|
||||
border-color: darken($green, 5%);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1674,7 +1674,7 @@ p.demo_store,
|
|||
|
||||
.price_slider_wrapper .ui-widget-content {
|
||||
border-radius: 1em;
|
||||
background-color: $primary - #444;
|
||||
background-color: darken($primary, 30%);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
|
|
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 9.0 KiB |
|
@ -1 +1 @@
|
|||
!function(e){new(Backbone.View.extend({el:e("#key-fields"),events:{"click input#update_api_key":"saveKey"},initialize:function(){_.bindAll(this,"saveKey")},block:function(){e(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){e(this.el).unblock()},initTipTip:function(i){e(document.body).on("click",i,function(o){o.preventDefault(),document.queryCommandSupported("copy")?(e("#copy-error").text(""),wcClearClipboard(),wcSetClipboard(e.trim(e(this).prev("input").val()),e(i))):(e(i).parent().find("input").focus().select(),e("#copy-error").text(woocommerce_admin_api_keys.clipboard_failed))}).on("aftercopy",i,function(){e("#copy-error").text(""),e(i).tipTip({attribute:"data-tip",activation:"focus",fadeIn:50,fadeOut:50,delay:0}).focus()}).on("aftercopyerror",i,function(){e(i).parent().find("input").focus().select(),e("#copy-error").text(woocommerce_admin_api_keys.clipboard_failed)})},createQRCode:function(i,o){e("#keys-qrcode").qrcode({text:i+"|"+o,width:120,height:120})},saveKey:function(i){i.preventDefault();var o=this;o.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:e("#key_id",o.el).val(),description:e("#key_description",o.el).val(),user:e("#key_user",o.el).val(),permissions:e("#key_permissions",o.el).val()},success:function(i){if(e(".wc-api-message",o.el).remove(),i.success){var t=i.data;if(e("h2, h3",o.el).first().append('<div class="wc-api-message updated"><p>'+t.message+"</p></div>"),0<t.consumer_key.length&&0<t.consumer_secret.length){e("#api-keys-options",o.el).remove(),e("p.submit",o.el).empty().append(t.revoke_url);var a=wp.template("api-keys-template");e("p.submit",o.el).before(a({consumer_key:t.consumer_key,consumer_secret:t.consumer_secret})),o.createQRCode(t.consumer_key,t.consumer_secret),o.initTipTip(".copy-key"),o.initTipTip(".copy-secret")}else e("#key_description",o.el).val(t.description),e("#key_user",o.el).val(t.user_id),e("#key_permissions",o.el).val(t.permissions)}else e("h2, h3",o.el).first().append('<div class="wc-api-message error"><p>'+i.data.message+"</p></div>");o.unblock()}})}}))}(jQuery);
|
||||
!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);
|
|
@ -0,0 +1,437 @@
|
|||
/* global marketplace_suggestions, ajaxurl, Cookies */
|
||||
( function( $, marketplace_suggestions, ajaxurl ) {
|
||||
$( function() {
|
||||
if ( 'undefined' === typeof marketplace_suggestions ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Stand-in wcTracks.recordEvent in case tracks is not available (for any reason).
|
||||
window.wcTracks = window.wcTracks || {};
|
||||
window.wcTracks.recordEvent = window.wcTracks.recordEvent || function() { };
|
||||
|
||||
// Tracks events sent in this file:
|
||||
// - marketplace_suggestion_displayed
|
||||
// - marketplace_suggestion_clicked
|
||||
// - marketplace_suggestion_dismissed
|
||||
// All are prefixed by {WC_Tracks::PREFIX}.
|
||||
// All have one property for `suggestionSlug`, to identify the specific suggestion message.
|
||||
|
||||
// Dismiss the specified suggestion from the UI, and save the dismissal in settings.
|
||||
function dismissSuggestion( context, product, promoted, url, suggestionSlug ) {
|
||||
// hide the suggestion in the UI
|
||||
var selector = '[data-suggestion-slug=' + suggestionSlug + ']';
|
||||
$( selector ).fadeOut( function() {
|
||||
$( this ).remove();
|
||||
tidyProductEditMetabox();
|
||||
} );
|
||||
|
||||
// save dismissal in user settings
|
||||
jQuery.post(
|
||||
ajaxurl,
|
||||
{
|
||||
'action': 'woocommerce_add_dismissed_marketplace_suggestion',
|
||||
'_wpnonce': marketplace_suggestions.dismiss_suggestion_nonce,
|
||||
'slug': suggestionSlug
|
||||
}
|
||||
);
|
||||
|
||||
// if this is a high-use area, delay new suggestion that area for a short while
|
||||
var highUseSuggestionContexts = [ 'products-list-inline' ];
|
||||
if ( _.contains( highUseSuggestionContexts, context ) ) {
|
||||
// snooze suggestions in that area for 2 days
|
||||
var contextSnoozeCookie = 'woocommerce_snooze_suggestions__' + context;
|
||||
Cookies.set( contextSnoozeCookie, 'true', { expires: 2 } );
|
||||
|
||||
// keep track of how often this area gets dismissed in a cookie
|
||||
var contextDismissalCountCookie = 'woocommerce_dismissed_suggestions__' + context;
|
||||
var previousDismissalsInThisContext = parseInt( Cookies.get( contextDismissalCountCookie ), 10 ) || 0;
|
||||
Cookies.set( contextDismissalCountCookie, previousDismissalsInThisContext + 1, { expires: 31 } );
|
||||
}
|
||||
|
||||
window.wcTracks.recordEvent( 'marketplace_suggestion_dismissed', {
|
||||
suggestion_slug: suggestionSlug,
|
||||
context: context,
|
||||
product: product || '',
|
||||
promoted: promoted || '',
|
||||
target: url || ''
|
||||
} );
|
||||
}
|
||||
|
||||
// Render DOM element for suggestion dismiss button.
|
||||
function renderDismissButton( context, product, promoted, url, suggestionSlug ) {
|
||||
var dismissButton = document.createElement( 'a' );
|
||||
|
||||
dismissButton.classList.add( 'suggestion-dismiss' );
|
||||
dismissButton.setAttribute( 'title', marketplace_suggestions.i18n_marketplace_suggestions_dismiss_tooltip );
|
||||
dismissButton.setAttribute( 'href', '#' );
|
||||
dismissButton.onclick = function( event ) {
|
||||
event.preventDefault();
|
||||
dismissSuggestion( context, product, promoted, url, suggestionSlug );
|
||||
};
|
||||
|
||||
return dismissButton;
|
||||
}
|
||||
|
||||
function addUTMParameters( context, url ) {
|
||||
var utmParams = {
|
||||
utm_source: 'unknown',
|
||||
utm_campaign: 'marketplacesuggestions',
|
||||
utm_medium: 'product'
|
||||
};
|
||||
var sourceContextMap = {
|
||||
'productstable': [
|
||||
'products-list-inline'
|
||||
],
|
||||
'productsempty': [
|
||||
'products-list-empty-header',
|
||||
'products-list-empty-footer',
|
||||
'products-list-empty-body'
|
||||
],
|
||||
'ordersempty': [
|
||||
'orders-list-empty-header',
|
||||
'orders-list-empty-footer',
|
||||
'orders-list-empty-body'
|
||||
],
|
||||
'editproduct': [
|
||||
'product-edit-meta-tab-header',
|
||||
'product-edit-meta-tab-footer',
|
||||
'product-edit-meta-tab-body'
|
||||
]
|
||||
};
|
||||
var utmSource = _.findKey( sourceContextMap, function( sourceInfo ) {
|
||||
return _.contains( sourceInfo, context );
|
||||
} );
|
||||
if ( utmSource ) {
|
||||
utmParams.utm_source = utmSource;
|
||||
}
|
||||
|
||||
return url + '?' + jQuery.param( utmParams );
|
||||
}
|
||||
|
||||
// Render DOM element for suggestion linkout, optionally with button style.
|
||||
function renderLinkout( context, product, promoted, slug, url, text, isButton ) {
|
||||
var linkoutButton = document.createElement( 'a' );
|
||||
|
||||
var utmUrl = addUTMParameters( context, url );
|
||||
linkoutButton.setAttribute( 'href', utmUrl );
|
||||
linkoutButton.setAttribute( 'target', 'blank' );
|
||||
linkoutButton.textContent = text;
|
||||
|
||||
linkoutButton.onclick = function() {
|
||||
window.wcTracks.recordEvent( 'marketplace_suggestion_clicked', {
|
||||
suggestion_slug: slug,
|
||||
context: context,
|
||||
product: product || '',
|
||||
promoted: promoted || '',
|
||||
target: url || ''
|
||||
} );
|
||||
};
|
||||
|
||||
if ( isButton ) {
|
||||
linkoutButton.classList.add( 'button' );
|
||||
} else {
|
||||
linkoutButton.classList.add( 'linkout' );
|
||||
var linkoutIcon = document.createElement( 'span' );
|
||||
linkoutIcon.classList.add( 'dashicons', 'dashicons-external' );
|
||||
linkoutButton.appendChild( linkoutIcon );
|
||||
}
|
||||
|
||||
return linkoutButton;
|
||||
}
|
||||
|
||||
// Render DOM element for suggestion icon image.
|
||||
function renderSuggestionIcon( iconUrl ) {
|
||||
if ( ! iconUrl ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var image = document.createElement( 'img' );
|
||||
image.src = iconUrl;
|
||||
image.classList.add( 'marketplace-suggestion-icon' );
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
// Render DOM elements for suggestion content.
|
||||
function renderSuggestionContent( slug, title, copy ) {
|
||||
var container = document.createElement( 'div' );
|
||||
|
||||
container.classList.add( 'marketplace-suggestion-container-content' );
|
||||
|
||||
if ( title ) {
|
||||
var titleHeading = document.createElement( 'h4' );
|
||||
titleHeading.textContent = title;
|
||||
container.appendChild( titleHeading );
|
||||
}
|
||||
|
||||
if ( copy ) {
|
||||
var body = document.createElement( 'p' );
|
||||
body.textContent = copy;
|
||||
container.appendChild( body );
|
||||
}
|
||||
|
||||
// Conditionally add in a Manage suggestions link to product edit
|
||||
// metabox footer (based on suggestion slug).
|
||||
var slugsWithManage = [
|
||||
'product-edit-empty-footer-browse-all',
|
||||
'product-edit-meta-tab-footer-browse-all'
|
||||
];
|
||||
if ( -1 !== slugsWithManage.indexOf( slug ) ) {
|
||||
container.classList.add( 'has-manage-link' );
|
||||
|
||||
var manageSuggestionsLink = document.createElement( 'a' );
|
||||
manageSuggestionsLink.classList.add( 'marketplace-suggestion-manage-link', 'linkout' );
|
||||
manageSuggestionsLink.setAttribute(
|
||||
'href',
|
||||
marketplace_suggestions.manage_suggestions_url
|
||||
);
|
||||
manageSuggestionsLink.textContent = marketplace_suggestions.i18n_marketplace_suggestions_manage_suggestions;
|
||||
|
||||
container.appendChild( manageSuggestionsLink );
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
// Render DOM elements for suggestion call-to-action – button or link with dismiss 'x'.
|
||||
function renderSuggestionCTA( context, product, promoted, slug, url, linkText, linkIsButton, allowDismiss ) {
|
||||
var container = document.createElement( 'div' );
|
||||
|
||||
if ( ! linkText ) {
|
||||
linkText = marketplace_suggestions.i18n_marketplace_suggestions_default_cta;
|
||||
}
|
||||
|
||||
container.classList.add( 'marketplace-suggestion-container-cta' );
|
||||
if ( url && linkText ) {
|
||||
var linkoutElement = renderLinkout( context, product, promoted, slug, url, linkText, linkIsButton );
|
||||
container.appendChild( linkoutElement );
|
||||
}
|
||||
|
||||
if ( allowDismiss ) {
|
||||
container.appendChild( renderDismissButton( context, product, promoted, url, slug ) );
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
// Render a "list item" style suggestion.
|
||||
// These are used in onboarding style contexts, e.g. products list empty state.
|
||||
function renderListItem( context, product, promoted, slug, iconUrl, title, copy, url, linkText, linkIsButton, allowDismiss ) {
|
||||
var container = document.createElement( 'div' );
|
||||
container.classList.add( 'marketplace-suggestion-container' );
|
||||
container.dataset.suggestionSlug = slug;
|
||||
|
||||
var icon = renderSuggestionIcon( iconUrl );
|
||||
if ( icon ) {
|
||||
container.appendChild( icon );
|
||||
}
|
||||
container.appendChild(
|
||||
renderSuggestionContent( slug, title, copy )
|
||||
);
|
||||
container.appendChild(
|
||||
renderSuggestionCTA( context, product, promoted, slug, url, linkText, linkIsButton, allowDismiss )
|
||||
);
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
// Filter suggestion data to remove less-relevant suggestions.
|
||||
function getRelevantPromotions( marketplaceSuggestionsApiData, displayContext ) {
|
||||
// select based on display context
|
||||
var promos = _.filter( marketplaceSuggestionsApiData, function( promo ) {
|
||||
if ( _.isArray( promo.context ) ) {
|
||||
return _.contains( promo.context, displayContext );
|
||||
}
|
||||
return ( displayContext === promo.context );
|
||||
} );
|
||||
|
||||
// hide promos the user has dismissed
|
||||
promos = _.filter( promos, function( promo ) {
|
||||
return ! _.contains( marketplace_suggestions.dismissed_suggestions, promo.slug );
|
||||
} );
|
||||
|
||||
// hide promos for things the user already has installed
|
||||
promos = _.filter( promos, function( promo ) {
|
||||
return ! _.contains( marketplace_suggestions.active_plugins, promo.product );
|
||||
} );
|
||||
|
||||
// hide promos that are not applicable based on user's installed extensions
|
||||
promos = _.filter( promos, function( promo ) {
|
||||
if ( ! promo['show-if-active'] ) {
|
||||
// this promotion is relevant to all
|
||||
return true;
|
||||
}
|
||||
|
||||
// if the user has any of the prerequisites, show the promo
|
||||
return ( _.intersection( marketplace_suggestions.active_plugins, promo['show-if-active'] ).length > 0 );
|
||||
} );
|
||||
|
||||
return promos;
|
||||
}
|
||||
|
||||
// Show and hide page elements dependent on suggestion state.
|
||||
function hidePageElementsForSuggestionState( usedSuggestionsContexts ) {
|
||||
var showingEmptyStateSuggestions = _.intersection(
|
||||
usedSuggestionsContexts,
|
||||
[ 'products-list-empty-body', 'orders-list-empty-body' ]
|
||||
).length > 0;
|
||||
|
||||
// Streamline onboarding UI if we're in 'empty state' welcome mode.
|
||||
if ( showingEmptyStateSuggestions ) {
|
||||
$( '#screen-meta-links' ).hide();
|
||||
$( '#wpfooter' ).hide();
|
||||
}
|
||||
|
||||
// Hide the header & footer, they don't make sense without specific promotion content
|
||||
if ( ! showingEmptyStateSuggestions ) {
|
||||
$( '.marketplace-suggestions-container[data-marketplace-suggestions-context="products-list-empty-header"]' ).hide();
|
||||
$( '.marketplace-suggestions-container[data-marketplace-suggestions-context="products-list-empty-footer"]' ).hide();
|
||||
$( '.marketplace-suggestions-container[data-marketplace-suggestions-context="orders-list-empty-header"]' ).hide();
|
||||
$( '.marketplace-suggestions-container[data-marketplace-suggestions-context="orders-list-empty-footer"]' ).hide();
|
||||
}
|
||||
}
|
||||
|
||||
// Streamline the product edit suggestions tab dependent on what's visible.
|
||||
function tidyProductEditMetabox() {
|
||||
var productMetaboxSuggestions = $(
|
||||
'.marketplace-suggestions-container[data-marketplace-suggestions-context="product-edit-meta-tab-body"]'
|
||||
).children();
|
||||
if ( 0 >= productMetaboxSuggestions.length ) {
|
||||
var metaboxSuggestionsUISelector =
|
||||
'.marketplace-suggestions-container[data-marketplace-suggestions-context="product-edit-meta-tab-body"]';
|
||||
metaboxSuggestionsUISelector +=
|
||||
', .marketplace-suggestions-container[data-marketplace-suggestions-context="product-edit-meta-tab-header"]';
|
||||
metaboxSuggestionsUISelector +=
|
||||
', .marketplace-suggestions-container[data-marketplace-suggestions-context="product-edit-meta-tab-footer"]';
|
||||
$( metaboxSuggestionsUISelector ).fadeOut( {
|
||||
complete: function() {
|
||||
$( '.marketplace-suggestions-metabox-nosuggestions-placeholder' ).fadeIn();
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function addManageSuggestionsTracksHandler() {
|
||||
$( 'a.marketplace-suggestion-manage-link' ).on( 'click', function() {
|
||||
window.wcTracks.recordEvent( 'marketplace_suggestions_manage_clicked' );
|
||||
} );
|
||||
}
|
||||
|
||||
function isContextHiddenOnPageLoad( context ) {
|
||||
// Some suggestions are not visible on page load;
|
||||
// e.g. the user reveals them by selecting a tab.
|
||||
var revealableSuggestionsContexts = [
|
||||
'product-edit-meta-tab-header',
|
||||
'product-edit-meta-tab-body',
|
||||
'product-edit-meta-tab-footer'
|
||||
];
|
||||
return _.includes( revealableSuggestionsContexts, context );
|
||||
}
|
||||
|
||||
// track the current product data tab to avoid over-tracking suggestions
|
||||
var currentTab = false;
|
||||
|
||||
// Render suggestion data in appropriate places in UI.
|
||||
function displaySuggestions( marketplaceSuggestionsApiData ) {
|
||||
var usedSuggestionsContexts = [];
|
||||
|
||||
// iterate over all suggestions containers, rendering promos
|
||||
$( '.marketplace-suggestions-container' ).each( function() {
|
||||
// determine the context / placement we're populating
|
||||
var context = this.dataset.marketplaceSuggestionsContext;
|
||||
|
||||
// find promotions that target this context
|
||||
var promos = getRelevantPromotions( marketplaceSuggestionsApiData, context );
|
||||
|
||||
// shuffle/randomly select five suggestions to display
|
||||
var suggestionsToDisplay = _.sample( promos, 5 );
|
||||
|
||||
// render the promo content
|
||||
for ( var i in suggestionsToDisplay ) {
|
||||
|
||||
var linkText = suggestionsToDisplay[ i ]['link-text'];
|
||||
var linkoutIsButton = true;
|
||||
if ( suggestionsToDisplay[ i ]['link-text'] ) {
|
||||
linkText = suggestionsToDisplay[ i ]['link-text'];
|
||||
linkoutIsButton = false;
|
||||
}
|
||||
|
||||
// dismiss is allowed by default
|
||||
var allowDismiss = true;
|
||||
if ( suggestionsToDisplay[ i ]['allow-dismiss'] === false ) {
|
||||
allowDismiss = false;
|
||||
}
|
||||
|
||||
var content = renderListItem(
|
||||
context,
|
||||
suggestionsToDisplay[ i ].product,
|
||||
suggestionsToDisplay[ i ].promoted,
|
||||
suggestionsToDisplay[ i ].slug,
|
||||
suggestionsToDisplay[ i ].icon,
|
||||
suggestionsToDisplay[ i ].title,
|
||||
suggestionsToDisplay[ i ].copy,
|
||||
suggestionsToDisplay[ i ].url,
|
||||
linkText,
|
||||
linkoutIsButton,
|
||||
allowDismiss
|
||||
);
|
||||
$( this ).append( content );
|
||||
$( this ).addClass( 'showing-suggestion' );
|
||||
usedSuggestionsContexts.push( context );
|
||||
|
||||
if ( ! isContextHiddenOnPageLoad( context ) ) {
|
||||
// Fire 'displayed' tracks events for immediately visible suggestions.
|
||||
window.wcTracks.recordEvent( 'marketplace_suggestion_displayed', {
|
||||
suggestion_slug: suggestionsToDisplay[ i ].slug,
|
||||
context: context,
|
||||
product: suggestionsToDisplay[ i ].product || '',
|
||||
promoted: suggestionsToDisplay[ i ].promoted || '',
|
||||
target: suggestionsToDisplay[ i ].url || ''
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
// Track when suggestions are displayed (and not already visible).
|
||||
$( 'ul.product_data_tabs li.marketplace-suggestions_options a' ).click( function( e ) {
|
||||
e.preventDefault();
|
||||
|
||||
if ( '#marketplace_suggestions' === currentTab ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! isContextHiddenOnPageLoad( context ) ) {
|
||||
// We've already fired 'displayed' event above.
|
||||
return;
|
||||
}
|
||||
|
||||
for ( var i in suggestionsToDisplay ) {
|
||||
window.wcTracks.recordEvent( 'marketplace_suggestion_displayed', {
|
||||
suggestion_slug: suggestionsToDisplay[ i ].slug,
|
||||
context: context,
|
||||
product: suggestionsToDisplay[ i ].product || '',
|
||||
promoted: suggestionsToDisplay[ i ].promoted || '',
|
||||
target: suggestionsToDisplay[ i ].url || ''
|
||||
} );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
hidePageElementsForSuggestionState( usedSuggestionsContexts );
|
||||
tidyProductEditMetabox();
|
||||
}
|
||||
|
||||
if ( marketplace_suggestions.suggestions_data ) {
|
||||
displaySuggestions( marketplace_suggestions.suggestions_data );
|
||||
|
||||
// track the current product data tab to avoid over-reporting suggestion views
|
||||
$( 'ul.product_data_tabs' ).on( 'click', 'li a', function( e ) {
|
||||
e.preventDefault();
|
||||
currentTab = $( this ).attr( 'href' );
|
||||
} );
|
||||
}
|
||||
|
||||
addManageSuggestionsTracksHandler();
|
||||
});
|
||||
|
||||
})( jQuery, marketplace_suggestions, ajaxurl );
|
|
@ -43,7 +43,8 @@ jQuery( function ( $ ) {
|
|||
input_name = $state.attr( 'name' ),
|
||||
input_id = $state.attr( 'id' ),
|
||||
value = $this.data( 'woocommerce.stickState-' + country ) ? $this.data( 'woocommerce.stickState-' + country ) : $state.val(),
|
||||
placeholder = $state.attr( 'placeholder' );
|
||||
placeholder = $state.attr( 'placeholder' ),
|
||||
$newstate;
|
||||
|
||||
if ( stickValue ){
|
||||
$this.data( 'woocommerce.stickState-' + country, value );
|
||||
|
@ -53,22 +54,37 @@ jQuery( function ( $ ) {
|
|||
$parent.show().find( '.select2-container' ).remove();
|
||||
|
||||
if ( ! $.isEmptyObject( wc_meta_boxes_order.states[ country ] ) ) {
|
||||
var $states_select = $( '<select name="' + input_name + '" id="' + input_id + '" class="js_field-state select short" placeholder="' + placeholder + '"></select>' ),
|
||||
state = wc_meta_boxes_order.states[ country ];
|
||||
var state = wc_meta_boxes_order.states[ country ],
|
||||
$defaultOption = $( '<option value=""></option>' )
|
||||
.text( woocommerce_admin_meta_boxes_order.i18n_select_state_text );
|
||||
|
||||
$states_select.append( $( '<option value="">' + woocommerce_admin_meta_boxes_order.i18n_select_state_text + '</option>' ) );
|
||||
$newstate = $( '<select></select>' )
|
||||
.prop( 'id', input_id )
|
||||
.prop( 'name', input_name )
|
||||
.prop( 'placeholder', placeholder )
|
||||
.addClass( 'js_field-state select short' )
|
||||
.append( $defaultOption );
|
||||
|
||||
$.each( state, function( index ) {
|
||||
$states_select.append( $( '<option value="' + index + '">' + state[ index ] + '</option>' ) );
|
||||
} );
|
||||
$.each( state, function( index ) {
|
||||
var $option = $( '<option></option>' )
|
||||
.prop( 'value', index )
|
||||
.text( state[ index ] );
|
||||
$newstate.append( $option );
|
||||
} );
|
||||
|
||||
$states_select.val( value );
|
||||
$newstate.val( value );
|
||||
|
||||
$state.replaceWith( $states_select );
|
||||
$state.replaceWith( $newstate );
|
||||
|
||||
$states_select.show().selectWoo().hide().change();
|
||||
$newstate.show().selectWoo().hide().change();
|
||||
} else {
|
||||
$state.replaceWith( '<input type="text" class="js_field-state" name="' + input_name + '" id="' + input_id + '" value="' + value + '" placeholder="' + placeholder + '" />' );
|
||||
$newstate = $( '<input type="text" />' )
|
||||
.prop( 'id', input_id )
|
||||
.prop( 'name', input_name )
|
||||
.prop( 'placeholder', placeholder )
|
||||
.addClass( 'js_field-state' )
|
||||
.val( '' );
|
||||
$state.replaceWith( $newstate );
|
||||
}
|
||||
|
||||
// This event has a typo - deprecated in 2.5.0
|
||||
|
@ -384,13 +400,16 @@ jQuery( function ( $ ) {
|
|||
if ( value != null ) {
|
||||
wc_meta_boxes_order_items.block();
|
||||
|
||||
var data = {
|
||||
var user_id = $( '#customer_user' ).val();
|
||||
|
||||
var data = $.extend( {}, wc_meta_boxes_order_items.get_taxable_address(), {
|
||||
action : 'woocommerce_add_coupon_discount',
|
||||
dataType : 'json',
|
||||
order_id : woocommerce_admin_meta_boxes.post_id,
|
||||
security : woocommerce_admin_meta_boxes.order_item_nonce,
|
||||
coupon : value
|
||||
};
|
||||
coupon : value,
|
||||
user_id : user_id
|
||||
} );
|
||||
|
||||
$.post( woocommerce_admin_meta_boxes.ajax_url, data, function( response ) {
|
||||
if ( response.success ) {
|
||||
|
@ -411,13 +430,13 @@ jQuery( function ( $ ) {
|
|||
var $this = $( this );
|
||||
wc_meta_boxes_order_items.block();
|
||||
|
||||
var data = {
|
||||
var data = $.extend( {}, wc_meta_boxes_order_items.get_taxable_address(), {
|
||||
action : 'woocommerce_remove_order_coupon',
|
||||
dataType : 'json',
|
||||
order_id : woocommerce_admin_meta_boxes.post_id,
|
||||
security : woocommerce_admin_meta_boxes.order_item_nonce,
|
||||
coupon : $this.data( 'code' )
|
||||
};
|
||||
} );
|
||||
|
||||
$.post( woocommerce_admin_meta_boxes.ajax_url, data, function( response ) {
|
||||
if ( response.success ) {
|
||||
|
|
|
@ -62,11 +62,16 @@ jQuery( function( $ ) {
|
|||
*/
|
||||
variable_manage_stock: function() {
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.show_if_variation_manage_stock' ).hide();
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.hide_if_variation_manage_stock' ).show();
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.variable_stock_status' ).show();
|
||||
|
||||
if ( $( this ).is( ':checked' ) ) {
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.show_if_variation_manage_stock' ).show();
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.hide_if_variation_manage_stock' ).hide();
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.variable_stock_status' ).hide();
|
||||
}
|
||||
|
||||
// Parent level.
|
||||
if ( $( 'input#_manage_stock:checked' ).length ) {
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.variable_stock_status' ).hide();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -113,11 +118,12 @@ jQuery( function( $ ) {
|
|||
// Init TipTip
|
||||
$( '#tiptip_holder' ).removeAttr( 'style' );
|
||||
$( '#tiptip_arrow' ).removeAttr( 'style' );
|
||||
$( '.woocommerce_variations .tips, .woocommerce_variations .help_tip, .woocommerce_variations .woocommerce-help-tip', wrapper ).tipTip({
|
||||
'attribute': 'data-tip',
|
||||
'fadeIn': 50,
|
||||
'fadeOut': 50,
|
||||
'delay': 200
|
||||
$( '.woocommerce_variations .tips, .woocommerce_variations .help_tip, .woocommerce_variations .woocommerce-help-tip', wrapper )
|
||||
.tipTip({
|
||||
'attribute': 'data-tip',
|
||||
'fadeIn': 50,
|
||||
'fadeOut': 50,
|
||||
'delay': 200
|
||||
});
|
||||
|
||||
// Datepicker fields
|
||||
|
@ -190,7 +196,10 @@ jQuery( function( $ ) {
|
|||
offset = parseInt( ( current_page - 1 ) * woocommerce_admin_meta_boxes_variations.variations_per_page, 10 );
|
||||
|
||||
$( '.woocommerce_variations .woocommerce_variation' ).each( function ( index, el ) {
|
||||
$( '.variation_menu_order', el ).val( parseInt( $( el ).index( '.woocommerce_variations .woocommerce_variation' ), 10 ) + 1 + offset ).change();
|
||||
$( '.variation_menu_order', el )
|
||||
.val( parseInt( $( el )
|
||||
.index( '.woocommerce_variations .woocommerce_variation' ), 10 ) + 1 + offset )
|
||||
.change();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -254,14 +263,16 @@ jQuery( function( $ ) {
|
|||
if ( $button.is( '.remove' ) ) {
|
||||
|
||||
$( '.upload_image_id', wc_meta_boxes_product_variations_media.setting_variation_image ).val( '' ).change();
|
||||
wc_meta_boxes_product_variations_media.setting_variation_image.find( 'img' ).eq( 0 ).attr( 'src', woocommerce_admin_meta_boxes_variations.woocommerce_placeholder_img_src );
|
||||
wc_meta_boxes_product_variations_media.setting_variation_image.find( 'img' ).eq( 0 )
|
||||
.attr( 'src', woocommerce_admin_meta_boxes_variations.woocommerce_placeholder_img_src );
|
||||
wc_meta_boxes_product_variations_media.setting_variation_image.find( '.upload_image_button' ).removeClass( 'remove' );
|
||||
|
||||
} else {
|
||||
|
||||
// If the media frame already exists, reopen it.
|
||||
if ( wc_meta_boxes_product_variations_media.variable_image_frame ) {
|
||||
wc_meta_boxes_product_variations_media.variable_image_frame.uploader.uploader.param( 'post_id', wc_meta_boxes_product_variations_media.setting_variation_image_id );
|
||||
wc_meta_boxes_product_variations_media.variable_image_frame.uploader.uploader
|
||||
.param( 'post_id', wc_meta_boxes_product_variations_media.setting_variation_image_id );
|
||||
wc_meta_boxes_product_variations_media.variable_image_frame.open();
|
||||
return;
|
||||
} else {
|
||||
|
@ -286,7 +297,8 @@ jQuery( function( $ ) {
|
|||
// When an image is selected, run a callback.
|
||||
wc_meta_boxes_product_variations_media.variable_image_frame.on( 'select', function () {
|
||||
|
||||
var attachment = wc_meta_boxes_product_variations_media.variable_image_frame.state().get( 'selection' ).first().toJSON(),
|
||||
var attachment = wc_meta_boxes_product_variations_media.variable_image_frame.state()
|
||||
.get( 'selection' ).first().toJSON(),
|
||||
url = attachment.sizes && attachment.sizes.thumbnail ? attachment.sizes.thumbnail.url : attachment.url;
|
||||
|
||||
$( '.upload_image_id', wc_meta_boxes_product_variations_media.setting_variation_image ).val( attachment.id ).change();
|
||||
|
@ -323,7 +335,8 @@ jQuery( function( $ ) {
|
|||
$( '#variable_product_options' )
|
||||
.on( 'click', 'button.save-variation-changes', this.save_variations )
|
||||
.on( 'click', 'button.cancel-variation-changes', this.cancel_variations )
|
||||
.on( 'click', '.remove_variation', this.remove_variation );
|
||||
.on( 'click', '.remove_variation', this.remove_variation )
|
||||
.on( 'click','.downloadable_files a.delete', this.input_changed );
|
||||
|
||||
$( document.body )
|
||||
.on( 'change', '#variable_product_options .woocommerce_variations :input', this.input_changed )
|
||||
|
@ -548,7 +561,8 @@ jQuery( function( $ ) {
|
|||
cancel_variations: function() {
|
||||
var current = parseInt( $( '#variable_product_options' ).find( '.woocommerce_variations' ).attr( 'data-page' ), 10 );
|
||||
|
||||
$( '#variable_product_options' ).find( '.woocommerce_variations .variation-needs-update' ).removeClass( 'variation-needs-update' );
|
||||
$( '#variable_product_options' ).find( '.woocommerce_variations .variation-needs-update' )
|
||||
.removeClass( 'variation-needs-update' );
|
||||
$( '.variations-defaults select' ).each( function() {
|
||||
$( this ).val( $( this ).attr( 'data-current' ) );
|
||||
});
|
||||
|
@ -612,7 +626,9 @@ jQuery( function( $ ) {
|
|||
$.post( woocommerce_admin_meta_boxes_variations.ajax_url, data, function() {
|
||||
var wrapper = $( '#variable_product_options' ).find( '.woocommerce_variations' ),
|
||||
current_page = parseInt( wrapper.attr( 'data-page' ), 10 ),
|
||||
total_pages = Math.ceil( ( parseInt( wrapper.attr( 'data-total' ), 10 ) - 1 ) / woocommerce_admin_meta_boxes_variations.variations_per_page ),
|
||||
total_pages = Math.ceil( (
|
||||
parseInt( wrapper.attr( 'data-total' ), 10 ) - 1
|
||||
) / woocommerce_admin_meta_boxes_variations.variations_per_page ),
|
||||
page = 1;
|
||||
|
||||
$( '#woocommerce-product-data' ).trigger( 'woocommerce_variations_removed' );
|
||||
|
@ -721,7 +737,8 @@ jQuery( function( $ ) {
|
|||
if ( window.confirm( woocommerce_admin_meta_boxes_variations.i18n_delete_all_variations ) ) {
|
||||
if ( window.confirm( woocommerce_admin_meta_boxes_variations.i18n_last_warning ) ) {
|
||||
data.allowed = true;
|
||||
changes = parseInt( $( '#variable_product_options' ).find( '.woocommerce_variations' ).attr( 'data-total' ), 10 ) * -1;
|
||||
changes = parseInt( $( '#variable_product_options' ).find( '.woocommerce_variations' )
|
||||
.attr( 'data-total' ), 10 ) * -1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -240,6 +240,8 @@ jQuery( function( $ ) {
|
|||
$( 'div.stock_fields' ).hide();
|
||||
$( 'p.stock_status_field:not( .hide_if_' + product_type + ' )' ).show();
|
||||
}
|
||||
|
||||
$( 'input.variable_manage_stock' ).change();
|
||||
}).change();
|
||||
|
||||
// Date picker fields.
|
||||
|
@ -470,13 +472,13 @@ jQuery( function( $ ) {
|
|||
show_and_hide_panels();
|
||||
|
||||
// Make sure the dropdown is not disabled for empty value attributes.
|
||||
var nr_elements = original_data.length / 6;
|
||||
for ( var i = 0; i < nr_elements; i++ ) {
|
||||
if ( typeof( original_data ) !== 'undefined' && original_data[ i * 6 + 2 ].value === '' ) {
|
||||
$( 'select.attribute_taxonomy' )
|
||||
.find( 'option[value="' + original_data[ i * 6 ].value + '"]' ).removeAttr( 'disabled' );
|
||||
$( 'select.attribute_taxonomy' ).find( 'option' ).prop( 'disabled', false );
|
||||
|
||||
$( '.product_attributes .woocommerce_attribute' ).each( function( index, el ) {
|
||||
if ( $( el ).css( 'display' ) !== 'none' && $( el ).is( '.taxonomy' ) ) {
|
||||
$( 'select.attribute_taxonomy' ).find( 'option[value="' + $( el ).data( 'taxonomy' ) + '"]' ).prop( 'disabled', true );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Reload variations panel.
|
||||
var this_page = window.location.toString();
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(function(o){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()})});
|
||||
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()})});
|
|
@ -138,7 +138,7 @@ jQuery(function( $ ) {
|
|||
var groupby = $( this ) .data( 'groupby' );
|
||||
var index_type = $( this ).data( 'index_type' );
|
||||
var export_format = $( this ).data( 'export' );
|
||||
var csv_data = 'data:text/csv;charset=utf-8,\uFEFF';
|
||||
var csv_data = '';
|
||||
var s, series_data, d;
|
||||
|
||||
if ( 'table' === export_format ) {
|
||||
|
@ -243,8 +243,9 @@ jQuery(function( $ ) {
|
|||
} );
|
||||
}
|
||||
|
||||
csv_data = 'data:text/csv;charset=utf-8,\uFEFF' + encodeURIComponent( csv_data );
|
||||
// Set data as href and return
|
||||
$( this ).attr( 'href', encodeURI( csv_data ) );
|
||||
$( this ).attr( 'href', csv_data );
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -161,12 +161,28 @@
|
|||
lastRow = $( this ).find( 'tbody tr:last' ),
|
||||
firstRow = $( this ).find( 'tbody tr:first' );
|
||||
|
||||
table.find( '.wc-item-reorder-nav .wc-move-disabled' ).removeClass( 'wc-move-disabled' ).attr( { 'tabindex': '0', 'aria-hidden': 'false' } );
|
||||
firstRow.find( '.wc-item-reorder-nav .wc-move-up' ).addClass( 'wc-move-disabled' ).attr( { 'tabindex': '-1', 'aria-hidden': 'true' } );
|
||||
lastRow.find( '.wc-item-reorder-nav .wc-move-down' ).addClass( 'wc-move-disabled' ).attr( { 'tabindex': '-1', 'aria-hidden': 'true' } );
|
||||
table.find( '.wc-item-reorder-nav .wc-move-disabled' ).removeClass( 'wc-move-disabled' )
|
||||
.attr( { 'tabindex': '0', 'aria-hidden': 'false' } );
|
||||
firstRow.find( '.wc-item-reorder-nav .wc-move-up' ).addClass( 'wc-move-disabled' )
|
||||
.attr( { 'tabindex': '-1', 'aria-hidden': 'true' } );
|
||||
lastRow.find( '.wc-item-reorder-nav .wc-move-down' ).addClass( 'wc-move-disabled' )
|
||||
.attr( { 'tabindex': '-1', 'aria-hidden': 'true' } );
|
||||
} );
|
||||
|
||||
$( '.wc-item-reorder-nav').closest( 'table' ).trigger( 'updateMoveButtons' );
|
||||
|
||||
|
||||
$( '.submit button' ).on( 'click', function() {
|
||||
if (
|
||||
$( 'select#woocommerce_allowed_countries' ).val() === 'specific' &&
|
||||
! $( '[name="woocommerce_specific_allowed_countries[]"]' ).val()
|
||||
) {
|
||||
if ( window.confirm( woocommerce_settings_params.i18n_no_specific_countries_selected ) ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} );
|
||||
|
||||
});
|
||||
})( jQuery, woocommerce_settings_params, wp );
|
||||
|
|
|
@ -36,7 +36,10 @@ jQuery( function ( $ ) {
|
|||
$parent = $state.parent(),
|
||||
input_name = $state.attr( 'name' ),
|
||||
input_id = $state.attr( 'id' ),
|
||||
value = $this.data( 'woocommerce.stickState-' + country ) ? $this.data( 'woocommerce.stickState-' + country ) : $state.val();
|
||||
stickstatefield = 'woocommerce.stickState-' + country,
|
||||
value = $this.data( stickstatefield ) ? $this.data( stickstatefield ) : $state.val(),
|
||||
placeholder = $state.attr( 'placeholder' ),
|
||||
$newstate;
|
||||
|
||||
if ( stickValue ){
|
||||
$this.data( 'woocommerce.stickState-' + country, value );
|
||||
|
@ -46,22 +49,37 @@ jQuery( function ( $ ) {
|
|||
$parent.show().find( '.select2-container' ).remove();
|
||||
|
||||
if ( ! $.isEmptyObject( wc_users_fields.states[ country ] ) ) {
|
||||
var $states_select = $( '<select name="' + input_name + '" id="' + input_id + '" class="js_field-state" style="width: 25em;"></select>' ),
|
||||
state = wc_users_fields.states[ country ];
|
||||
var state = wc_users_fields.states[ country ],
|
||||
$defaultOption = $( '<option value=""></option>' )
|
||||
.text( wc_users_fields.i18n_select_state_text );
|
||||
|
||||
$states_select.append( $( '<option value="">' + wc_users_params.i18n_select_state_text + '</option>' ) );
|
||||
$newstate = $( '<select style="width: 25em;"></select>' )
|
||||
.prop( 'id', input_id )
|
||||
.prop( 'name', input_name )
|
||||
.prop( 'placeholder', placeholder )
|
||||
.addClass( 'js_field-state' )
|
||||
.append( $defaultOption );
|
||||
|
||||
$.each( state, function( index ) {
|
||||
$states_select.append( $( '<option value="' + index + '">' + state[ index ] + '</option>' ) );
|
||||
var $option = $( '<option></option>' )
|
||||
.prop( 'value', index )
|
||||
.text( state[ index ] );
|
||||
$newstate.append( $option );
|
||||
} );
|
||||
|
||||
$states_select.val( value );
|
||||
$newstate.val( value );
|
||||
|
||||
$state.replaceWith( $states_select );
|
||||
$state.replaceWith( $newstate );
|
||||
|
||||
$states_select.show().selectWoo().hide().change();
|
||||
$newstate.show().selectWoo().hide().change();
|
||||
} else {
|
||||
$state.replaceWith( '<input type="text" class="js_field-state" name="' + input_name + '" id="' + input_id + '" value="' + value + '" />' );
|
||||
$newstate = $( '<input type="text" />' )
|
||||
.prop( 'id', input_id )
|
||||
.prop( 'name', input_name )
|
||||
.prop( 'placeholder', placeholder )
|
||||
.addClass( 'js_field-state regular-text' )
|
||||
.val( value );
|
||||
$state.replaceWith( $newstate );
|
||||
}
|
||||
|
||||
// This event has a typo - deprecated in 2.5.0
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(function(d){var p={states:null,init:function(){"undefined"!=typeof wc_users_params.countries&&(this.states=d.parseJSON(wc_users_params.countries.replace(/"/g,'"'))),d(".js_field-country").selectWoo().change(this.change_country),d(".js_field-country").trigger("change",[!0]),d(document.body).on("change","select.js_field-state",this.change_state),d(document.body).on("click","button.js_copy-billing",this.copy_billing)},change_country:function(e,t){if(void 0===t&&(t=!1),null!==p.states){var a=d(this),n=a.val(),i=a.parents(".form-table").find(":input.js_field-state"),c=i.parent(),s=i.attr("name"),o=i.attr("id"),l=a.data("woocommerce.stickState-"+n)?a.data("woocommerce.stickState-"+n):i.val();if(t&&a.data("woocommerce.stickState-"+n,l),c.show().find(".select2-container").remove(),d.isEmptyObject(p.states[n]))i.replaceWith('<input type="text" class="js_field-state" name="'+s+'" id="'+o+'" value="'+l+'" />');else{var r=d('<select name="'+s+'" id="'+o+'" class="js_field-state" style="width: 25em;"></select>'),u=p.states[n];r.append(d('<option value="">'+wc_users_params.i18n_select_state_text+"</option>")),d.each(u,function(e){r.append(d('<option value="'+e+'">'+u[e]+"</option>"))}),r.val(l),i.replaceWith(r),r.show().selectWoo().hide().change()}d(document.body).trigger("contry-change.woocommerce",[n,d(this).closest("div")]),d(document.body).trigger("country-change.woocommerce",[n,d(this).closest("div")])}},change_state:function(){var e=d(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(),d("#fieldset-billing").find("input, select").each(function(e,t){var a=t.name.replace(/^billing_/,"shipping_"),n=d('[name="'+a+'"]');n.length&&n.val(t.value).trigger("change")})}};p.init()});
|
||||
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 +1 @@
|
|||
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 *").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});
|
||||
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});
|
|
@ -67,6 +67,15 @@ jQuery( function( $ ) {
|
|||
}
|
||||
} );
|
||||
|
||||
$( '.wc-wizard-services' ).on( 'keyup', function( e ) {
|
||||
var code = e.keyCode || e.which,
|
||||
$focused = $( document.activeElement );
|
||||
|
||||
if ( $focused.is( '.wc-wizard-service-toggle, .wc-wizard-service-enable' ) && ( 13 === code || 32 === code ) ) {
|
||||
$focused.find( ':input' ).click();
|
||||
}
|
||||
} );
|
||||
|
||||
$( '.wc-wizard-services' ).on( 'click', '.wc-wizard-service-enable', function( e ) {
|
||||
var eventTarget = $( e.target );
|
||||
|
||||
|
|
|
@ -343,4 +343,5 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
})( jQuery, woocommerce_admin );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* jQuery FlexSlider v2.7.1
|
||||
* jQuery FlexSlider v2.7.2
|
||||
* Copyright 2012 WooThemes
|
||||
* Contributing Author: Tyler Smith
|
||||
*/
|
||||
|
@ -236,15 +236,35 @@
|
|||
if (slider.pagingCount > 1) {
|
||||
for (var i = 0; i < slider.pagingCount; i++) {
|
||||
slide = slider.slides.eq(i);
|
||||
if ( undefined === slide.attr( 'data-thumb-alt' ) ) { slide.attr( 'data-thumb-alt', '' ); }
|
||||
var altText = ( '' !== slide.attr( 'data-thumb-alt' ) ) ? altText = ' alt="' + slide.attr( 'data-thumb-alt' ) + '"' : '';
|
||||
item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"' + altText + '/>' : '<a href="#">' + j + '</a>';
|
||||
|
||||
if ( undefined === slide.attr( 'data-thumb-alt' ) ) {
|
||||
slide.attr( 'data-thumb-alt', '' );
|
||||
}
|
||||
|
||||
item = $( '<a></a>' ).attr( 'href', '#' ).text( j );
|
||||
if ( slider.vars.controlNav === "thumbnails" ) {
|
||||
item = $( '<img/>' ).attr( 'src', slide.attr( 'data-thumb' ) );
|
||||
}
|
||||
|
||||
if ( '' !== slide.attr( 'data-thumb-alt' ) ) {
|
||||
item.attr( 'alt', slide.attr( 'data-thumb-alt' ) );
|
||||
}
|
||||
|
||||
if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
|
||||
var captn = slide.attr( 'data-thumbcaption' );
|
||||
if ( '' !== captn && undefined !== captn ) { item += '<span class="' + namespace + 'caption">' + captn + '</span>'; }
|
||||
if ( '' !== captn && undefined !== captn ) {
|
||||
var caption = $('<span></span>' ).addClass( namespace + 'caption' ).text( captn );
|
||||
item.append( caption );
|
||||
}
|
||||
}
|
||||
slider.controlNavScaffold.append('<li>' + item + '</li>');
|
||||
|
||||
var liElement = $( '<li>' );
|
||||
item.appendTo( liElement );
|
||||
liElement.append( '</li>' );
|
||||
|
||||
slider.controlNavScaffold.append(liElement);
|
||||
j++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -357,14 +357,18 @@
|
|||
|
||||
// Attach to matching options by value. This is done to compare
|
||||
// TEXT values rather than any HTML entities.
|
||||
new_attr_select.find( 'option' ).each( function( index, el ) {
|
||||
var option_value = $( this ).val();
|
||||
var $option_elements = new_attr_select.find( 'option' );
|
||||
if ( $option_elements.length ) {
|
||||
for (var i = 0, len = $option_elements.length; i < len; i++) {
|
||||
var $option_element = $( $option_elements[i] ),
|
||||
option_value = $option_element.val();
|
||||
|
||||
if ( attr_val === option_value ) {
|
||||
$( this ).addClass( 'attached ' + variation_active );
|
||||
return false; // break.
|
||||
if ( attr_val === option_value ) {
|
||||
$option_element.addClass( 'attached ' + variation_active );
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// Attach all apart from placeholder.
|
||||
new_attr_select.find( 'option:gt(0)' ).addClass( 'attached ' + variation_active );
|
||||
|
@ -383,7 +387,7 @@
|
|||
selected_attr_val_valid = false;
|
||||
|
||||
if ( 0 !== attached_options_count ) {
|
||||
new_attr_select.find( 'option.attached.enabled' ).each( function( index, el ) {
|
||||
new_attr_select.find( 'option.attached.enabled' ).each( function() {
|
||||
var option_value = $( this ).val();
|
||||
|
||||
if ( selected_attr_val === option_value ) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
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 o={};e.each(a.data(),function(t,a){o[t]=a}),e(document.body).trigger("adding_to_cart",[a,o]),e.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),o,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),o=a.closest(".woocommerce-mini-cart-item");t.preventDefault(),o.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,o,r){(r=void 0!==r&&r)&&(r.removeClass("loading"),r.addClass("added"),wc_add_to_cart_params.is_cart||0!==r.parent().find(".added_to_cart").length||r.after(' <a href="'+wc_add_to_cart_params.cart_url+'" class="added_to_cart wc-forward" title="'+wc_add_to_cart_params.i18n_view_cart+'">'+wc_add_to_cart_params.i18n_view_cart+"</a>"),e(document.body).trigger("wc_cart_button_updated",[r]))},t.prototype.updateCartPage=function(){var t=window.location.toString().replace("add-to-cart","added-to-cart");e(".shop_table.cart").load(t+" .shop_table.cart:eq(0) > *",function(){e(".shop_table.cart").stop(!0).css("opacity","1").unblock(),e(document.body).trigger("cart_page_refreshed")}),e(".cart_totals").load(t+" .cart_totals:eq(0) > *",function(){e(".cart_totals").stop(!0).css("opacity","1").unblock(),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});
|
||||
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});
|
|
@ -22,7 +22,7 @@ jQuery( function( $ ) {
|
|||
}
|
||||
} else {
|
||||
field.find( 'label .required' ).remove();
|
||||
field.removeClass( 'validate-required' );
|
||||
field.removeClass( 'validate-required woocommerce-invalid woocommerce-invalid-required-field' );
|
||||
|
||||
if ( field.find( 'label .optional' ).length === 0 ) {
|
||||
field.find( 'label' ).append( ' <span class="optional">(' + wc_address_i18n_params.i18n_optional_text + ')</span>' );
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(function(s){if("undefined"==typeof wc_address_i18n_params)return!1;var e=wc_address_i18n_params.locale.replace(/"/g,'"'),p=s.parseJSON(e);function f(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"),0===e.find("label .optional").length&&e.find("label").append(' <span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>"))}s(document.body).bind("country_to_state_changing",function(e,a,i){var t,l=i;t="undefined"!=typeof p[a]?p[a]:p["default"];var d=l.find("#billing_postcode_field, #shipping_postcode_field"),r=l.find("#billing_city_field, #shipping_city_field"),n=l.find("#billing_state_field, #shipping_state_field");d.attr("data-o_class")||(d.attr("data-o_class",d.attr("class")),r.attr("data-o_class",r.attr("class")),n.attr("data-o_class",n.attr("class")));var o=s.parseJSON(wc_address_i18n_params.locale_fields);s.each(o,function(e,a){var i=l.find(a),d=s.extend(!0,{},p["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(".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(".select2-selection__placeholder").text(d.label)),"undefined"!=typeof d.required?f(i,d.required):f(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())}),s(".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=s(a).find(".form-row"),d=i.first().parent(),t=0;i.each(function(){s(this).data("priority")||s(this).data("priority",t+1),t=s(this).data("priority")}),i.sort(function(e,a){var i=s(e).data("priority"),d=s(a).data("priority");return d<i?1:i<d?-1:0}),i.detach().appendTo(d)})})});
|
||||
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")});
|
|
@ -38,6 +38,9 @@ jQuery( function( $ ) {
|
|||
var $fragment_refresh = {
|
||||
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( data ) {
|
||||
if ( data && data.fragments ) {
|
||||
|
@ -96,7 +99,9 @@ jQuery( function( $ ) {
|
|||
|
||||
// Refresh when storage changes in another tab
|
||||
$( window ).on( 'storage onstorage', function ( e ) {
|
||||
if ( cart_hash_key === e.originalEvent.key && localStorage.getItem( cart_hash_key ) !== sessionStorage.getItem( cart_hash_key ) ) {
|
||||
if (
|
||||
cart_hash_key === e.originalEvent.key && localStorage.getItem( cart_hash_key ) !== sessionStorage.getItem( cart_hash_key )
|
||||
) {
|
||||
refresh_cart_fragment();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(function(n){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(w){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",success:function(e){e&&e.fragments&&(n.each(e.fragments,function(e,t){n(e).replaceWith(t)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(e.fragments)),s(e.cart_hash),e.cart_hash&&a()),n(document.body).trigger("wc_fragments_refreshed"))}};function r(){n.ajax(e)}if(t){var i=null;n(document.body).on("wc_fragment_refresh updated_wc_div",function(){r()}),n(document.body).on("added_to_cart removed_from_cart",function(e,t,n){var r=sessionStorage.getItem(o);null!==r&&r!==undefined&&""!==r||a(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),s(n)}),n(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(r,864e5)}),n(window).on("storage onstorage",function(e){o===e.originalEvent.key&&localStorage.getItem(o)!==sessionStorage.getItem(o)&&r()}),n(window).on("pageshow",function(e){e.originalEvent.persisted&&(n(".widget_shopping_cart_content").empty(),n(document.body).trigger("wc_fragment_refresh"))});try{var c=n.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,f=(new Date).getTime();if(d<f)throw"Fragment expired";i=setTimeout(r,d-f)}if(!c||!c["div.widget_shopping_cart_content"]||_!==g)throw"No fragment";n.each(c,function(e,t){n(e).replaceWith(t)}),n(document.body).trigger("wc_fragments_loaded")}catch(w){r()}}else r();0<Cookies.get("woocommerce_items_in_cart")?n(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():n(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),n(document.body).on("adding_to_cart",function(){n(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()})});
|
||||
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()})});
|
|
@ -259,10 +259,10 @@ jQuery( function( $ ) {
|
|||
|
||||
var country = $( '#billing_country' ).val(),
|
||||
state = $( '#billing_state' ).val(),
|
||||
postcode = $( 'input#billing_postcode' ).val(),
|
||||
postcode = $( ':input#billing_postcode' ).val(),
|
||||
city = $( '#billing_city' ).val(),
|
||||
address = $( 'input#billing_address_1' ).val(),
|
||||
address_2 = $( 'input#billing_address_2' ).val(),
|
||||
address = $( ':input#billing_address_1' ).val(),
|
||||
address_2 = $( ':input#billing_address_2' ).val(),
|
||||
s_country = country,
|
||||
s_state = state,
|
||||
s_postcode = postcode,
|
||||
|
@ -283,10 +283,10 @@ jQuery( function( $ ) {
|
|||
if ( $( '#ship-to-different-address' ).find( 'input' ).is( ':checked' ) ) {
|
||||
s_country = $( '#shipping_country' ).val();
|
||||
s_state = $( '#shipping_state' ).val();
|
||||
s_postcode = $( 'input#shipping_postcode' ).val();
|
||||
s_postcode = $( ':input#shipping_postcode' ).val();
|
||||
s_city = $( '#shipping_city' ).val();
|
||||
s_address = $( 'input#shipping_address_1' ).val();
|
||||
s_address_2 = $( 'input#shipping_address_2' ).val();
|
||||
s_address = $( ':input#shipping_address_1' ).val();
|
||||
s_address_2 = $( ':input#shipping_address_2' ).val();
|
||||
}
|
||||
|
||||
var data = {
|
||||
|
@ -333,7 +333,7 @@ jQuery( function( $ ) {
|
|||
success: function( data ) {
|
||||
|
||||
// Reload the page if requested
|
||||
if ( true === data.reload ) {
|
||||
if ( data && true === data.reload ) {
|
||||
window.location.reload();
|
||||
return;
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ jQuery( function( $ ) {
|
|||
}
|
||||
|
||||
// Check for error
|
||||
if ( 'failure' === data.result ) {
|
||||
if ( data && 'failure' === data.result ) {
|
||||
|
||||
var $form = $( 'form.checkout' );
|
||||
|
||||
|
|
|
@ -6,53 +6,53 @@ jQuery( function( $ ) {
|
|||
return false;
|
||||
}
|
||||
|
||||
function getEnhancedSelectFormatString() {
|
||||
return {
|
||||
'language': {
|
||||
errorLoading: function() {
|
||||
// Workaround for https://github.com/select2/select2/issues/4355 instead of i18n_ajax_error.
|
||||
return wc_country_select_params.i18n_searching;
|
||||
},
|
||||
inputTooLong: function( args ) {
|
||||
var overChars = args.input.length - args.maximum;
|
||||
|
||||
if ( 1 === overChars ) {
|
||||
return wc_country_select_params.i18n_input_too_long_1;
|
||||
}
|
||||
|
||||
return wc_country_select_params.i18n_input_too_long_n.replace( '%qty%', overChars );
|
||||
},
|
||||
inputTooShort: function( args ) {
|
||||
var remainingChars = args.minimum - args.input.length;
|
||||
|
||||
if ( 1 === remainingChars ) {
|
||||
return wc_country_select_params.i18n_input_too_short_1;
|
||||
}
|
||||
|
||||
return wc_country_select_params.i18n_input_too_short_n.replace( '%qty%', remainingChars );
|
||||
},
|
||||
loadingMore: function() {
|
||||
return wc_country_select_params.i18n_load_more;
|
||||
},
|
||||
maximumSelected: function( args ) {
|
||||
if ( args.maximum === 1 ) {
|
||||
return wc_country_select_params.i18n_selection_too_long_1;
|
||||
}
|
||||
|
||||
return wc_country_select_params.i18n_selection_too_long_n.replace( '%qty%', args.maximum );
|
||||
},
|
||||
noResults: function() {
|
||||
return wc_country_select_params.i18n_no_matches;
|
||||
},
|
||||
searching: function() {
|
||||
return wc_country_select_params.i18n_searching;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Select2 Enhancement if it exists
|
||||
if ( $().selectWoo ) {
|
||||
var getEnhancedSelectFormatString = function() {
|
||||
return {
|
||||
'language': {
|
||||
errorLoading: function() {
|
||||
// Workaround for https://github.com/select2/select2/issues/4355 instead of i18n_ajax_error.
|
||||
return wc_country_select_params.i18n_searching;
|
||||
},
|
||||
inputTooLong: function( args ) {
|
||||
var overChars = args.input.length - args.maximum;
|
||||
|
||||
if ( 1 === overChars ) {
|
||||
return wc_country_select_params.i18n_input_too_long_1;
|
||||
}
|
||||
|
||||
return wc_country_select_params.i18n_input_too_long_n.replace( '%qty%', overChars );
|
||||
},
|
||||
inputTooShort: function( args ) {
|
||||
var remainingChars = args.minimum - args.input.length;
|
||||
|
||||
if ( 1 === remainingChars ) {
|
||||
return wc_country_select_params.i18n_input_too_short_1;
|
||||
}
|
||||
|
||||
return wc_country_select_params.i18n_input_too_short_n.replace( '%qty%', remainingChars );
|
||||
},
|
||||
loadingMore: function() {
|
||||
return wc_country_select_params.i18n_load_more;
|
||||
},
|
||||
maximumSelected: function( args ) {
|
||||
if ( args.maximum === 1 ) {
|
||||
return wc_country_select_params.i18n_selection_too_long_1;
|
||||
}
|
||||
|
||||
return wc_country_select_params.i18n_selection_too_long_n.replace( '%qty%', args.maximum );
|
||||
},
|
||||
noResults: function() {
|
||||
return wc_country_select_params.i18n_no_matches;
|
||||
},
|
||||
searching: function() {
|
||||
return wc_country_select_params.i18n_searching;
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
var wc_country_select_select2 = function() {
|
||||
$( 'select.country_select:visible, select.state_select:visible' ).each( function() {
|
||||
var select2_args = $.extend({
|
||||
|
@ -60,11 +60,11 @@ jQuery( function( $ ) {
|
|||
width: '100%'
|
||||
}, getEnhancedSelectFormatString() );
|
||||
|
||||
$( this ).selectWoo( select2_args );
|
||||
// Maintain focus after select https://github.com/select2/select2/issues/4384
|
||||
$( this ).on( 'select2:select', function() {
|
||||
$( this ).focus();
|
||||
} );
|
||||
$( this )
|
||||
.on( 'select2:select', function() {
|
||||
$( this ).focus(); // Maintain focus after select https://github.com/select2/select2/issues/4384
|
||||
} )
|
||||
.selectWoo( select2_args );
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -76,12 +76,16 @@ jQuery( function( $ ) {
|
|||
}
|
||||
|
||||
/* State/Country select boxes */
|
||||
var states_json = wc_country_select_params.countries.replace( /"/g, '"' ),
|
||||
states = $.parseJSON( states_json );
|
||||
var states_json = wc_country_select_params.countries.replace( /"/g, '"' ),
|
||||
states = $.parseJSON( states_json ),
|
||||
wrapper_selectors = '.woocommerce-billing-fields,' +
|
||||
'.woocommerce-shipping-fields,' +
|
||||
'.woocommerce-address-fields,' +
|
||||
'.woocommerce-shipping-calculator';
|
||||
|
||||
$( document.body ).on( 'change', 'select.country_to_state, input.country_to_state', function() {
|
||||
$( document.body ).on( 'change refresh', 'select.country_to_state, input.country_to_state', function() {
|
||||
// Grab wrapping element to target only stateboxes in same 'group'
|
||||
var $wrapper = $( this ).closest('.woocommerce-billing-fields, .woocommerce-shipping-fields, .woocommerce-shipping-calculator');
|
||||
var $wrapper = $( this ).closest( wrapper_selectors );
|
||||
|
||||
if ( ! $wrapper.length ) {
|
||||
$wrapper = $( this ).closest('.form-row').parent();
|
||||
|
@ -93,117 +97,78 @@ jQuery( function( $ ) {
|
|||
input_name = $statebox.attr( 'name' ),
|
||||
input_id = $statebox.attr( 'id' ),
|
||||
value = $statebox.val(),
|
||||
placeholder = $statebox.attr( 'placeholder' ) || $statebox.attr( 'data-placeholder' ) || '';
|
||||
placeholder = $statebox.attr( 'placeholder' ) || $statebox.attr( 'data-placeholder' ) || '',
|
||||
$newstate;
|
||||
|
||||
if ( states[ country ] ) {
|
||||
if ( $.isEmptyObject( states[ country ] ) ) {
|
||||
|
||||
$statebox.closest( 'p.form-row' ).hide().find( '.select2-container' ).remove();
|
||||
$statebox.replaceWith(
|
||||
'<input type="hidden" class="hidden" name="' +
|
||||
input_name +
|
||||
'" id="' +
|
||||
input_id +
|
||||
'" value="" placeholder="' +
|
||||
placeholder +
|
||||
'" />'
|
||||
);
|
||||
|
||||
$newstate = $( '<input type="hidden" />' )
|
||||
.prop( 'id', input_id )
|
||||
.prop( 'name', input_name )
|
||||
.prop( 'placeholder', placeholder )
|
||||
.addClass( 'hidden' );
|
||||
$parent.hide().find( '.select2-container' ).remove();
|
||||
$statebox.replaceWith( $newstate );
|
||||
$( document.body ).trigger( 'country_to_state_changed', [ country, $wrapper ] );
|
||||
|
||||
} else {
|
||||
|
||||
var options = '',
|
||||
state = states[ country ];
|
||||
|
||||
for( var index in state ) {
|
||||
if ( state.hasOwnProperty( index ) ) {
|
||||
options = options + '<option value="' + index + '">' + state[ index ] + '</option>';
|
||||
}
|
||||
}
|
||||
var state = states[ country ],
|
||||
$defaultOption = $( '<option value=""></option>' ).text( wc_country_select_params.i18n_select_state_text );
|
||||
|
||||
if ( ! placeholder ) {
|
||||
placeholder = wc_country_select_params.i18n_select_state_text;
|
||||
}
|
||||
|
||||
$statebox.closest( 'p.form-row' ).show();
|
||||
$parent.show();
|
||||
|
||||
if ( $statebox.is( 'input' ) ) {
|
||||
// Change for select
|
||||
$statebox.replaceWith(
|
||||
'<select name="' +
|
||||
input_name +
|
||||
'" id="' +
|
||||
input_id +
|
||||
'" class="state_select" data-placeholder="' +
|
||||
placeholder +
|
||||
'"></select>'
|
||||
);
|
||||
$newstate = $( '<select></select>' )
|
||||
.prop( 'id', input_id )
|
||||
.prop( 'name', input_name )
|
||||
.data( 'placeholder', placeholder )
|
||||
.addClass( 'state_select' );
|
||||
$statebox.replaceWith( $newstate );
|
||||
$statebox = $wrapper.find( '#billing_state, #shipping_state, #calc_shipping_state' );
|
||||
}
|
||||
|
||||
$statebox.html( '<option value="">' + wc_country_select_params.i18n_select_state_text + '</option>' + options );
|
||||
$statebox.empty().append( $defaultOption );
|
||||
|
||||
$.each( state, function( index ) {
|
||||
var $option = $( '<option></option>' )
|
||||
.prop( 'value', index )
|
||||
.text( state[ index ] );
|
||||
$statebox.append( $option );
|
||||
} );
|
||||
|
||||
$statebox.val( value ).change();
|
||||
|
||||
$( document.body ).trigger( 'country_to_state_changed', [country, $wrapper ] );
|
||||
|
||||
}
|
||||
} else {
|
||||
if ( $statebox.is( 'select' ) ) {
|
||||
|
||||
if ( $statebox.is( 'select, input[type="hidden"]' ) ) {
|
||||
$newstate = $( '<input type="text" />' )
|
||||
.prop( 'id', input_id )
|
||||
.prop( 'name', input_name )
|
||||
.prop( 'placeholder', placeholder )
|
||||
.addClass( 'input-text' );
|
||||
$parent.show().find( '.select2-container' ).remove();
|
||||
$statebox.replaceWith(
|
||||
'<input type="text" class="input-text" name="' +
|
||||
input_name +
|
||||
'" id="' +
|
||||
input_id +
|
||||
'" placeholder="' +
|
||||
placeholder +
|
||||
'" />'
|
||||
);
|
||||
|
||||
$statebox.replaceWith( $newstate );
|
||||
$( document.body ).trigger( 'country_to_state_changed', [country, $wrapper ] );
|
||||
|
||||
} else if ( $statebox.is( 'input[type="hidden"]' ) ) {
|
||||
|
||||
$parent.show().find( '.select2-container' ).remove();
|
||||
$statebox.replaceWith(
|
||||
'<input type="text" class="input-text" name="' +
|
||||
input_name +
|
||||
'" id="' +
|
||||
input_id +
|
||||
'" placeholder="' +
|
||||
placeholder +
|
||||
'" />'
|
||||
);
|
||||
|
||||
$( document.body ).trigger( 'country_to_state_changed', [country, $wrapper ] );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$( document.body ).trigger( 'country_to_state_changing', [country, $wrapper ] );
|
||||
|
||||
});
|
||||
|
||||
$( document.body ).on( 'wc_address_i18n_ready', function() {
|
||||
// Init country selects with their default value once the page loads.
|
||||
$('.woocommerce-billing-fields, .woocommerce-shipping-fields, .woocommerce-shipping-calculator').each( function() {
|
||||
var $wrapper = $( this ),
|
||||
$country_input = $wrapper.find( '#billing_country, #shipping_country, #calc_shipping_country' );
|
||||
$( wrapper_selectors ).each( function() {
|
||||
var $country_input = $( this ).find( '#billing_country, #shipping_country, #calc_shipping_country' );
|
||||
|
||||
if ( 0 === $country_input.length ) {
|
||||
if ( 0 === $country_input.length || 0 === $country_input.val().length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var country = $country_input.val();
|
||||
|
||||
if ( 0 === country.length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$( document.body ).trigger( 'country_to_state_changing', [country, $wrapper ] );
|
||||
$country_input.trigger( 'refresh' );
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(function(u){if("undefined"==typeof wc_country_select_params)return!1;if(u().selectWoo){var t=function(){u("select.country_select:visible, select.state_select:visible").each(function(){var t=u.extend({placeholderOption:"first",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}}});u(this).selectWoo(t),u(this).on("select2:select",function(){u(this).focus()})})};t(),u(document.body).bind("country_to_state_changed",function(){t()})}var e=wc_country_select_params.countries.replace(/"/g,'"'),p=u.parseJSON(e);u(document.body).on("change","select.country_to_state, input.country_to_state",function(){var t=u(this).closest(".woocommerce-billing-fields, .woocommerce-shipping-fields, .woocommerce-shipping-calculator");t.length||(t=u(this).closest(".form-row").parent());var e=u(this).val(),n=t.find("#billing_state, #shipping_state, #calc_shipping_state"),o=n.closest("p.form-row"),c=n.attr("name"),i=n.attr("id"),r=n.val(),a=n.attr("placeholder")||n.attr("data-placeholder")||"";if(p[e])if(u.isEmptyObject(p[e]))n.closest("p.form-row").hide().find(".select2-container").remove(),n.replaceWith('<input type="hidden" class="hidden" name="'+c+'" id="'+i+'" value="" placeholder="'+a+'" />'),u(document.body).trigger("country_to_state_changed",[e,t]);else{var s="",_=p[e];for(var l in _)_.hasOwnProperty(l)&&(s=s+'<option value="'+l+'">'+_[l]+"</option>");n.closest("p.form-row").show(),n.is("input")&&(n.replaceWith('<select name="'+c+'" id="'+i+'" class="state_select" data-placeholder="'+a+'"></select>'),n=t.find("#billing_state, #shipping_state, #calc_shipping_state")),n.html('<option value="">'+wc_country_select_params.i18n_select_state_text+"</option>"+s),n.val(r).change(),u(document.body).trigger("country_to_state_changed",[e,t])}else n.is("select")?(o.show().find(".select2-container").remove(),n.replaceWith('<input type="text" class="input-text" name="'+c+'" id="'+i+'" placeholder="'+a+'" />'),u(document.body).trigger("country_to_state_changed",[e,t])):n.is('input[type="hidden"]')&&(o.show().find(".select2-container").remove(),n.replaceWith('<input type="text" class="input-text" name="'+c+'" id="'+i+'" placeholder="'+a+'" />'),u(document.body).trigger("country_to_state_changed",[e,t]));u(document.body).trigger("country_to_state_changing",[e,t])})});
|
||||
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 +1 @@
|
|||
jQuery(function(n){var t=window.location.toString(),a=function(){wc_geolocation_params.hash&&n('a[href^="'+wc_geolocation_params.home_url+'"]:not(a[href*="v="]), a[href^="/"]:not(a[href*="v="])').each(function(){var a=n(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)})},o={url:wc_geolocation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_customer_location"),type:"GET",success:function(a){var o;a.success&&a.data.hash&&a.data.hash!==wc_geolocation_params.hash&&(o=a.data.hash,t=0<t.indexOf("?v=")||0<t.indexOf("&v=")?t.replace(/v=[^&]+/,"v="+o):0<t.indexOf("?")?t+"&v="+o:t+"?v="+o,window.location=t)}};"1"===wc_geolocation_params.is_available&&(n.ajax(o),n("form").each(function(){var a=n(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 e=a.attr("action");e&&(0<e.indexOf("?")?a.attr("action",e+"&v="+wc_geolocation_params.hash):a.attr("action",e+"?v="+wc_geolocation_params.hash))}}),a()),n(document.body).on("added_to_cart",function(){a()})});
|
||||
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()})});
|
|
@ -31,8 +31,9 @@ jQuery( function( $ ) {
|
|||
$( 'input#min_price, input#max_price' ).hide();
|
||||
$( '.price_slider, .price_label' ).show();
|
||||
|
||||
var min_price = $( '.price_slider_amount #min_price' ).data( 'min' ),
|
||||
max_price = $( '.price_slider_amount #max_price' ).data( 'max' ),
|
||||
var min_price = $( '.price_slider_amount #min_price' ).data( 'min' ),
|
||||
max_price = $( '.price_slider_amount #max_price' ).data( 'max' ),
|
||||
step = $( '.price_slider_amount' ).data( 'step' ) || 1,
|
||||
current_min_price = $( '.price_slider_amount #min_price' ).val(),
|
||||
current_max_price = $( '.price_slider_amount #max_price' ).val();
|
||||
|
||||
|
@ -41,6 +42,7 @@ jQuery( function( $ ) {
|
|||
animate: true,
|
||||
min: min_price,
|
||||
max: max_price,
|
||||
step: step,
|
||||
values: [ current_min_price, current_max_price ],
|
||||
create: function() {
|
||||
|
||||
|
|