Merge branch 'master' into maybe_blank_keys_webhooks
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
"es2015",
|
||||||
|
"stage-2"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"add-module-exports"
|
||||||
|
]
|
||||||
|
}
|
|
@ -93,7 +93,7 @@ By translating video tutorials you'll be helping non-English speaking users and
|
||||||
# Additional Resources
|
# Additional Resources
|
||||||
|
|
||||||
* [General GitHub documentation](https://help.github.com/)
|
* [General GitHub documentation](https://help.github.com/)
|
||||||
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
|
* [GitHub pull request documentation](https://help.github.com/articles/about-pull-requests/)
|
||||||
* [Translator Handbook](https://make.wordpress.org/polyglots/handbook/)
|
* [Translator Handbook](https://make.wordpress.org/polyglots/handbook/)
|
||||||
* [WooCommerce Docs](https://docs.woocommerce.com/)
|
* [WooCommerce Docs](https://docs.woocommerce.com/)
|
||||||
* [WooCommerce Support](https://support.woocommerce.com)
|
* [WooCommerce Support](https://support.woocommerce.com)
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
## EXPLANATION OF THE ISSUE
|
### EXPLANATION OF THE ISSUE
|
||||||
|
|
||||||
<!-- What happens, under which versions, under what conditions, when, and what were you expecting instead. -->
|
<!-- What happens, under which versions, under what conditions, when, and what were you expecting instead. -->
|
||||||
|
|
||||||
## STEPS TO REPRODUCE THE ISSUE
|
### STEPS TO REPRODUCE THE ISSUE
|
||||||
|
|
||||||
<!-- 1. List steps to reproduce your issue so we can replicate. -->
|
<!-- 1. List steps to reproduce your issue so we can replicate. -->
|
||||||
|
|
||||||
## SYSTEM STATUS REPORT
|
### SYSTEM STATUS
|
||||||
|
|
||||||
|
<details>
|
||||||
```
|
```
|
||||||
Grab the system status report from WooCommerce > System Status and paste it here.
|
Grab the system status report from WooCommerce > System Status and paste it here between the `details` tags.
|
||||||
```
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
BEFORE POSTING YOUR ISSUE
|
BEFORE POSTING YOUR ISSUE
|
||||||
|
|
|
@ -32,6 +32,7 @@ tests/cli/vendor
|
||||||
# Unit tests
|
# Unit tests
|
||||||
/tmp
|
/tmp
|
||||||
/tests/bin/tmp
|
/tests/bin/tmp
|
||||||
|
/tests/e2e-tests/config/local-*.json
|
||||||
|
|
||||||
# Logs
|
# Logs
|
||||||
/logs
|
/logs
|
||||||
|
|
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 152 KiB |
After Width: | Height: | Size: 148 KiB |
204
CHANGELOG.txt
|
@ -1,5 +1,199 @@
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 3.0.4 - 2017-04-20 =
|
||||||
|
* Fix - Variations were not inheriting the product image and shipping class ID.
|
||||||
|
* Fix - Prevent rating/review counts being duplicated when duplicating products.
|
||||||
|
* Fix - Fixed gallery navigation between images with long captions.
|
||||||
|
* Fix - Support transparent PNG in the gallery by setting a background color.
|
||||||
|
* Fix - Removed name/company from the shipping address Google map links.
|
||||||
|
* Fix - Fixed the address field sorting script on the checkout.
|
||||||
|
* Fix - Fixed the upgrade routine for grouped products so that parents are unset.
|
||||||
|
* Fix - Fixed support for WordPress 4.7 user locale settings.
|
||||||
|
* Fix - Fixed default option filter for product types in the product meta box.
|
||||||
|
* Fix - Improved the css in Twenty Seventeen for dark color schemes.
|
||||||
|
* Fix - Fixed display of refunds in sales report.
|
||||||
|
* Fix - Updated `single-product/add-to-cart/variable.php` template version to 3.0.0 since it had changes since 2.6.
|
||||||
|
* Fix - Fixed warnings when product attribute do not exists.
|
||||||
|
* Fix - Used a div for comment-form-rating to prevent invalid nested markup.
|
||||||
|
* Fix - Fixed some logic that checks if order taxes are compound.
|
||||||
|
* Fix - Fixed SKU checks to only exclude products that are trashed.
|
||||||
|
* Fix - Fixed display of download permissions in first email sent after checkout.
|
||||||
|
* Fix - Hidden the backorder notification stock text when notification is disabled.
|
||||||
|
* Fix - Fixed incorrect stock numbers in low stock emails.
|
||||||
|
* Tweak - Removed the non-functional order total input box, and combined the recalculation buttons into one working button.
|
||||||
|
* Tweak - Updated Guided Tour videos.
|
||||||
|
* Tweak - Updated js-cookie.js to 2.1.4.
|
||||||
|
* Tweak - Updated schema.org URLs to use HTTPS.
|
||||||
|
* Tweak - Status report request timeouts.
|
||||||
|
* REST API - Fixed an issue that prevented deleting a term if errors were thrown during creation.
|
||||||
|
* REST API - Fixed reports endpoint when querying by date.
|
||||||
|
* REST API - Fixed ignored order parameters when changing order status.
|
||||||
|
* Dev - Support guest orders in `wc_get_orders` function.
|
||||||
|
* Dev - Fixed downloadable variation filters for download URLs.
|
||||||
|
* Dev - Added safeguards to prevent infinite loops while saving coupons, products and orders in admin.
|
||||||
|
* Dev - Added a fallback for `queue_transactional_email` if background sending is disabled.
|
||||||
|
* Dev - Added `has_shipping_address` helper method.
|
||||||
|
* Dev - Introduced `woocommerce_order_item_get_formatted_meta_data` filter.
|
||||||
|
* Dev - Made wc_add_order_item pass correct values to woocommerce_new_order_item.
|
||||||
|
* Dev - Fixed `legacy_posted_data` access in checkout class.
|
||||||
|
* Dev - Fixed undefined property notice in `WC_Order_Item::offsetGet`.
|
||||||
|
* Dev - Fixed PHP 7.1 warnings when using non-float values to `wc_get_weight()`.
|
||||||
|
* Dev - Fixed incorrect variable name in `wc_add_order_item()`.
|
||||||
|
|
||||||
|
= 3.0.3 - 2017-04-13 =
|
||||||
|
* Fix - Fixed an issue with variation tax-classes when set to 'parent'. This made taxes apply on top of the tax inclusive price in certain setups.
|
||||||
|
* Fix - Escaped attribute translations in the `cart.php` template and bumped the template version to match.
|
||||||
|
* Fix - Corrected the display of refund dates on the order screen.
|
||||||
|
* Fix - Fixed the grouped product visibility check in the grouped.php template and bumped the template version to match.
|
||||||
|
* Fix - Fixed the sale badge display for grouped products.
|
||||||
|
* Fix - Added the `itemReviewed` structured data for product reviews to make it validate.
|
||||||
|
* Fix - Made the `get_attribute` method work on variation objects.
|
||||||
|
* Tweak - Turned off the deferred email sending by default which was added in 3.0. Whilst it does improve performance, there were compatibility problems on some servers. It can be enabled with a filter if desired.
|
||||||
|
* Dev - Added backtrace information to the deprecation messages to help find problem plugins.
|
||||||
|
|
||||||
|
= 3.0.2 - 2017-04-12 =
|
||||||
|
* Fix - Removed required states for GP, GF, KW, LB, MQ, RE and YT countries.
|
||||||
|
* Fix - Made cache in the [products] shortcode respect filters from plugins.
|
||||||
|
* Fix - Added missing `woocommerce_cross_sells_columns` filter.
|
||||||
|
* Fix - Fixed shortcode rendering on the shop page.
|
||||||
|
* Fix - Fixed incorrect sale dates when bulk editing variations.
|
||||||
|
* Fix - Fixed calls to wc_reduce_stock_levels in PayPal and Simplify gateways.
|
||||||
|
* Fix - Exclude "location" meta when reading customer meta data.
|
||||||
|
* Fix - Updated `emails/email-addresses.php`, `emails/email-order-details.php`, `content-single-product.php`, `checkout/form-shipping.php`, `myaccount/form-add-payment-method.php`, `myaccount/form-edit-address.php`, `myaccount/form-lost-password.php`, `myaccount/form-reset-password.php`, `myaccount/orders.php` and `myaccount/view-order.php` template version to 3.0.0 since they had changes since 2.6.
|
||||||
|
* Fix - Fixed default behavior of variation tax classes when originally set to "parent".
|
||||||
|
* Fix - When duplicating products, do not copy slug, append "(Copy)" to the product name, correctly copy all meta data, and prevent children of grouped products being duplicated too.
|
||||||
|
* Fix - Removed duplicated items when outputting cross sells on the cart page.
|
||||||
|
* Fix - Fixed output of default "add to cart" text of external products in loops.
|
||||||
|
* Fix - Fixed backwards compatibility of guest checkout rules when being altered by plugins directly.
|
||||||
|
* Fix - Use correct thumbnail sizes for variation images in the new gallery.
|
||||||
|
* Fix - Fixed captions on thumbnails and main image in the new gallery.
|
||||||
|
* Fix - Trigger wc_fragments_loaded after add to cart fragment refresh.
|
||||||
|
* Fix - Download permissions; Convert dates to timestamp on read so UTC is preserved.
|
||||||
|
* Fix - Fixed notices under PHP 7.1 when sorting products by name (numeric).
|
||||||
|
* Fix - Added additional checks to ensure objects are read before using class methods to avoid errors.
|
||||||
|
* Fix - Removed legacy suggest.js code which was causing JS error on bulk edit.
|
||||||
|
* Fix - Fixed warnings on the "Lost password" page and when loading a product with invalid attributes.
|
||||||
|
* Fix - Made background emailer update the queue after a successful send so duplicate mails are less likely.
|
||||||
|
* Fix - Typo in flexslider_enabled option in new gallery script.
|
||||||
|
* Fix - woocommerce_notify_low_stock and woocommerce_notify_no_stock options had no effect.
|
||||||
|
* Tweak - For downloadable files, only validate file type when dealing with relative paths.
|
||||||
|
* Tweak - Improved automatic variation name generation.
|
||||||
|
* Dev - Added product visibility terms to system status report to help debug.
|
||||||
|
* Dev - Introduced `woocommerce_admin_order_date_format` filter to replace missing `post_date_column_time`.
|
||||||
|
* Dev - Introduced `woocommerce_update_customer_args` filter to prevent updates to user objects if needed.
|
||||||
|
* REST API - Fixed saving of variations in legacy REST API v3.
|
||||||
|
* REST API - Fixed backwards compatibility of line_items meta in legacy REST API.
|
||||||
|
|
||||||
|
= 3.0.1 - 2017-04-06 =
|
||||||
|
* Fix - Show catalog hidden products within grouped products.
|
||||||
|
* Fix - Fade in the gallery in if no images are set or it's custom.
|
||||||
|
* Fix - Use wc_deprecated_function in WC_Deprecated_Hooks so notices aren't output in ajax requests.
|
||||||
|
* Fix - Added back the ability to include extra items to the System Status using the `woocommerce_system_status_environment_rows` filter.
|
||||||
|
* Fix - Coupon category restrictions and limits for variations.
|
||||||
|
* Fix - Allow shortcodes and HTML in variation descriptions like in 2.6.
|
||||||
|
* Fix - Unset post date when duplicating products.
|
||||||
|
* Fix - Show a sale price on variable products if on sale and all prices are the same.
|
||||||
|
* Fix - Corrected download links when a product has multiple downloads.
|
||||||
|
* Fix - Prevented potential errors if the product type was not posted for any reason on save.
|
||||||
|
* Fix - Updated `single-product/up-sells.php`, `loop/add-to-cart.php`, `loop/rating.php`, `checkout/form-billing.php`, and `content-product.php` template version to 3.0.0.
|
||||||
|
* Fix - Included clearfixes on billing and shipping field wrappers,
|
||||||
|
* Fix - Fixed styling of logs table in some languages.
|
||||||
|
* Fix - Fixed display of variation attributes on old orders.
|
||||||
|
* Fix - Use placeholder text for external products add to cart button text if left blank.
|
||||||
|
* Fix - Fallback to home URL if no shop page is set for system status security check for HTTPS.
|
||||||
|
* Fix - For variations, pull tax status and sold individually from the parent since there is no UI to set this at variation level.
|
||||||
|
* Fix - Moved cron emails to background processing to avoid multiple sends.
|
||||||
|
* Fix - Wrapped structured data in a hidden element when added to emails.
|
||||||
|
* Fix - Missing gateway information in queued emails.
|
||||||
|
* Fix - Fixed a bug that caused pages to permanently reload if "Default customer location" was set to "Geolocate (with page caching support)".
|
||||||
|
* Fix - When forcing shipping to billing, set the shipping fields in the order itself.
|
||||||
|
* Fix - Check for invalid objects in WC_Register_WP_Admin_Settings.
|
||||||
|
* Fix - Check for error object in wc_get_object_terms.
|
||||||
|
* Fix - Removed slashes in shipping meta data on the order edit screen.
|
||||||
|
* Fix - Prevented permalink rewrites for attributes with missing names.
|
||||||
|
* Fix - Fixed saving of meta data when multiple extensions use the `save_post` action.
|
||||||
|
* Fix - Allow search customers by ID in edit order screen.
|
||||||
|
* Fix - Prevents session data overwriting customer data on login.
|
||||||
|
* Fix - Fixed cross-sell column display and variation support.
|
||||||
|
* Fix - Fixed variable product stock syncing on save.
|
||||||
|
* Fix - Included try/catch wrapper to prevent issues with Select2.
|
||||||
|
* Fix - Prevented a bug that deleted all variations when the product type was change from variable to simple.
|
||||||
|
* Fix - Switched to WPDB to quicker update when syncing titles for variations.
|
||||||
|
* Fix - Exclude deprecated properties when loading a customer object.
|
||||||
|
* Fix - Fixed notices while trying to order again.
|
||||||
|
* Fix - Fixed notices when `$wpdb->prefix` is empty.
|
||||||
|
* Fix - Prevent errors when loading a product with an invalid download file types.
|
||||||
|
* REST API - Fixed missing array declaration in CRUD controller.
|
||||||
|
* REST API - Removed extra `exclude`, `include` and `search` parameters from taxes endpoint.
|
||||||
|
* REST API - Fixed variation description formatting.
|
||||||
|
* REST API - Fixed incorrect attribute check in products endpoint in Legacy REST API.
|
||||||
|
* REST API - Allow variation image to be unset.
|
||||||
|
|
||||||
|
= 3.0.0 - 2017-04-04 =
|
||||||
|
* New gallery on single product pages with better mobile support, using PhotoSwipe and Zoom. Declare support with add_theme_support() - wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider
|
||||||
|
* Made the store notice dismissible on the frontend.
|
||||||
|
* Variable products no longer show striked out prices in combination with ranges for clarity when on sale.
|
||||||
|
* Prices no longer display as 'free' instead of 0, to fix issues with ranges and localization and for consistency.
|
||||||
|
* Improved structured product data by using JSON-LD instead of inline Microdata.
|
||||||
|
* Improved downloads list layout (template file).
|
||||||
|
* Respect stock status and prevent the "out of stock threshold" setting affecting existing in-stock products.
|
||||||
|
* Improved handling of shop page rewrite rules to allow subpages.
|
||||||
|
* Redirect to login after password reset.
|
||||||
|
* When using authorizations in PayPal Standard, automatically capture funds when the order goes processing/completed.
|
||||||
|
* On multisite, when a user logs into a store with an account on a site, but not the current site, rather than error, add the user to the current site as a customer.
|
||||||
|
* Show variable weights/dimensions even when parent values are not set.
|
||||||
|
* Automatically sort tax rates rather than allow clunky manual sorting.
|
||||||
|
* When deleting a tax rate class, remove it's tax rates.
|
||||||
|
* Made WC_Logger pluggable via wc_get_logger function.
|
||||||
|
* Use 'average rating' post meta for 'rating' product sorting option.
|
||||||
|
* Show better labels in nav menus metabox.
|
||||||
|
* Sort “Recently Viewed” products by the view order.
|
||||||
|
* Removed internal scroll from log viewer.
|
||||||
|
* Add reply-to to admin emails.
|
||||||
|
* Improved the zone setup flow.
|
||||||
|
* Made wc_get_wildcard_postcodes return the orignal postcode plus * since wildcards should match empty strings too.
|
||||||
|
* Use all paid statuses in $customer->get_total_spent().
|
||||||
|
* Move location of billing email field to work with password managers.
|
||||||
|
* Option to restrict selling locations by country.
|
||||||
|
* Added tool to clear orphaned variations in system status.
|
||||||
|
* Remove checkbox options in system status tools and replace with constants.
|
||||||
|
* Added security section in system status report.
|
||||||
|
* Add image_url setting to PayPal Standard.
|
||||||
|
* Fixed attribute registration. Attributes are non-hierarchical by default (parent is not supported).
|
||||||
|
* Add sort parameter to checkout fields to aid with sorting per locale.
|
||||||
|
* Merged percent and percent product coupon types (they provide the same discount).
|
||||||
|
* Prevent payment details being cleared after update_checkout events.
|
||||||
|
* Performance - Converted _featured and _visibility meta data to terms for faster catalog queries. Upgrade routine handles migration. Developers may need to update queries to reflect this change.
|
||||||
|
* Includes product attributes archives links in "Additional Information" tab.
|
||||||
|
* Select2 has been upgraded to v4.
|
||||||
|
* Improved logging system for extensions.
|
||||||
|
* Tax suffix is now hidden on non-taxable products.
|
||||||
|
* Grouped products are linked from the parent rather than the children. Children can be in more than one group.
|
||||||
|
* Removed coupon usage link in coupons admin screen.
|
||||||
|
* Performance - Converted rating filters to visibility terms.
|
||||||
|
* Performance - Added visibility term for outofstock products to speed those queries up also.
|
||||||
|
* Performance - Introduced a new CRUD (create, read, update, delete) system for Products, Orders, Customers and Shipping Zones.
|
||||||
|
* Performance - Optimised variable product sync. Upper/lower price meta is no longer stored, just the main prices, if a child has weight, and if a child has dimensions.
|
||||||
|
* Performance - Removed WP_Query from up-sells.php and related.php and replaced with PHP foreach loop (since we already have the product IDs).
|
||||||
|
* Performance - Removed the feature where old orders get access to new downloads on product edit. Looping potentially thousands of orders to do this is too much of a performance burden for stores and this can sometimes be unexpected behavior too. This does however updates *edited* downloads.
|
||||||
|
* Performance - Removed 'items' column on orders screen due to loading excessive data.
|
||||||
|
* Performance - Deferred email sending for faster checkouts. Now uses CRON.
|
||||||
|
* API - New Rest API v2 with support for meta_data amongst other things.
|
||||||
|
* API - Removed last order from customers part of the API due to performance concerns - use orders endpoint instead. Other order data on the endpoint is now transient cached.
|
||||||
|
* API - Allow oAuth1.0a authentication using headers.
|
||||||
|
* API - New Shipping Zones endpoints.
|
||||||
|
* API - New variations endpoints.
|
||||||
|
* API - New settings endpoints.
|
||||||
|
* API - Payment gateways and shipping methods endpoints.
|
||||||
|
* API - Prevented the (broken) ability to manipulate variations directly on the products endpoints.
|
||||||
|
* CLI - New CLI which uses the REST API endpoints rather than it's own functions.
|
||||||
|
* Localization - Improved RTL support.
|
||||||
|
* Localization - Added a language independent permalink setting function.
|
||||||
|
* Localization - Added inline comments for placeholder strings.
|
||||||
|
* Localization - Added Nigerian and Pakistan Provinces to i18n/state.
|
||||||
|
* Localization - US and Poland postcode validation.
|
||||||
|
* To read more about this release, see our dev blog announcement here: http://wp.me/p6wtcw-Uo
|
||||||
|
|
||||||
= 2.6.14 - 2017-02-02 =
|
= 2.6.14 - 2017-02-02 =
|
||||||
* Fix - Ensure product exists in wc_update_product_stock.
|
* Fix - Ensure product exists in wc_update_product_stock.
|
||||||
* Fix - Send emails using the site language.
|
* Fix - Send emails using the site language.
|
||||||
|
@ -93,7 +287,7 @@
|
||||||
* Fix - API - Allow API to save refund reason.
|
* Fix - API - Allow API to save refund reason.
|
||||||
* Fix - API - Resolved encoding issues with attribute and variation slugs.
|
* Fix - API - Resolved encoding issues with attribute and variation slugs.
|
||||||
* Fix - API - get_attributes should return term name, not slug.
|
* Fix - API - get_attributes should return term name, not slug.
|
||||||
* Fix - API - Product "filter" and "sku" paramaters.
|
* Fix - API - Product "filter" and "sku" parameters.
|
||||||
* Fix - Handle info notices in cart, not just error messages.
|
* Fix - Handle info notices in cart, not just error messages.
|
||||||
* Fix - Don't remove hyphens in attribute labels.
|
* Fix - Don't remove hyphens in attribute labels.
|
||||||
* Fix - Start sales on variations after they are saved, if applicable.
|
* Fix - Start sales on variations after they are saved, if applicable.
|
||||||
|
@ -766,7 +960,7 @@
|
||||||
* Tweak - Use 30 days instead of year for transients to avoid bugs in memcache plugins.
|
* Tweak - Use 30 days instead of year for transients to avoid bugs in memcache plugins.
|
||||||
* Tweak - Add reports menu item if user can access reports but not the main WC section.
|
* Tweak - Add reports menu item if user can access reports but not the main WC section.
|
||||||
* Tweak - Improve grouped product quantity inputs.
|
* Tweak - Improve grouped product quantity inputs.
|
||||||
* Tweak - Load the persistant cart if cart is empty.
|
* Tweak - Load the persistent cart if cart is empty.
|
||||||
* Tweak - Prevent cart being cleared when accessing the login page.
|
* Tweak - Prevent cart being cleared when accessing the login page.
|
||||||
* Tweak - Shipping calculator - Made state/postcode respect country locale like checkout.
|
* Tweak - Shipping calculator - Made state/postcode respect country locale like checkout.
|
||||||
* Tweak - Move default customer location to general settings tab.
|
* Tweak - Move default customer location to general settings tab.
|
||||||
|
@ -849,7 +1043,7 @@
|
||||||
* Fix - Added WC version of GEOIP classes to prevent conflicts with other plugins.
|
* Fix - Added WC version of GEOIP classes to prevent conflicts with other plugins.
|
||||||
|
|
||||||
= 2.3.0 - 2015-02-11 =
|
= 2.3.0 - 2015-02-11 =
|
||||||
* Feature - Option to geo-locate the customer's inital location.
|
* Feature - Option to geo-locate the customer's initial location.
|
||||||
* Feature - Display taxes in store based on the customer location, rather than the shop base.
|
* Feature - Display taxes in store based on the customer location, rather than the shop base.
|
||||||
* Feature - Made tax importer expand postcode ranges.
|
* Feature - Made tax importer expand postcode ranges.
|
||||||
* Feature - Print styles for reports.
|
* Feature - Print styles for reports.
|
||||||
|
@ -1108,7 +1302,7 @@
|
||||||
* Dev - Introduces the WC_Order::needs_shipping_address() method.
|
* Dev - Introduces the WC_Order::needs_shipping_address() method.
|
||||||
* Dev - Gateways can set transaction ID for the order.
|
* Dev - Gateways can set transaction ID for the order.
|
||||||
* Dev - Gateways can do refunds via the Payment Gateway API.
|
* Dev - Gateways can do refunds via the Payment Gateway API.
|
||||||
* Refactor - Changed the method in which order statuses are stored. Previously, order status was a taxonomy. This caused issues when unique term slugs differed from what we were expecting, and also added additonal overhead to order queries in reports. https://github.com/woocommerce/woocommerce/issues/3064 Order status is now stored as post status - several new post statuses have been added. Order class variables are backwards compatible. The only thing to note (for devs) is that any query must use the order status instead of 'publish' when getting orders and querying by post_status. THe shop_order_status has also been removed.
|
* Refactor - Changed the method in which order statuses are stored. Previously, order status was a taxonomy. This caused issues when unique term slugs differed from what we were expecting, and also added additional overhead to order queries in reports. https://github.com/woocommerce/woocommerce/issues/3064 Order status is now stored as post status - several new post statuses have been added. Order class variables are backwards compatible. The only thing to note (for devs) is that any query must use the order status instead of 'publish' when getting orders and querying by post_status. THe shop_order_status has also been removed.
|
||||||
* Refactor - Update stock amounts with DB queries.
|
* Refactor - Update stock amounts with DB queries.
|
||||||
* Refactor - Simplified attribute name sanitisation which maintains UTF8 char integrity.
|
* Refactor - Simplified attribute name sanitisation which maintains UTF8 char integrity.
|
||||||
* Refactor - Country class return methods.
|
* Refactor - Country class return methods.
|
||||||
|
@ -1130,7 +1324,7 @@
|
||||||
* Fix - Saving tax rates threw notices (missing git cherry pick).
|
* Fix - Saving tax rates threw notices (missing git cherry pick).
|
||||||
|
|
||||||
= 2.1.10 - 2014-06-03 =
|
= 2.1.10 - 2014-06-03 =
|
||||||
* Fix - Removed unecessary localization from edit account.
|
* Fix - Removed unnecessary localization from edit account.
|
||||||
* Fix - Admin welcome screen css.
|
* Fix - Admin welcome screen css.
|
||||||
* Fix - Fixed my account setting values to wrong user submitted strings.
|
* Fix - Fixed my account setting values to wrong user submitted strings.
|
||||||
* Fix - Menu order terms were coming back empty.
|
* Fix - Menu order terms were coming back empty.
|
||||||
|
|
14
Gruntfile.js
|
@ -249,6 +249,12 @@ module.exports = function( grunt ) {
|
||||||
'cd apigen',
|
'cd apigen',
|
||||||
'php hook-docs.php'
|
'php hook-docs.php'
|
||||||
].join( '&&' )
|
].join( '&&' )
|
||||||
|
},
|
||||||
|
e2e_test: {
|
||||||
|
command: 'npm run --silent test:single tests/e2e-tests/' + grunt.option( 'file' )
|
||||||
|
},
|
||||||
|
e2e_tests: {
|
||||||
|
command: 'npm run --silent test'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -325,4 +331,12 @@ module.exports = function( grunt ) {
|
||||||
'default',
|
'default',
|
||||||
'makepot'
|
'makepot'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
grunt.registerTask( 'e2e-tests', [
|
||||||
|
'shell:e2e_tests'
|
||||||
|
]);
|
||||||
|
|
||||||
|
grunt.registerTask( 'e2e-test', [
|
||||||
|
'shell:e2e_test'
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,7 +26,7 @@ charset: [UTF-8]
|
||||||
main: WC
|
main: WC
|
||||||
|
|
||||||
# title of generated documentation
|
# title of generated documentation
|
||||||
title: WooCommerce 2.6.x Code Reference
|
title: WooCommerce 3.0.x Code Reference
|
||||||
|
|
||||||
# base url used for sitemap (useful for public doc)
|
# base url used for sitemap (useful for public doc)
|
||||||
baseUrl: https://docs.woocommerce.com/wc-apidocs/
|
baseUrl: https://docs.woocommerce.com/wc-apidocs/
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="api">
|
<li class="api">
|
||||||
<a href="https://woothemes.github.io/woocommerce-rest-api-docs/"><span>REST API Docs</span></a>
|
<a href="https://woocommerce.github.io/woocommerce-rest-api-docs/"><span>REST API Docs</span></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="divider-vertical" n:if="$config->download"></li>
|
<li class="divider-vertical" n:if="$config->download"></li>
|
||||||
|
|
|
@ -505,14 +505,12 @@ table.wc_status_table {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr {
|
tr:nth-child( 2n ) {
|
||||||
&:nth-child( 2n ) {
|
|
||||||
th,
|
th,
|
||||||
td {
|
td {
|
||||||
background: #fcfcfc;
|
background: #fcfcfc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
th {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
@ -650,12 +648,10 @@ table.wc_status_table {
|
||||||
#log-viewer-select {
|
#log-viewer-select {
|
||||||
padding: 10px 0 8px;
|
padding: 10px 0 8px;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
h2 {
|
h2 a {
|
||||||
a {
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#log-viewer {
|
#log-viewer {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
@ -685,8 +681,7 @@ table.wc_status_table {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dimensions {
|
.dimensions div {
|
||||||
div {
|
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0.2em 0;
|
margin: 0.2em 0;
|
||||||
|
|
||||||
|
@ -701,7 +696,6 @@ table.wc_status_table {
|
||||||
margin-left: 5em;
|
margin-left: 5em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@ -730,13 +724,11 @@ table.wc_status_table {
|
||||||
width: 49%;
|
width: 49%;
|
||||||
margin: 0.2em 0;
|
margin: 0.2em 0;
|
||||||
}
|
}
|
||||||
&.dimensions {
|
&.dimensions label {
|
||||||
label {
|
|
||||||
width: 75%;
|
width: 75%;
|
||||||
max-width: 75%;
|
max-width: 75%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.regular_price,
|
.regular_price,
|
||||||
.sale_price,
|
.sale_price,
|
||||||
|
@ -768,8 +760,7 @@ ul.wc_coupon_list,
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.wc_coupon_list {
|
ul.wc_coupon_list li {
|
||||||
li {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
&.code {
|
&.code {
|
||||||
|
@ -779,18 +770,15 @@ ul.wc_coupon_list {
|
||||||
content: ', ';
|
content: ', ';
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-of-type {
|
&:last-of-type::after {
|
||||||
&::after {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.tips {
|
.tips {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ul.wc_coupon_list_block {
|
ul.wc_coupon_list_block {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -882,11 +870,9 @@ ul.wc_coupon_list_block {
|
||||||
padding: 0 2% 0 0;
|
padding: 0 2% 0 0;
|
||||||
float: left;
|
float: left;
|
||||||
|
|
||||||
> h3 {
|
> h3 span {
|
||||||
span {
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
|
@ -896,11 +882,9 @@ ul.wc_coupon_list_block {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address {
|
.address strong {
|
||||||
strong {
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.form-field {
|
.form-field {
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -1015,12 +999,10 @@ ul.wc_coupon_list_block {
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a.edit_address {
|
a.edit_address::after {
|
||||||
&::after {
|
|
||||||
font-family: 'Dashicons';
|
font-family: 'Dashicons';
|
||||||
content: '\f464';
|
content: '\f464';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.billing-same-as-shipping,
|
.billing-same-as-shipping,
|
||||||
.load_customer_shipping,
|
.load_customer_shipping,
|
||||||
|
@ -1177,12 +1159,10 @@ ul.wc_coupon_list_block {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wc-order-item-bulk-edit {
|
.wc-order-item-bulk-edit .cancel-action {
|
||||||
.cancel-action {
|
|
||||||
float: left;
|
float: left;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.add_meta {
|
.add_meta {
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
|
@ -1226,8 +1206,7 @@ ul.wc_coupon_list_block {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
thead {
|
thead th {
|
||||||
th {
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
@ -1254,7 +1233,6 @@ ul.wc_coupon_list_block {
|
||||||
margin-right: -1em;
|
margin-right: -1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
tbody th, td {
|
tbody th, td {
|
||||||
padding: 1.5em 1em 1em;
|
padding: 1.5em 1em 1em;
|
||||||
|
@ -1544,8 +1522,7 @@ ul.wc_coupon_list_block {
|
||||||
border-bottom: 1px dotted #999;
|
border-bottom: 1px dotted #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.fee {
|
tr.fee .thumb div {
|
||||||
.thumb div {
|
|
||||||
@include ir();
|
@include ir();
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
line-height: 1em;
|
line-height: 1em;
|
||||||
|
@ -1557,10 +1534,8 @@ ul.wc_coupon_list_block {
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
tr.refund {
|
tr.refund .thumb div {
|
||||||
.thumb div {
|
|
||||||
@include ir();
|
@include ir();
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
line-height: 1em;
|
line-height: 1em;
|
||||||
|
@ -1572,7 +1547,6 @@ ul.wc_coupon_list_block {
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
tr.shipping {
|
tr.shipping {
|
||||||
.thumb div {
|
.thumb div {
|
||||||
|
@ -1612,19 +1586,15 @@ ul.wc_coupon_list_block {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover::before {
|
||||||
&::before {
|
|
||||||
color: $red;
|
color: $red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
&:hover .delete-order-tax {
|
||||||
.delete-order-tax {
|
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
small.refunded {
|
small.refunded {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -1679,12 +1649,10 @@ ul.wc_coupon_list_block {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-order-item {
|
.edit-order-item::before {
|
||||||
&::before {
|
|
||||||
@include icon_dashicons( '\f464' );
|
@include icon_dashicons( '\f464' );
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.delete-order-item,
|
.delete-order-item,
|
||||||
.delete_refund {
|
.delete_refund {
|
||||||
|
@ -1692,13 +1660,11 @@ ul.wc_coupon_list_block {
|
||||||
@include icon_dashicons( '\f158' );
|
@include icon_dashicons( '\f158' );
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover::before {
|
||||||
&::before {
|
|
||||||
color: $red;
|
color: $red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
tbody tr .wc-order-edit-line-item-actions {
|
tbody tr .wc-order-edit-line-item-actions {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
|
@ -1741,13 +1707,11 @@ ul.wc_coupon_list_block {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#poststuff #woocommerce-order-actions {
|
#poststuff #woocommerce-order-actions .inside {
|
||||||
.inside {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
ul.order_actions {
|
ul.order_actions li {
|
||||||
li {
|
|
||||||
padding: 6px 10px;
|
padding: 6px 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
@ -1756,21 +1720,15 @@ ul.wc_coupon_list_block {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#poststuff #woocommerce-order-notes {
|
#poststuff #woocommerce-order-notes .inside {
|
||||||
.inside {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
ul.order_notes {
|
ul.order_notes li {
|
||||||
li {
|
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#woocommerce_customers {
|
#woocommerce_customers {
|
||||||
p.search-box {
|
p.search-box {
|
||||||
|
@ -1785,12 +1743,10 @@ ul.wc_coupon_list_block {
|
||||||
}
|
}
|
||||||
|
|
||||||
.widefat {
|
.widefat {
|
||||||
&.customers {
|
&.customers td {
|
||||||
td {
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding: 4px 7px;
|
padding: 4px 7px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.column-order_title {
|
.column-order_title {
|
||||||
width: 15%;
|
width: 15%;
|
||||||
|
@ -1907,8 +1863,7 @@ ul.wc_coupon_list_block {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.column-customer_message {
|
.column-customer_message .note-on {
|
||||||
.note-on {
|
|
||||||
@include ir();
|
@include ir();
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
color: #999;
|
color: #999;
|
||||||
|
@ -1918,10 +1873,8 @@ ul.wc_coupon_list_block {
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.column-order_notes {
|
.column-order_notes .note-on {
|
||||||
.note-on {
|
|
||||||
@include ir();
|
@include ir();
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
color: #999;
|
color: #999;
|
||||||
|
@ -1931,7 +1884,6 @@ ul.wc_coupon_list_block {
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.order_actions {
|
.order_actions {
|
||||||
.processing,
|
.processing,
|
||||||
|
@ -2136,11 +2088,9 @@ table.wp-list-table {
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.column-price {
|
.column-price .woocommerce-price-suffix {
|
||||||
.woocommerce-price-suffix {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
img {
|
||||||
margin: 1px 2px;
|
margin: 1px 2px;
|
||||||
|
@ -2182,26 +2132,20 @@ table.wp-list-table {
|
||||||
&::before {
|
&::before {
|
||||||
content: '\f155';
|
content: '\f155';
|
||||||
}
|
}
|
||||||
&.not-featured {
|
&.not-featured::before {
|
||||||
&::before {
|
|
||||||
content: '\f154';
|
content: '\f154';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
td.column-featured {
|
td.column-featured span.wc-featured {
|
||||||
span.wc-featured {
|
|
||||||
font-size: 1.6em;
|
font-size: 1.6em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
span.wc-type {
|
span.wc-type::before {
|
||||||
&::before {
|
|
||||||
font-family: 'WooCommerce';
|
font-family: 'WooCommerce';
|
||||||
content: '\e006';
|
content: '\e006';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
span.product-type {
|
span.product-type {
|
||||||
@include ir();
|
@include ir();
|
||||||
|
@ -2397,8 +2341,7 @@ table.wc_input_table {
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-sortable:not( .ui-sortable-disabled ) {
|
.ui-sortable:not( .ui-sortable-disabled ) td.sort {
|
||||||
td.sort {
|
|
||||||
cursor: move;
|
cursor: move;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
background: #f9f9f9;
|
background: #f9f9f9;
|
||||||
|
@ -2417,13 +2360,10 @@ table.wc_input_table {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover::before {
|
||||||
&::before {
|
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -2455,14 +2395,10 @@ table.wc_input_table {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tr {
|
tr:last-child td {
|
||||||
&:last-child {
|
|
||||||
td {
|
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
table.wc_gateways,
|
table.wc_gateways,
|
||||||
table.wc_emails,
|
table.wc_emails,
|
||||||
|
@ -2475,11 +2411,9 @@ table.wc_shipping {
|
||||||
line-height: 2em;
|
line-height: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr:nth-child( odd ) {
|
tr:nth-child( odd ) td {
|
||||||
td {
|
|
||||||
background: #f9f9f9;
|
background: #f9f9f9;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
th {
|
||||||
padding: 9px 7px !important;
|
padding: 9px 7px !important;
|
||||||
|
@ -2545,8 +2479,7 @@ table.wc_shipping {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.wc-email-settings-table-actions {
|
.wc-email-settings-table-actions a {
|
||||||
a {
|
|
||||||
@include ir();
|
@include ir();
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
height: 2em !important;
|
height: 2em !important;
|
||||||
|
@ -2559,7 +2492,6 @@ table.wc_shipping {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.wc-shipping-zone-settings {
|
.wc-shipping-zone-settings {
|
||||||
th {
|
th {
|
||||||
padding: 24px 24px 24px 0;
|
padding: 24px 24px 24px 0;
|
||||||
|
@ -2613,19 +2545,15 @@ table.wc_shipping {
|
||||||
table {
|
table {
|
||||||
tr, tr:hover {
|
tr, tr:hover {
|
||||||
table.wc-shipping-zone-methods {
|
table.wc-shipping-zone-methods {
|
||||||
tr {
|
tr .row-actions {
|
||||||
.row-actions {
|
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
}
|
tr:hover .row-actions {
|
||||||
tr:hover {
|
|
||||||
.row-actions {
|
|
||||||
position: static;
|
position: static;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.wc-shipping-zones-heading .page-title-action {
|
.wc-shipping-zones-heading .page-title-action {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
@ -2715,12 +2643,10 @@ table.wc-shipping-zones, table.wc-shipping-zone-methods, table.wc-shipping-class
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tbody.wc-shipping-zone-rows, .wc-shipping-zone-method-rows {
|
tbody.wc-shipping-zone-rows, .wc-shipping-zone-method-rows {
|
||||||
tr:nth-child( odd ) {
|
tr:nth-child( odd ) td {
|
||||||
td {
|
|
||||||
background: #f9f9f9;
|
background: #f9f9f9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
tr.odd, .wc-shipping-class-rows tr:nth-child( odd ) {
|
tr.odd, .wc-shipping-class-rows tr:nth-child( odd ) {
|
||||||
td {
|
td {
|
||||||
background: #f9f9f9;
|
background: #f9f9f9;
|
||||||
|
@ -2746,12 +2672,10 @@ table.wc-shipping-zones, table.wc-shipping-zone-methods, table.wc-shipping-class
|
||||||
height: 100%;
|
height: 100%;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover::before {
|
||||||
&::before {
|
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
td.wc-shipping-zone-worldwide {
|
td.wc-shipping-zone-worldwide {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
&::before {
|
&::before {
|
||||||
|
@ -2907,8 +2831,7 @@ table.wc-shipping-zones, table.wc-shipping-zone-methods, table.wc-shipping-class
|
||||||
.wc-modal-shipping-method-settings {
|
.wc-modal-shipping-method-settings {
|
||||||
background: #f8f8f8;
|
background: #f8f8f8;
|
||||||
padding: 1em !important;
|
padding: 1em !important;
|
||||||
form {
|
form .form-table {
|
||||||
.form-table {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
margin: 0 0 1.5em;
|
margin: 0 0 1.5em;
|
||||||
|
@ -2948,7 +2871,6 @@ table.wc-shipping-zones, table.wc-shipping-zone-methods, table.wc-shipping-class
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.wc-backbone-modal .wc-shipping-zone-method-selector {
|
.wc-backbone-modal .wc-shipping-zone-method-selector {
|
||||||
p {
|
p {
|
||||||
|
@ -2986,26 +2908,20 @@ img.help_tip {
|
||||||
@include ir();
|
@include ir();
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-manual {
|
.status-manual::before {
|
||||||
&::before {
|
|
||||||
@include icon( '\e008' );
|
@include icon( '\e008' );
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.status-enabled {
|
.status-enabled::before {
|
||||||
&::before {
|
|
||||||
@include icon( '\e015' );
|
@include icon( '\e015' );
|
||||||
color: $woocommerce;
|
color: $woocommerce;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.status-disabled {
|
.status-disabled::before {
|
||||||
&::before {
|
|
||||||
@include icon( '\e013' );
|
@include icon( '\e013' );
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.woocommerce {
|
.woocommerce {
|
||||||
|
|
||||||
|
@ -3038,12 +2954,10 @@ img.help_tip {
|
||||||
margin-top: -4px;
|
margin-top: -4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor {
|
.editor textarea {
|
||||||
textarea {
|
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
textarea[disabled='disabled'] {
|
textarea[disabled='disabled'] {
|
||||||
background: #dfdfdf !important;
|
background: #dfdfdf !important;
|
||||||
|
@ -3154,10 +3068,14 @@ img.help_tip {
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
|
/* rtl:ignore */
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
|
/* rtl:ignore */
|
||||||
|
margin-left: -3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.colorpick {
|
.colorpick {
|
||||||
|
/* rtl:ignore */
|
||||||
border-left: 0;
|
border-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3197,15 +3115,12 @@ img.help_tip {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#postimagediv {
|
#postimagediv img {
|
||||||
img {
|
|
||||||
border: 1px solid #d5d5d5;
|
border: 1px solid #d5d5d5;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#woocommerce-product-images {
|
#woocommerce-product-images .inside {
|
||||||
.inside {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
|
@ -3286,14 +3201,12 @@ img.help_tip {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover::before {
|
||||||
&::before {
|
|
||||||
color: $red;
|
color: $red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
li:hover ul.actions {
|
li:hover ul.actions {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -3301,7 +3214,6 @@ img.help_tip {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#woocommerce-product-data {
|
#woocommerce-product-data {
|
||||||
.hndle {
|
.hndle {
|
||||||
|
@ -3468,73 +3380,52 @@ img.help_tip {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.general_options {
|
&.general_options a::before {
|
||||||
a::before {
|
|
||||||
content: '\f107';
|
content: '\f107';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.inventory_options {
|
&.inventory_options a::before {
|
||||||
a::before {
|
|
||||||
content: '\f481';
|
content: '\f481';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.shipping_options {
|
&.shipping_options a::before {
|
||||||
a::before {
|
|
||||||
font-family: 'WooCommerce';
|
font-family: 'WooCommerce';
|
||||||
content: '\e01a';
|
content: '\e01a';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.linked_product_options {
|
&.linked_product_options a::before {
|
||||||
a::before {
|
|
||||||
content: '\f103';
|
content: '\f103';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.attribute_options {
|
&.attribute_options a::before {
|
||||||
a::before {
|
|
||||||
content: '\f175';
|
content: '\f175';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.advanced_options {
|
&.advanced_options a::before {
|
||||||
a::before {
|
|
||||||
font-family: 'Dashicons';
|
font-family: 'Dashicons';
|
||||||
content: '\f111';
|
content: '\f111';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.variations_options {
|
&.variations_options a::before {
|
||||||
a::before {
|
|
||||||
content: '\f509';
|
content: '\f509';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.usage_restriction_options {
|
&.usage_restriction_options a::before {
|
||||||
a::before {
|
|
||||||
font-family: 'WooCommerce';
|
font-family: 'WooCommerce';
|
||||||
content: '\e602';
|
content: '\e602';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.usage_limit_options {
|
&.usage_limit_options a::before {
|
||||||
a::before {
|
|
||||||
font-family: 'WooCommerce';
|
font-family: 'WooCommerce';
|
||||||
content: '\e601';
|
content: '\e601';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.general_coupon_data {
|
&.general_coupon_data a::before {
|
||||||
a::before {
|
|
||||||
font-family: 'WooCommerce';
|
font-family: 'WooCommerce';
|
||||||
content: '\e600';
|
content: '\e600';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.active {
|
&.active a {
|
||||||
a {
|
|
||||||
color: #555;
|
color: #555;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
|
@ -3542,7 +3433,6 @@ img.help_tip {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shipping
|
* Shipping
|
||||||
|
@ -3557,11 +3447,9 @@ img.help_tip {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
tfoot {
|
tfoot th {
|
||||||
th {
|
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.add.button::before {
|
.add.button::before {
|
||||||
@include iconbefore( '\e007' );
|
@include iconbefore( '\e007' );
|
||||||
|
@ -3589,12 +3477,10 @@ img.help_tip {
|
||||||
padding: 9px;
|
padding: 9px;
|
||||||
color: #555;
|
color: #555;
|
||||||
|
|
||||||
.form-field {
|
.form-field .woocommerce-help-tip {
|
||||||
.woocommerce-help-tip {
|
|
||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.woocommerce_page_settings .woocommerce_options_panel,
|
.woocommerce_page_settings .woocommerce_options_panel,
|
||||||
.panel {
|
.panel {
|
||||||
|
@ -3634,8 +3520,7 @@ img.help_tip {
|
||||||
|
|
||||||
.woocommerce_variations,
|
.woocommerce_variations,
|
||||||
.woocommerce_options_panel {
|
.woocommerce_options_panel {
|
||||||
.downloadable_files {
|
.downloadable_files table {
|
||||||
table {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
|
||||||
|
@ -3712,18 +3597,14 @@ img.help_tip {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover::before {
|
||||||
&::before {
|
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
.woocommerce_variation {
|
.woocommerce_variation {
|
||||||
h3 {
|
h3 .sort {
|
||||||
.sort {
|
|
||||||
width: 17px;
|
width: 17px;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
|
@ -3747,13 +3628,10 @@ img.help_tip {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover::before {
|
||||||
&::before {
|
|
||||||
color: #777;
|
color: #777;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
h3:hover, &.ui-sortable-helper {
|
h3:hover, &.ui-sortable-helper {
|
||||||
.sort {
|
.sort {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
|
@ -3907,16 +3785,13 @@ img.help_tip {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.wc-radios {
|
ul.wc-radios label {
|
||||||
label {
|
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.dimensions_field {
|
.dimensions_field .wrap {
|
||||||
.wrap {
|
|
||||||
display: block;
|
display: block;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
|
||||||
|
@ -3929,7 +3804,6 @@ img.help_tip {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.padded {
|
&.padded {
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
@ -4000,12 +3874,10 @@ img.help_tip {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&#product_attributes {
|
&#product_attributes .expand-close {
|
||||||
.expand-close {
|
|
||||||
float: right;
|
float: right;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
button.add_variable_attribute,
|
button.add_variable_attribute,
|
||||||
.fr {
|
.fr {
|
||||||
|
@ -4057,11 +3929,9 @@ img.help_tip {
|
||||||
&.closed {
|
&.closed {
|
||||||
@include border-radius(3px);
|
@include border-radius(3px);
|
||||||
|
|
||||||
.handlediv {
|
.handlediv::before {
|
||||||
&::before {
|
|
||||||
content: '\f140' !important;
|
content: '\f140' !important;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
border: 0;
|
border: 0;
|
||||||
|
@ -4281,13 +4151,11 @@ img.help_tip {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover::before {
|
||||||
&::before {
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.options {
|
.options {
|
||||||
border: 1px solid #eee;
|
border: 1px solid #eee;
|
||||||
|
@ -4377,11 +4245,12 @@ img.tips {
|
||||||
|
|
||||||
#tiptip_holder {
|
#tiptip_holder {
|
||||||
display: none;
|
display: none;
|
||||||
|
z-index: 8675309;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
/*rtl:ignore*/
|
/*rtl:ignore*/
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 9999999;
|
|
||||||
|
|
||||||
&.tip_top {
|
&.tip_top {
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
|
@ -4454,8 +4323,8 @@ img.tips {
|
||||||
|
|
||||||
/*rtl:raw:
|
/*rtl:raw:
|
||||||
#tiptip_arrow {
|
#tiptip_arrow {
|
||||||
margin-right: 79.5px!important;
|
right: 50%;
|
||||||
margin-left: 0!important;
|
margin-right: -6px;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -4519,15 +4388,13 @@ img.ui-datepicker-trigger {
|
||||||
zoom: 1;
|
zoom: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.widefat {
|
.widefat td {
|
||||||
td {
|
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
padding: 7px;
|
padding: 7px;
|
||||||
.description {
|
.description {
|
||||||
margin: 4px 0 0;
|
margin: 4px 0 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.postbox {
|
.postbox {
|
||||||
&::after {
|
&::after {
|
||||||
|
@ -4893,12 +4760,10 @@ img.ui-datepicker-trigger {
|
||||||
float: left;
|
float: left;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
|
|
||||||
table {
|
table td {
|
||||||
td {
|
|
||||||
padding: 9px;
|
padding: 9px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.woocommerce-reports-sidebar {
|
.woocommerce-reports-sidebar {
|
||||||
display: inline;
|
display: inline;
|
||||||
|
@ -4932,19 +4797,15 @@ img.ui-datepicker-trigger {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a.edit {
|
a.edit::after {
|
||||||
&::after {
|
|
||||||
content: '\f464';
|
content: '\f464';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
a.view {
|
a.view::after {
|
||||||
&::after {
|
|
||||||
content: '\f177';
|
content: '\f177';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.woocommerce-wide-reports-wrap {
|
.woocommerce-wide-reports-wrap {
|
||||||
padding-bottom: 11px;
|
padding-bottom: 11px;
|
||||||
|
@ -5052,23 +4913,17 @@ table.bar_chart {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-type-shop_order {
|
.post-type-shop_order .woocommerce-BlankState-message::before {
|
||||||
.woocommerce-BlankState-message::before {
|
|
||||||
@include icon( '\e01d' );
|
@include icon( '\e01d' );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.post-type-shop_coupon {
|
.post-type-shop_coupon .woocommerce-BlankState-message::before {
|
||||||
.woocommerce-BlankState-message::before {
|
|
||||||
@include icon( '\e600' );
|
@include icon( '\e600' );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.post-type-product {
|
.post-type-product .woocommerce-BlankState-message::before {
|
||||||
.woocommerce-BlankState-message::before {
|
|
||||||
@include icon( '\e006' );
|
@include icon( '\e006' );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.woocommerce-BlankState {
|
.woocommerce-BlankState {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -5152,16 +5007,12 @@ table.bar_chart {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.woocommerce_variable_attributes {
|
.woocommerce_variable_attributes .downloadable_files table {
|
||||||
.downloadable_files {
|
|
||||||
table {
|
|
||||||
margin: 0 0 1em;
|
margin: 0 0 1em;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optimisation for screens 900px and smaller
|
* Optimisation for screens 900px and smaller
|
||||||
|
@ -5265,13 +5116,9 @@ table.bar_chart {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-expanded {
|
.is-expanded td:not( .hidden ) {
|
||||||
td {
|
|
||||||
&:not( .hidden ) {
|
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-row {
|
.toggle-row {
|
||||||
top: -28px;
|
top: -28px;
|
||||||
|
@ -5300,20 +5147,14 @@ table.bar_chart {
|
||||||
text-align: inherit;
|
text-align: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.column-order_notes {
|
.column-order_notes .note-on {
|
||||||
.note-on {
|
|
||||||
font-size: 1.3em;
|
font-size: 1.3em;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.is-expanded {
|
.is-expanded td:not(.hidden ) {
|
||||||
td {
|
|
||||||
&:not( .hidden ) {
|
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-row {
|
.toggle-row {
|
||||||
top: -15px;
|
top: -15px;
|
||||||
|
@ -5358,12 +5199,10 @@ table.bar_chart {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.wc-backbone-modal-shipping-method-settings {
|
&.wc-backbone-modal-shipping-method-settings .wc-backbone-modal-content {
|
||||||
.wc-backbone-modal-content {
|
|
||||||
width: 75%;
|
width: 75%;
|
||||||
min-width: 500px;
|
min-width: 500px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.select2-container {
|
.select2-container {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
|
@ -5541,22 +5380,17 @@ table.bar_chart {
|
||||||
color: #999;
|
color: #999;
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
}
|
}
|
||||||
.select2-search--inline {
|
.select2-search--inline .select2-search__field {
|
||||||
.select2-search__field {
|
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
font-weight: inherit;
|
font-weight: inherit;
|
||||||
padding: 3px 0;
|
padding: 3px 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
.woocommerce table.form-table .select2-container {
|
||||||
.woocommerce table.form-table {
|
|
||||||
.select2-container {
|
|
||||||
min-width: 400px !important;
|
min-width: 400px !important;
|
||||||
}
|
}
|
||||||
}
|
.post-type-shop_order .tablenav {
|
||||||
.post-type-shop_order {
|
|
||||||
.tablenav {
|
|
||||||
.actions {
|
.actions {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
@ -5573,4 +5407,3 @@ table.bar_chart {
|
||||||
margin: 1px 6px 4px 1px;
|
margin: 1px 6px 4px 1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}#adminmenu #toplevel_page_woocommerce .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e03d'}#adminmenu #menu-posts-product .menu-icon-post div.wp-menu-image::before,#adminmenu #menu-posts-product .menu-icon-product div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e006'}#adminmenu #toplevel_page_wc-reports .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e023';font-size:1.3em!important}span.mce_woocommerce_shortcodes_button{background-image:none!important;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}span.mce_woocommerce_shortcodes_button::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;right:0;width:100%;height:100%;text-align:center;content:"";font-size:.9em;line-height:1.2}.wc_plugin_upgrade_notice{font-weight:400;color:#fff;background:#d54d21;padding:1em;margin:9px 0}.wc_plugin_upgrade_notice a{color:#fff;text-decoration:underline}.wc_plugin_upgrade_notice::before{content:'\f348';display:inline-block;font:400 18px/1 dashicons;speak:none;margin:0 -2px 0 8px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}
|
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}#adminmenu #toplevel_page_woocommerce .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e03d'}#adminmenu #menu-posts-product .menu-icon-post div.wp-menu-image::before,#adminmenu #menu-posts-product .menu-icon-product div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e006'}#adminmenu #toplevel_page_wc-reports .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e023';font-size:1.3em!important}span.mce_woocommerce_shortcodes_button{background-image:none!important;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}span.mce_woocommerce_shortcodes_button::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;right:0;width:100%;height:100%;text-align:center;content:"";font-size:.9em;line-height:1.2}#woocommerce-update .updating-message .wc_plugin_upgrade_notice{display:none}#woocommerce-update .wc_plugin_upgrade_notice{font-weight:400;color:#fff!important;background:#d54d21!important;padding:1em!important;margin:9px 0!important}#woocommerce-update .wc_plugin_upgrade_notice a{color:#fff;text-decoration:underline}#woocommerce-update .wc_plugin_upgrade_notice::before{color:#fff!important;content:'\f348';display:inline-block;font:400 18px/1 dashicons;speak:none;margin:0 -2px 0 8px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}
|
|
@ -1 +1 @@
|
||||||
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}#adminmenu #toplevel_page_woocommerce .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e03d'}#adminmenu #menu-posts-product .menu-icon-post div.wp-menu-image::before,#adminmenu #menu-posts-product .menu-icon-product div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e006'}#adminmenu #toplevel_page_wc-reports .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e023';font-size:1.3em!important}span.mce_woocommerce_shortcodes_button{background-image:none!important;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}span.mce_woocommerce_shortcodes_button::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:.9em;line-height:1.2}.wc_plugin_upgrade_notice{font-weight:400;color:#fff;background:#d54d21;padding:1em;margin:9px 0}.wc_plugin_upgrade_notice a{color:#fff;text-decoration:underline}.wc_plugin_upgrade_notice::before{content:'\f348';display:inline-block;font:400 18px/1 dashicons;speak:none;margin:0 8px 0 -2px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}
|
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}#adminmenu #toplevel_page_woocommerce .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e03d'}#adminmenu #menu-posts-product .menu-icon-post div.wp-menu-image::before,#adminmenu #menu-posts-product .menu-icon-product div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e006'}#adminmenu #toplevel_page_wc-reports .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e023';font-size:1.3em!important}span.mce_woocommerce_shortcodes_button{background-image:none!important;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}span.mce_woocommerce_shortcodes_button::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:.9em;line-height:1.2}#woocommerce-update .updating-message .wc_plugin_upgrade_notice{display:none}#woocommerce-update .wc_plugin_upgrade_notice{font-weight:400;color:#fff!important;background:#d54d21!important;padding:1em!important;margin:9px 0!important}#woocommerce-update .wc_plugin_upgrade_notice a{color:#fff;text-decoration:underline}#woocommerce-update .wc_plugin_upgrade_notice::before{color:#fff!important;content:'\f348';display:inline-block;font:400 18px/1 dashicons;speak:none;margin:0 8px 0 -2px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}
|
|
@ -43,12 +43,18 @@ span.mce_woocommerce_shortcodes_button {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#woocommerce-update {
|
||||||
|
.updating-message {
|
||||||
|
.wc_plugin_upgrade_notice {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
.wc_plugin_upgrade_notice {
|
.wc_plugin_upgrade_notice {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: #fff;
|
color: #fff !important;
|
||||||
background: #d54d21;
|
background: #d54d21 !important;
|
||||||
padding: 1em;
|
padding: 1em !important;
|
||||||
margin: 9px 0;
|
margin: 9px 0 !important;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
@ -56,6 +62,7 @@ span.mce_woocommerce_shortcodes_button {
|
||||||
}
|
}
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
|
color: #fff !important;
|
||||||
content: '\f348';
|
content: '\f348';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font: 400 18px/1 dashicons;
|
font: 400 18px/1 dashicons;
|
||||||
|
@ -66,3 +73,4 @@ span.mce_woocommerce_shortcodes_button {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
float: right;
|
float: right;
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
|
z-index: 1600;
|
||||||
-webkit-transition: opacity 0.2s;
|
-webkit-transition: opacity 0.2s;
|
||||||
transition: opacity 0.2s;
|
transition: opacity 0.2s;
|
||||||
-webkit-box-shadow: none;
|
-webkit-box-shadow: none;
|
||||||
|
|
|
@ -372,6 +372,10 @@ table.variations {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.zoomImg {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
.woocommerce-product-gallery__image:nth-child(n+2) {
|
.woocommerce-product-gallery__image:nth-child(n+2) {
|
||||||
width: 25%;
|
width: 25%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -981,6 +985,32 @@ button.pswp__button--zoom:hover {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.colors-dark.woocommerce-checkout {
|
||||||
|
.wc_payment_method {
|
||||||
|
.payment_box {
|
||||||
|
background: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.select2-container--default {
|
||||||
|
.select2-results {
|
||||||
|
.select2-results__options {
|
||||||
|
background:#333;
|
||||||
|
}
|
||||||
|
.select2-results__option[aria-selected="true"]{
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.select2-selection--single {
|
||||||
|
background-color: #333;
|
||||||
|
border: 1px solid #555;
|
||||||
|
|
||||||
|
.select2-selection__rendered {
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Layout stuff
|
* Layout stuff
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -342,6 +342,11 @@
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.woocommerce-billing-fields,
|
||||||
|
.woocommerce-shipping-fields {
|
||||||
|
@include clearfix();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.woocommerce-account {
|
.woocommerce-account {
|
||||||
|
|
|
@ -39,11 +39,9 @@ p.demo_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-bar {
|
.admin-bar p.demo_store {
|
||||||
p.demo_store {
|
|
||||||
top: 32px;
|
top: 32px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility classes
|
* Utility classes
|
||||||
|
@ -103,12 +101,10 @@ p.demo_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.quantity {
|
.quantity .qty {
|
||||||
.qty {
|
|
||||||
width: 3.631em;
|
width: 3.631em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Product Page
|
* Product Page
|
||||||
|
@ -176,6 +172,10 @@ p.demo_store,
|
||||||
transition: all cubic-bezier(0.795, -0.035, 0.000, 1.000) .5s;
|
transition: all cubic-bezier(0.795, -0.035, 0.000, 1.000) .5s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.woocommerce-product-gallery__wrapper .zoomImg {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
.woocommerce-product-gallery__image:nth-child(n+2) {
|
.woocommerce-product-gallery__image:nth-child(n+2) {
|
||||||
width: 25%;
|
width: 25%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -431,11 +431,9 @@ p.demo_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.woocommerce-variation-description {
|
.woocommerce-variation-description p {
|
||||||
p {
|
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.reset_variations {
|
.reset_variations {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
|
@ -514,8 +512,7 @@ p.demo_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.products {
|
ul.products li.product {
|
||||||
li.product {
|
|
||||||
.onsale {
|
.onsale {
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -581,7 +578,6 @@ p.demo_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.woocommerce-result-count {
|
.woocommerce-result-count {
|
||||||
margin: 0 0 1em;
|
margin: 0 0 1em;
|
||||||
|
@ -685,14 +681,12 @@ p.demo_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.added {
|
&.added::after {
|
||||||
&::after {
|
|
||||||
font-family: 'WooCommerce';
|
font-family: 'WooCommerce';
|
||||||
content: '\e017';
|
content: '\e017';
|
||||||
margin-left: 0.53em;
|
margin-left: 0.53em;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: $secondary - #111;
|
background-color: $secondary - #111;
|
||||||
|
@ -911,22 +905,17 @@ p.demo_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.products {
|
.products .star-rating {
|
||||||
.star-rating {
|
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 0 0.5em;
|
margin: 0 0 0.5em;
|
||||||
float: none;
|
float: none;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.hreview-aggregate {
|
.hreview-aggregate .star-rating {
|
||||||
.star-rating {
|
|
||||||
margin: 10px 0 0;
|
margin: 10px 0 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#review_form {
|
#review_form #respond {
|
||||||
#respond {
|
|
||||||
@include clearfix();
|
@include clearfix();
|
||||||
position: static;
|
position: static;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -939,18 +928,15 @@ p.demo_store,
|
||||||
margin: 0 0 10px;
|
margin: 0 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-submit {
|
.form-submit input {
|
||||||
input {
|
|
||||||
left: auto;
|
left: auto;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
p.stars {
|
p.stars {
|
||||||
a {
|
a {
|
||||||
|
@ -974,20 +960,14 @@ p.demo_store,
|
||||||
text-indent: 0;
|
text-indent: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover ~ a::before {
|
||||||
~ a::before {
|
|
||||||
content: '\e021';
|
content: '\e021';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
&:hover a::before {
|
||||||
a {
|
|
||||||
&::before {
|
|
||||||
content: '\e020';
|
content: '\e020';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
a.active {
|
a.active {
|
||||||
|
@ -1000,13 +980,11 @@ p.demo_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a:not( .active ) {
|
a:not( .active )::before {
|
||||||
&::before {
|
|
||||||
content: '\e020';
|
content: '\e020';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tables
|
* Tables
|
||||||
|
@ -1070,14 +1048,12 @@ p.demo_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tbody:first-child {
|
tbody:first-child tr:first-child {
|
||||||
tr:first-child {
|
|
||||||
th,
|
th,
|
||||||
td {
|
td {
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
tfoot td,
|
tfoot td,
|
||||||
tfoot th,
|
tfoot th,
|
||||||
|
@ -1121,14 +1097,12 @@ p.demo_store,
|
||||||
&:last-child {
|
&:last-child {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.woocommerce-MyAccount-downloads-file {
|
.woocommerce-MyAccount-downloads-file::before {
|
||||||
&::before {
|
|
||||||
content: '\2193';
|
content: '\2193';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
td.product-name {
|
td.product-name {
|
||||||
dl.variation, .wc-item-meta {
|
dl.variation, .wc-item-meta {
|
||||||
|
@ -1161,7 +1135,6 @@ p.demo_store,
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cart sidebar
|
* Cart sidebar
|
||||||
*/
|
*/
|
||||||
|
@ -1237,8 +1210,7 @@ p.demo_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cart_list {
|
.cart_list li {
|
||||||
li {
|
|
||||||
padding-left: 2em;
|
padding-left: 2em;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
|
@ -1249,7 +1221,6 @@ p.demo_store,
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.buttons {
|
.buttons {
|
||||||
@include clearfix();
|
@include clearfix();
|
||||||
|
@ -1263,8 +1234,7 @@ p.demo_store,
|
||||||
/**
|
/**
|
||||||
* Forms
|
* Forms
|
||||||
*/
|
*/
|
||||||
form {
|
form .form-row {
|
||||||
.form-row {
|
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
margin: 0 0 6px;
|
margin: 0 0 6px;
|
||||||
|
|
||||||
|
@ -1359,7 +1329,6 @@ p.demo_store,
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
form.login,
|
form.login,
|
||||||
form.checkout_coupon,
|
form.checkout_coupon,
|
||||||
|
@ -1438,8 +1407,7 @@ p.demo_store,
|
||||||
/**
|
/**
|
||||||
* Layered nav widget
|
* Layered nav widget
|
||||||
*/
|
*/
|
||||||
.widget_layered_nav {
|
.widget_layered_nav ul {
|
||||||
ul {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
@ -1456,19 +1424,13 @@ p.demo_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
li.chosen {
|
li.chosen a::before {
|
||||||
a {
|
|
||||||
&::before {
|
|
||||||
@include iconbefore( '\e013' );
|
@include iconbefore( '\e013' );
|
||||||
color: $red;
|
color: $red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.widget_layered_nav_filters {
|
.widget_layered_nav_filters ul {
|
||||||
ul {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
@ -1491,7 +1453,6 @@ p.demo_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Price filter widget
|
* Price filter widget
|
||||||
|
@ -1508,9 +1469,6 @@ p.demo_store,
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
font-size: 1.15em;
|
font-size: 1.15em;
|
||||||
}
|
|
||||||
|
|
||||||
.button {
|
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1532,10 +1490,8 @@ p.demo_store,
|
||||||
cursor: ew-resize;
|
cursor: ew-resize;
|
||||||
outline: none;
|
outline: none;
|
||||||
top: -0.3em;
|
top: -0.3em;
|
||||||
|
/* rtl:ignore */
|
||||||
//&:last-child {
|
|
||||||
margin-left: -0.5em;
|
margin-left: -0.5em;
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-slider .ui-slider-range {
|
.ui-slider .ui-slider-range {
|
||||||
|
@ -1575,8 +1531,7 @@ p.demo_store,
|
||||||
/**
|
/**
|
||||||
* Rating Filter Widget
|
* Rating Filter Widget
|
||||||
*/
|
*/
|
||||||
.widget_rating_filter {
|
.widget_rating_filter ul {
|
||||||
ul {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
@ -1598,17 +1553,12 @@ p.demo_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
li.chosen {
|
li.chosen a::before {
|
||||||
a {
|
|
||||||
&::before {
|
|
||||||
@include iconbefore( '\e013' );
|
@include iconbefore( '\e013' );
|
||||||
color: $red;
|
color: $red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Photoswipe
|
* Photoswipe
|
||||||
|
@ -1688,19 +1638,9 @@ button.pswp__button--zoom:hover {
|
||||||
/**
|
/**
|
||||||
* Right to left styles
|
* Right to left styles
|
||||||
*/
|
*/
|
||||||
.rtl {
|
.rtl.woocommerce div.product div.images .flex-control-thumbs li {
|
||||||
&.woocommerce {
|
|
||||||
div.product {
|
|
||||||
div.images {
|
|
||||||
.flex-control-thumbs {
|
|
||||||
li {
|
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.woocommerce-message {
|
.woocommerce-message {
|
||||||
border-top-color: #8fae1b;
|
border-top-color: #8fae1b;
|
||||||
|
@ -1736,8 +1676,7 @@ button.pswp__button--zoom:hover {
|
||||||
@include clearfix();
|
@include clearfix();
|
||||||
}
|
}
|
||||||
|
|
||||||
.addresses {
|
.addresses .title {
|
||||||
.title {
|
|
||||||
@include clearfix();
|
@include clearfix();
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
|
@ -1748,23 +1687,17 @@ button.pswp__button--zoom:hover {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ol.commentlist.notes {
|
|
||||||
li.note {
|
|
||||||
|
|
||||||
|
ol.commentlist.notes li.note {
|
||||||
p.meta {
|
p.meta {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.description {
|
.description p:last-child {
|
||||||
p:last-child {
|
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
ul.digital-downloads {
|
ul.digital-downloads {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
@ -1806,9 +1739,7 @@ button.pswp__button--zoom:hover {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.actions {
|
td.actions .coupon .input-text {
|
||||||
.coupon {
|
|
||||||
.input-text {
|
|
||||||
float: left;
|
float: left;
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
|
@ -1819,8 +1750,6 @@ button.pswp__button--zoom:hover {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
input {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -1850,20 +1779,16 @@ button.pswp__button--zoom:hover {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shipping-calculator-button {
|
.shipping-calculator-button::after {
|
||||||
&::after {
|
|
||||||
@include iconafter( '\e019' );
|
@include iconafter( '\e019' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.cart_totals {
|
.cart_totals {
|
||||||
p {
|
p small {
|
||||||
small {
|
|
||||||
color: $subtext;
|
color: $subtext;
|
||||||
font-size: 0.83em;
|
font-size: 0.83em;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border-collapse: separate;
|
border-collapse: separate;
|
||||||
|
@ -1908,14 +1833,10 @@ button.pswp__button--zoom:hover {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cross-sells {
|
.cross-sells ul.products li.product {
|
||||||
ul.products {
|
|
||||||
li.product {
|
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
.checkout {
|
.checkout {
|
||||||
.col-2 {
|
.col-2 {
|
||||||
h3#ship-to-different-address {
|
h3#ship-to-different-address {
|
||||||
|
@ -2163,30 +2084,18 @@ button.pswp__button--zoom:hover {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* added to get around variation image flicker issue */
|
|
||||||
.product.has-default-attributes.has-children {
|
|
||||||
> .images {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Twenty Eleven specific styles
|
* Twenty Eleven specific styles
|
||||||
*/
|
*/
|
||||||
#content.twentyeleven {
|
#content.twentyeleven .woocommerce-pagination a {
|
||||||
.woocommerce-pagination {
|
|
||||||
a {
|
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Twenty Thirteen specific styles
|
* Twenty Thirteen specific styles
|
||||||
*/
|
*/
|
||||||
.single-product {
|
.single-product .twentythirteen {
|
||||||
.twentythirteen {
|
|
||||||
.entry-summary,
|
.entry-summary,
|
||||||
#reply-title,
|
#reply-title,
|
||||||
#respond #commentform {
|
#respond #commentform {
|
||||||
|
@ -2197,41 +2106,28 @@ button.pswp__button--zoom:hover {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.twentythirteen {
|
.twentythirteen .woocommerce-breadcrumb {
|
||||||
.woocommerce-breadcrumb {
|
|
||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Twenty Fourteen specific styles
|
* Twenty Fourteen specific styles
|
||||||
*/
|
*/
|
||||||
.twentyfourteen {
|
.twentyfourteen ul.products li.product {
|
||||||
ul.products {
|
|
||||||
li.product {
|
|
||||||
margin-top: 0 !important;
|
margin-top: 0 !important;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Twenty Sixteen specific styles
|
* Twenty Sixteen specific styles
|
||||||
*/
|
*/
|
||||||
body:not( .search-results ) {
|
body:not( .search-results ) .twentysixteen .entry-summary {
|
||||||
.twentysixteen {
|
|
||||||
.entry-summary {
|
|
||||||
color: inherit;
|
color: inherit;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.twentysixteen {
|
.twentysixteen .price ins {
|
||||||
.price ins {
|
|
||||||
background: inherit;
|
background: inherit;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -240,10 +240,9 @@ jQuery( function ( $ ) {
|
||||||
.on( 'click', 'button.add-order-fee', this.add_fee )
|
.on( 'click', 'button.add-order-fee', this.add_fee )
|
||||||
.on( 'click', 'button.add-order-shipping', this.add_shipping )
|
.on( 'click', 'button.add-order-shipping', this.add_shipping )
|
||||||
.on( 'click', 'button.add-order-tax', this.add_tax )
|
.on( 'click', 'button.add-order-tax', this.add_tax )
|
||||||
.on( 'click', 'button.calculate-action', this.calculate_totals )
|
|
||||||
.on( 'click', 'button.save-action', this.save_line_items )
|
.on( 'click', 'button.save-action', this.save_line_items )
|
||||||
.on( 'click', 'a.delete-order-tax', this.delete_tax )
|
.on( 'click', 'a.delete-order-tax', this.delete_tax )
|
||||||
.on( 'click', 'button.calculate-tax-action', this.calculate_tax )
|
.on( 'click', 'button.calculate-action', this.recalculate )
|
||||||
.on( 'click', 'a.edit-order-item', this.edit_item )
|
.on( 'click', 'a.edit-order-item', this.edit_item )
|
||||||
.on( 'click', 'a.delete-order-item', this.delete_item )
|
.on( 'click', 'a.delete-order-item', this.delete_item )
|
||||||
.on( 'click', 'tr.item, tr.fee, tr.shipping, tr.refund', this.select_row )
|
.on( 'click', 'tr.item, tr.fee, tr.shipping, tr.refund', this.select_row )
|
||||||
|
@ -524,8 +523,8 @@ jQuery( function ( $ ) {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
calculate_tax: function() {
|
recalculate: function() {
|
||||||
if ( window.confirm( woocommerce_admin_meta_boxes.calc_line_taxes ) ) {
|
if ( window.confirm( woocommerce_admin_meta_boxes.calc_totals ) ) {
|
||||||
wc_meta_boxes_order_items.block();
|
wc_meta_boxes_order_items.block();
|
||||||
|
|
||||||
var country = '';
|
var country = '';
|
||||||
|
@ -575,49 +574,6 @@ jQuery( function ( $ ) {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
calculate_totals: function() {
|
|
||||||
if ( window.confirm( woocommerce_admin_meta_boxes.calc_totals ) ) {
|
|
||||||
|
|
||||||
wc_meta_boxes_order_items.block();
|
|
||||||
|
|
||||||
// Get row totals
|
|
||||||
var line_totals = 0;
|
|
||||||
var tax = 0;
|
|
||||||
var shipping = 0;
|
|
||||||
|
|
||||||
$( '.woocommerce_order_items tr.shipping input.line_total' ).each(function() {
|
|
||||||
var cost = $( this ).val() || '0';
|
|
||||||
cost = accounting.unformat( cost, woocommerce_admin.mon_decimal_point );
|
|
||||||
shipping = shipping + parseFloat( cost );
|
|
||||||
});
|
|
||||||
|
|
||||||
$( '.woocommerce_order_items input.line_tax' ).each(function() {
|
|
||||||
var cost = $( this ).val() || '0';
|
|
||||||
cost = accounting.unformat( cost, woocommerce_admin.mon_decimal_point );
|
|
||||||
tax = tax + parseFloat( cost );
|
|
||||||
});
|
|
||||||
|
|
||||||
$( '.woocommerce_order_items tr.item, .woocommerce_order_items tr.fee' ).each(function() {
|
|
||||||
var line_total = $( this ).find( 'input.line_total' ).val() || '0';
|
|
||||||
line_totals = line_totals + accounting.unformat( line_total.replace( ',', '.' ) );
|
|
||||||
});
|
|
||||||
|
|
||||||
// Tax
|
|
||||||
if ( 'yes' === woocommerce_admin_meta_boxes.round_at_subtotal ) {
|
|
||||||
tax = parseFloat( accounting.toFixed( tax, woocommerce_admin_meta_boxes.rounding_precision ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set Total
|
|
||||||
$( '#_order_total' )
|
|
||||||
.val( accounting.formatNumber( line_totals + tax + shipping, woocommerce_admin_meta_boxes.currency_format_num_decimals, '', woocommerce_admin.mon_decimal_point ) )
|
|
||||||
.change();
|
|
||||||
|
|
||||||
$( 'button.save-action' ).click();
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
|
|
||||||
save_line_items: function() {
|
save_line_items: function() {
|
||||||
var data = {
|
var data = {
|
||||||
order_id: woocommerce_admin_meta_boxes.post_id,
|
order_id: woocommerce_admin_meta_boxes.post_id,
|
||||||
|
@ -837,8 +793,8 @@ jQuery( function ( $ ) {
|
||||||
var index = $items.find('tr').length + 1;
|
var index = $items.find('tr').length + 1;
|
||||||
var $row = '<tr data-meta_id="0">' +
|
var $row = '<tr data-meta_id="0">' +
|
||||||
'<td>' +
|
'<td>' +
|
||||||
'<input type="text" name="meta_key[' + $item.attr( 'data-order_item_id' ) + '][new-' + index + ']" />' +
|
'<input type="text" placeholder="' + woocommerce_admin_meta_boxes_order.placeholder_name + '" name="meta_key[' + $item.attr( 'data-order_item_id' ) + '][new-' + index + ']" />' +
|
||||||
'<textarea name="meta_value[' + $item.attr( 'data-order_item_id' ) + '][new-' + index + ']"></textarea>' +
|
'<textarea placeholder="' + woocommerce_admin_meta_boxes_order.placeholder_value + '" name="meta_value[' + $item.attr( 'data-order_item_id' ) + '][new-' + index + ']"></textarea>' +
|
||||||
'</td>' +
|
'</td>' +
|
||||||
'<td width="1%"><button class="remove_order_item_meta button">×</button></td>' +
|
'<td width="1%"><button class="remove_order_item_meta button">×</button></td>' +
|
||||||
'</tr>';
|
'</tr>';
|
||||||
|
|
|
@ -407,7 +407,7 @@ jQuery( function( $ ) {
|
||||||
window.alert( response.error );
|
window.alert( response.error );
|
||||||
} else if ( response.slug ) {
|
} else if ( response.slug ) {
|
||||||
// Success.
|
// Success.
|
||||||
$wrapper.find( 'select.attribute_values' ).append( '<option value="' + response.slug + '" selected="selected">' + response.name + '</option>' );
|
$wrapper.find( 'select.attribute_values' ).append( '<option value="' + response.term_id + '" selected="selected">' + response.name + '</option>' );
|
||||||
$wrapper.find( 'select.attribute_values' ).change();
|
$wrapper.find( 'select.attribute_values' ).change();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global ajaxurl, inlineEditPost, inlineEditL10n, woocommerce_admin */
|
/*global inlineEditPost, woocommerce_admin */
|
||||||
jQuery(function( $ ) {
|
jQuery(function( $ ) {
|
||||||
$( '#the-list' ).on( 'click', '.editinline', function() {
|
$( '#the-list' ).on( 'click', '.editinline', function() {
|
||||||
|
|
||||||
|
@ -104,10 +104,6 @@ jQuery(function( $ ) {
|
||||||
$( 'input.text', '.inline-edit-row' ).val( '' );
|
$( 'input.text', '.inline-edit-row' ).val( '' );
|
||||||
$( '#woocommerce-fields' ).find( 'select' ).prop( 'selectedIndex', 0 );
|
$( '#woocommerce-fields' ).find( 'select' ).prop( 'selectedIndex', 0 );
|
||||||
$( '#woocommerce-fields-bulk' ).find( '.inline-edit-group .change-input' ).hide();
|
$( '#woocommerce-fields-bulk' ).find( '.inline-edit-group .change-input' ).hide();
|
||||||
|
|
||||||
// Autosuggest product tags on bulk edit
|
|
||||||
var tax = 'product_tag';
|
|
||||||
$( 'tr.inline-editor textarea[name="tax_input[' + tax + ']"]' ).suggest( ajaxurl + ( ajaxurl.indexOf( '?' ) > 0 ? '&' : '?' ) + 'action=ajax-tag-search&tax=' + tax, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma } );
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$( '#wpbody' ).on( 'change', '#woocommerce-fields-bulk .inline-edit-group .change_to', function() {
|
$( '#wpbody' ).on( 'change', '#woocommerce-fields-bulk .inline-edit-group .change_to', function() {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
jQuery(function(a){a("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var b=a(this).closest("tr").attr("id");b=b.replace("post-","");var c=a("#woocommerce_inline_"+b),d=c.find(".sku").text(),e=c.find(".regular_price").text(),f=c.find(".sale_price ").text(),g=c.find(".weight").text(),h=c.find(".length").text(),i=c.find(".width").text(),j=c.find(".height").text(),k=c.find(".shipping_class").text(),l=c.find(".visibility").text(),m=c.find(".stock_status").text(),n=c.find(".stock").text(),o=c.find(".featured").text(),p=c.find(".manage_stock").text(),q=c.find(".menu_order").text(),r=c.find(".tax_status").text(),s=c.find(".tax_class").text(),t=c.find(".backorders").text(),u=e.replace(".",woocommerce_admin.mon_decimal_point),v=f.replace(".",woocommerce_admin.mon_decimal_point);a('input[name="_sku"]',".inline-edit-row").val(d),a('input[name="_regular_price"]',".inline-edit-row").val(u),a('input[name="_sale_price"]',".inline-edit-row").val(v),a('input[name="_weight"]',".inline-edit-row").val(g),a('input[name="_length"]',".inline-edit-row").val(h),a('input[name="_width"]',".inline-edit-row").val(i),a('input[name="_height"]',".inline-edit-row").val(j),a('select[name="_shipping_class"] option:selected',".inline-edit-row").attr("selected",!1).change(),a('select[name="_shipping_class"] option[value="'+k+'"]').attr("selected","selected").change(),a('input[name="_stock"]',".inline-edit-row").val(n),a('input[name="menu_order"]',".inline-edit-row").val(q),a('select[name="_tax_status"] option, select[name="_tax_class"] option, select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option').removeAttr("selected"),a('select[name="_tax_status"] option[value="'+r+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_tax_class"] option[value="'+s+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_visibility"] option[value="'+l+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_stock_status"] option[value="'+m+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_backorders"] option[value="'+t+'"]',".inline-edit-row").attr("selected","selected"),"yes"===o?a('input[name="_featured"]',".inline-edit-row").attr("checked","checked"):a('input[name="_featured"]',".inline-edit-row").removeAttr("checked"),"yes"===p?(a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"),a('input[name="_manage_stock"]',".inline-edit-row").attr("checked","checked")):(a(".stock_qty_field",".inline-edit-row").hide(),a('input[name="_manage_stock"]',".inline-edit-row").removeAttr("checked"));var w=c.find(".product_type").text(),x=c.find(".product_is_virtual").text();"simple"===w||"external"===w?a(".price_fields",".inline-edit-row").show().removeAttr("style"):a(".price_fields",".inline-edit-row").hide(),"yes"===x?a(".dimension_fields",".inline-edit-row").hide():a(".dimension_fields",".inline-edit-row").show().removeAttr("style"),"grouped"===w?a(".stock_fields",".inline-edit-row").hide():a(".stock_fields",".inline-edit-row").show().removeAttr("style")}),a("#the-list").on("change",'.inline-edit-row input[name="_manage_stock"]',function(){a(this).is(":checked")?a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"):a(".stock_qty_field",".inline-edit-row").hide()}),a("#wpbody").on("click","#doaction, #doaction2",function(){a("input.text",".inline-edit-row").val(""),a("#woocommerce-fields").find("select").prop("selectedIndex",0),a("#woocommerce-fields-bulk").find(".inline-edit-group .change-input").hide();var b="product_tag";a('tr.inline-editor textarea[name="tax_input['+b+']"]').suggest(ajaxurl+(ajaxurl.indexOf("?")>0?"&":"?")+"action=ajax-tag-search&tax="+b,{delay:500,minchars:2,multiple:!0,multipleSep:inlineEditL10n.comma})}),a("#wpbody").on("change","#woocommerce-fields-bulk .inline-edit-group .change_to",function(){0<a(this).val()?a(this).closest("div").find(".change-input").show():a(this).closest("div").find(".change-input").hide()})});
|
jQuery(function(a){a("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var b=a(this).closest("tr").attr("id");b=b.replace("post-","");var c=a("#woocommerce_inline_"+b),d=c.find(".sku").text(),e=c.find(".regular_price").text(),f=c.find(".sale_price ").text(),g=c.find(".weight").text(),h=c.find(".length").text(),i=c.find(".width").text(),j=c.find(".height").text(),k=c.find(".shipping_class").text(),l=c.find(".visibility").text(),m=c.find(".stock_status").text(),n=c.find(".stock").text(),o=c.find(".featured").text(),p=c.find(".manage_stock").text(),q=c.find(".menu_order").text(),r=c.find(".tax_status").text(),s=c.find(".tax_class").text(),t=c.find(".backorders").text(),u=e.replace(".",woocommerce_admin.mon_decimal_point),v=f.replace(".",woocommerce_admin.mon_decimal_point);a('input[name="_sku"]',".inline-edit-row").val(d),a('input[name="_regular_price"]',".inline-edit-row").val(u),a('input[name="_sale_price"]',".inline-edit-row").val(v),a('input[name="_weight"]',".inline-edit-row").val(g),a('input[name="_length"]',".inline-edit-row").val(h),a('input[name="_width"]',".inline-edit-row").val(i),a('input[name="_height"]',".inline-edit-row").val(j),a('select[name="_shipping_class"] option:selected',".inline-edit-row").attr("selected",!1).change(),a('select[name="_shipping_class"] option[value="'+k+'"]').attr("selected","selected").change(),a('input[name="_stock"]',".inline-edit-row").val(n),a('input[name="menu_order"]',".inline-edit-row").val(q),a('select[name="_tax_status"] option, select[name="_tax_class"] option, select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option').removeAttr("selected"),a('select[name="_tax_status"] option[value="'+r+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_tax_class"] option[value="'+s+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_visibility"] option[value="'+l+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_stock_status"] option[value="'+m+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_backorders"] option[value="'+t+'"]',".inline-edit-row").attr("selected","selected"),"yes"===o?a('input[name="_featured"]',".inline-edit-row").attr("checked","checked"):a('input[name="_featured"]',".inline-edit-row").removeAttr("checked"),"yes"===p?(a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"),a('input[name="_manage_stock"]',".inline-edit-row").attr("checked","checked")):(a(".stock_qty_field",".inline-edit-row").hide(),a('input[name="_manage_stock"]',".inline-edit-row").removeAttr("checked"));var w=c.find(".product_type").text(),x=c.find(".product_is_virtual").text();"simple"===w||"external"===w?a(".price_fields",".inline-edit-row").show().removeAttr("style"):a(".price_fields",".inline-edit-row").hide(),"yes"===x?a(".dimension_fields",".inline-edit-row").hide():a(".dimension_fields",".inline-edit-row").show().removeAttr("style"),"grouped"===w?a(".stock_fields",".inline-edit-row").hide():a(".stock_fields",".inline-edit-row").show().removeAttr("style")}),a("#the-list").on("change",'.inline-edit-row input[name="_manage_stock"]',function(){a(this).is(":checked")?a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"):a(".stock_qty_field",".inline-edit-row").hide()}),a("#wpbody").on("click","#doaction, #doaction2",function(){a("input.text",".inline-edit-row").val(""),a("#woocommerce-fields").find("select").prop("selectedIndex",0),a("#woocommerce-fields-bulk").find(".inline-edit-group .change-input").hide()}),a("#wpbody").on("change","#woocommerce-fields-bulk .inline-edit-group .change_to",function(){0<a(this).val()?a(this).closest("div").find(".change-input").show():a(this).closest("div").find(".change-input").hide()})});
|
|
@ -110,6 +110,7 @@ jQuery(function( $ ) {
|
||||||
defaultDate: '',
|
defaultDate: '',
|
||||||
dateFormat: 'yy-mm-dd',
|
dateFormat: 'yy-mm-dd',
|
||||||
numberOfMonths: 1,
|
numberOfMonths: 1,
|
||||||
|
minDate: '-20Y',
|
||||||
maxDate: '+0D',
|
maxDate: '+0D',
|
||||||
showButtonPanel: true,
|
showButtonPanel: true,
|
||||||
showOn: 'focus',
|
showOn: 'focus',
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
jQuery(function(a){function b(b,c,d){a('<div class="chart-tooltip">'+d+"</div>").css({top:c-16,left:b+20}).appendTo("body").fadeIn(200)}var c=null,d=null;a(".chart-placeholder").bind("plothover",function(e,f,g){if(g){if((c!==g.dataIndex||d!==g.seriesIndex)&&(c=g.dataIndex,d=g.seriesIndex,a(".chart-tooltip").remove(),g.series.points.show||g.series.enable_tooltip)){var h=g.series.data[g.dataIndex][1],i="";g.series.prepend_label&&(i=i+g.series.label+": "),g.series.prepend_tooltip&&(i+=g.series.prepend_tooltip),i+=h,g.series.append_tooltip&&(i+=g.series.append_tooltip),g.series.pie.show?b(f.pageX,f.pageY,i):b(g.pageX,g.pageY,i)}}else a(".chart-tooltip").remove(),c=null}),a(".wc_sparkline.bars").each(function(){var b=a(this).data("sparkline"),c={grid:{show:!1}},d=[{data:b,color:a(this).data("color"),bars:{fillColor:a(this).data("color"),fill:!0,show:!0,lineWidth:1,barWidth:a(this).data("barwidth"),align:"center"},shadowSize:0}];a.plot(a(this),d,c)}),a(".wc_sparkline.lines").each(function(){var b=a(this).data("sparkline"),c={grid:{show:!1}},d=[{data:b,color:a(this).data("color"),lines:{fill:!1,show:!0,lineWidth:1,align:"center"},shadowSize:0}];a.plot(a(this),d,c)});var e=a(".range_datepicker").datepicker({changeMonth:!0,changeYear:!0,defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,maxDate:"+0D",showButtonPanel:!0,showOn:"focus",buttonImageOnly:!0,onSelect:function(b){var c=a(this).is(".from")?"minDate":"maxDate",d=a(this).data("datepicker"),f=a.datepicker.parseDate(d.settings.dateFormat||a.datepicker._defaults.dateFormat,b,d.settings);e.not(this).datepicker("option",c,f)}}),f=document.createElement("a");"undefined"==typeof f.download&&a(".export_csv").hide(),a(".export_csv").click(function(){var b=a(this).data("exclude_series")||"";b=b.toString(),b=b.split(",");var c,d,e,f=a(this).data("xaxes"),g=a(this).data("groupby"),h=a(this).data("index_type"),i=a(this).data("export"),j="data:application/csv;charset=utf-8,";if("table"===i)a(this).offsetParent().find("thead tr,tbody tr").each(function(){a(this).find("th, td").each(function(){var b=a(this).text();b=b.replace("[?]","").replace("#",""),j+='"'+b+'",'}),j=j.substring(0,j.length-1),j+="\n"}),a(this).offsetParent().find("tfoot tr").each(function(){a(this).find("th, td").each(function(){var b=a(this).text();if(b=b.replace("[?]","").replace("#",""),j+='"'+b+'",',a(this).attr("colspan")>0)for(n=1;n<a(this).attr("colspan");n++)j+='"",'}),j=j.substring(0,j.length-1),j+="\n"});else{if(!window.main_chart)return!1;var k=window.main_chart.getData(),l=[];for(j+='"'+f+'",',a.each(k,function(c,d){b&&a.inArray(c.toString(),b)!==-1||l.push(d)}),c=0;c<l.length;++c)j+='"'+l[c].label+'",';j=j.substring(0,j.length-1),j+="\n";var m={};for(c=0;c<l.length;++c)for(d=l[c].data,e=0;e<d.length;++e){m[d[e][0]]=[];for(var n=0;n<l.length;++n)m[d[e][0]].push(0)}for(c=0;c<l.length;++c)for(d=l[c].data,e=0;e<d.length;++e)m[d[e][0]][c]=d[e][1];a.each(m,function(a,b){var c=new Date(parseInt(a,10));j+="none"===h?'"'+a+'",':"day"===g?'"'+c.getUTCFullYear()+"-"+parseInt(c.getUTCMonth()+1,10)+"-"+c.getUTCDate()+'",':'"'+c.getUTCFullYear()+"-"+parseInt(c.getUTCMonth()+1,10)+'",';for(var d=0;d<b.length;++d){var e=b[d];Math.round(e)!==e&&(e=parseFloat(e),e=e.toFixed(2)),j+='"'+e+'",'}j=j.substring(0,j.length-1),j+="\n"})}return a(this).attr("href",encodeURI(j)),!0})});
|
jQuery(function(a){function b(b,c,d){a('<div class="chart-tooltip">'+d+"</div>").css({top:c-16,left:b+20}).appendTo("body").fadeIn(200)}var c=null,d=null;a(".chart-placeholder").bind("plothover",function(e,f,g){if(g){if((c!==g.dataIndex||d!==g.seriesIndex)&&(c=g.dataIndex,d=g.seriesIndex,a(".chart-tooltip").remove(),g.series.points.show||g.series.enable_tooltip)){var h=g.series.data[g.dataIndex][1],i="";g.series.prepend_label&&(i=i+g.series.label+": "),g.series.prepend_tooltip&&(i+=g.series.prepend_tooltip),i+=h,g.series.append_tooltip&&(i+=g.series.append_tooltip),g.series.pie.show?b(f.pageX,f.pageY,i):b(g.pageX,g.pageY,i)}}else a(".chart-tooltip").remove(),c=null}),a(".wc_sparkline.bars").each(function(){var b=a(this).data("sparkline"),c={grid:{show:!1}},d=[{data:b,color:a(this).data("color"),bars:{fillColor:a(this).data("color"),fill:!0,show:!0,lineWidth:1,barWidth:a(this).data("barwidth"),align:"center"},shadowSize:0}];a.plot(a(this),d,c)}),a(".wc_sparkline.lines").each(function(){var b=a(this).data("sparkline"),c={grid:{show:!1}},d=[{data:b,color:a(this).data("color"),lines:{fill:!1,show:!0,lineWidth:1,align:"center"},shadowSize:0}];a.plot(a(this),d,c)});var e=a(".range_datepicker").datepicker({changeMonth:!0,changeYear:!0,defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,minDate:"-20Y",maxDate:"+0D",showButtonPanel:!0,showOn:"focus",buttonImageOnly:!0,onSelect:function(b){var c=a(this).is(".from")?"minDate":"maxDate",d=a(this).data("datepicker"),f=a.datepicker.parseDate(d.settings.dateFormat||a.datepicker._defaults.dateFormat,b,d.settings);e.not(this).datepicker("option",c,f)}}),f=document.createElement("a");"undefined"==typeof f.download&&a(".export_csv").hide(),a(".export_csv").click(function(){var b=a(this).data("exclude_series")||"";b=b.toString(),b=b.split(",");var c,d,e,f=a(this).data("xaxes"),g=a(this).data("groupby"),h=a(this).data("index_type"),i=a(this).data("export"),j="data:application/csv;charset=utf-8,";if("table"===i)a(this).offsetParent().find("thead tr,tbody tr").each(function(){a(this).find("th, td").each(function(){var b=a(this).text();b=b.replace("[?]","").replace("#",""),j+='"'+b+'",'}),j=j.substring(0,j.length-1),j+="\n"}),a(this).offsetParent().find("tfoot tr").each(function(){a(this).find("th, td").each(function(){var b=a(this).text();if(b=b.replace("[?]","").replace("#",""),j+='"'+b+'",',a(this).attr("colspan")>0)for(n=1;n<a(this).attr("colspan");n++)j+='"",'}),j=j.substring(0,j.length-1),j+="\n"});else{if(!window.main_chart)return!1;var k=window.main_chart.getData(),l=[];for(j+='"'+f+'",',a.each(k,function(c,d){b&&a.inArray(c.toString(),b)!==-1||l.push(d)}),c=0;c<l.length;++c)j+='"'+l[c].label+'",';j=j.substring(0,j.length-1),j+="\n";var m={};for(c=0;c<l.length;++c)for(d=l[c].data,e=0;e<d.length;++e){m[d[e][0]]=[];for(var n=0;n<l.length;++n)m[d[e][0]].push(0)}for(c=0;c<l.length;++c)for(d=l[c].data,e=0;e<d.length;++e)m[d[e][0]][c]=d[e][1];a.each(m,function(a,b){var c=new Date(parseInt(a,10));j+="none"===h?'"'+a+'",':"day"===g?'"'+c.getUTCFullYear()+"-"+parseInt(c.getUTCMonth()+1,10)+"-"+c.getUTCDate()+'",':'"'+c.getUTCFullYear()+"-"+parseInt(c.getUTCMonth()+1,10)+'",';for(var d=0;d<b.length;++d){var e=b[d];Math.round(e)!==e&&(e=parseFloat(e),e=e.toFixed(2)),j+='"'+e+'",'}j=j.substring(0,j.length-1),j+="\n"})}return a(this).attr("href",encodeURI(j)),!0})});
|
|
@ -2,21 +2,11 @@
|
||||||
jQuery( function( $ ) {
|
jQuery( function( $ ) {
|
||||||
|
|
||||||
function getEnhancedSelectFormatString() {
|
function getEnhancedSelectFormatString() {
|
||||||
var formatString = {
|
return {
|
||||||
noResults: function() {
|
'language': {
|
||||||
return wc_enhanced_select_params.i18n_no_matches;
|
|
||||||
},
|
|
||||||
errorLoading: function() {
|
errorLoading: function() {
|
||||||
return wc_enhanced_select_params.i18n_ajax_error;
|
// Workaround for https://github.com/select2/select2/issues/4355 instead of i18n_ajax_error.
|
||||||
},
|
return wc_enhanced_select_params.i18n_searching;
|
||||||
inputTooShort: function( args ) {
|
|
||||||
var remainingChars = args.minimum - args.input.length;
|
|
||||||
|
|
||||||
if ( 1 === remainingChars ) {
|
|
||||||
return wc_enhanced_select_params.i18n_input_too_short_1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return wc_enhanced_select_params.i18n_input_too_short_n.replace( '%qty%', remainingChars );
|
|
||||||
},
|
},
|
||||||
inputTooLong: function( args ) {
|
inputTooLong: function( args ) {
|
||||||
var overChars = args.input.length - args.maximum;
|
var overChars = args.input.length - args.maximum;
|
||||||
|
@ -27,6 +17,18 @@ jQuery( function( $ ) {
|
||||||
|
|
||||||
return wc_enhanced_select_params.i18n_input_too_long_n.replace( '%qty%', overChars );
|
return wc_enhanced_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_enhanced_select_params.i18n_input_too_short_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wc_enhanced_select_params.i18n_input_too_short_n.replace( '%qty%', remainingChars );
|
||||||
|
},
|
||||||
|
loadingMore: function() {
|
||||||
|
return wc_enhanced_select_params.i18n_load_more;
|
||||||
|
},
|
||||||
maximumSelected: function( args ) {
|
maximumSelected: function( args ) {
|
||||||
if ( args.maximum === 1 ) {
|
if ( args.maximum === 1 ) {
|
||||||
return wc_enhanced_select_params.i18n_selection_too_long_1;
|
return wc_enhanced_select_params.i18n_selection_too_long_1;
|
||||||
|
@ -34,19 +36,17 @@ jQuery( function( $ ) {
|
||||||
|
|
||||||
return wc_enhanced_select_params.i18n_selection_too_long_n.replace( '%qty%', args.maximum );
|
return wc_enhanced_select_params.i18n_selection_too_long_n.replace( '%qty%', args.maximum );
|
||||||
},
|
},
|
||||||
loadingMore: function() {
|
noResults: function() {
|
||||||
return wc_enhanced_select_params.i18n_load_more;
|
return wc_enhanced_select_params.i18n_no_matches;
|
||||||
},
|
},
|
||||||
searching: function() {
|
searching: function() {
|
||||||
return wc_enhanced_select_params.i18n_searching;
|
return wc_enhanced_select_params.i18n_searching;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var language = { 'language' : formatString };
|
|
||||||
|
|
||||||
return language;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
$( document.body )
|
$( document.body )
|
||||||
|
|
||||||
.on( 'wc-enhanced-select-init', function() {
|
.on( 'wc-enhanced-select-init', function() {
|
||||||
|
@ -84,7 +84,7 @@ jQuery( function( $ ) {
|
||||||
ajax: {
|
ajax: {
|
||||||
url: wc_enhanced_select_params.ajax_url,
|
url: wc_enhanced_select_params.ajax_url,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
quietMillis: 250,
|
delay: 250,
|
||||||
data: function( params ) {
|
data: function( params ) {
|
||||||
return {
|
return {
|
||||||
term: params.term,
|
term: params.term,
|
||||||
|
@ -139,14 +139,14 @@ jQuery( function( $ ) {
|
||||||
var select2_args = {
|
var select2_args = {
|
||||||
allowClear: $( this ).data( 'allow_clear' ) ? true : false,
|
allowClear: $( this ).data( 'allow_clear' ) ? true : false,
|
||||||
placeholder: $( this ).data( 'placeholder' ),
|
placeholder: $( this ).data( 'placeholder' ),
|
||||||
minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
|
minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '1',
|
||||||
escapeMarkup: function( m ) {
|
escapeMarkup: function( m ) {
|
||||||
return m;
|
return m;
|
||||||
},
|
},
|
||||||
ajax: {
|
ajax: {
|
||||||
url: wc_enhanced_select_params.ajax_url,
|
url: wc_enhanced_select_params.ajax_url,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
quietMillis: 250,
|
delay: 250,
|
||||||
data: function( params ) {
|
data: function( params ) {
|
||||||
return {
|
return {
|
||||||
term: params.term,
|
term: params.term,
|
||||||
|
@ -210,5 +210,8 @@ jQuery( function( $ ) {
|
||||||
$( '.wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search' ).filter( '.select2-hidden-accessible' ).select2( 'close' );
|
$( '.wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search' ).filter( '.select2-hidden-accessible' ).select2( 'close' );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
} catch( err ) {
|
||||||
|
// If select2 failed (conflict?) log the error but don't stop other scripts breaking.
|
||||||
|
window.console.log( err );
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
jQuery(function(a){function b(){var a={noResults:function(){return wc_enhanced_select_params.i18n_no_matches},errorLoading:function(){return wc_enhanced_select_params.i18n_ajax_error},inputTooShort:function(a){var b=a.minimum-a.input.length;return 1===b?wc_enhanced_select_params.i18n_input_too_short_1:wc_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",b)},inputTooLong:function(a){var b=a.input.length-a.maximum;return 1===b?wc_enhanced_select_params.i18n_input_too_long_1:wc_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",b)},maximumSelected:function(a){return 1===a.maximum?wc_enhanced_select_params.i18n_selection_too_long_1:wc_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",a.maximum)},loadingMore:function(){return wc_enhanced_select_params.i18n_load_more},searching:function(){return wc_enhanced_select_params.i18n_searching}},b={language:a};return b}a(document.body).on("wc-enhanced-select-init",function(){a(":input.wc-enhanced-select, :input.chosen_select").filter(":not(.enhanced)").each(function(){var c=a.extend({minimumResultsForSearch:10,allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder")},b());a(this).select2(c).addClass("enhanced")}),a(":input.wc-enhanced-select-nostd, :input.chosen_select_nostd").filter(":not(.enhanced)").each(function(){var c=a.extend({minimumResultsForSearch:10,allowClear:!0,placeholder:a(this).data("placeholder")},b());a(this).select2(c).addClass("enhanced")}),a(":input.wc-product-search").filter(":not(.enhanced)").each(function(){var c={allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"3",escapeMarkup:function(a){return a},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",quietMillis:250,data:function(b){return{term:b.term,action:a(this).data("action")||"woocommerce_json_search_products_and_variations",security:wc_enhanced_select_params.search_products_nonce,exclude:a(this).data("exclude"),include:a(this).data("include"),limit:a(this).data("limit")}},processResults:function(b){var c=[];return b&&a.each(b,function(a,b){c.push({id:a,text:b})}),{results:c}},cache:!0}};if(c=a.extend(c,b()),a(this).select2(c).addClass("enhanced"),a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id,c=d.find('option[value="'+b+'"]')[0];d.prepend(c)})}})}}),a(":input.wc-customer-search").filter(":not(.enhanced)").each(function(){var c={allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"3",escapeMarkup:function(a){return a},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",quietMillis:250,data:function(b){return{term:b.term,action:"woocommerce_json_search_customers",security:wc_enhanced_select_params.search_customers_nonce,exclude:a(this).data("exclude")}},processResults:function(b){var c=[];return b&&a.each(b,function(a,b){c.push({id:a,text:b})}),{results:c}},cache:!0}};if(c=a.extend(c,b()),a(this).select2(c).addClass("enhanced"),a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id,c=d.find('option[value="'+b+'"]')[0];d.prepend(c)})}})}})}).on("wc_backbone_modal_before_remove",function(){a(".wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search").filter(".select2-hidden-accessible").select2("close")}).trigger("wc-enhanced-select-init"),a("html").on("click",function(b){this===b.target&&a(".wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search").filter(".select2-hidden-accessible").select2("close")})});
|
jQuery(function(a){function b(){return{language:{errorLoading:function(){return wc_enhanced_select_params.i18n_searching},inputTooLong:function(a){var b=a.input.length-a.maximum;return 1===b?wc_enhanced_select_params.i18n_input_too_long_1:wc_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",b)},inputTooShort:function(a){var b=a.minimum-a.input.length;return 1===b?wc_enhanced_select_params.i18n_input_too_short_1:wc_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",b)},loadingMore:function(){return wc_enhanced_select_params.i18n_load_more},maximumSelected:function(a){return 1===a.maximum?wc_enhanced_select_params.i18n_selection_too_long_1:wc_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",a.maximum)},noResults:function(){return wc_enhanced_select_params.i18n_no_matches},searching:function(){return wc_enhanced_select_params.i18n_searching}}}}try{a(document.body).on("wc-enhanced-select-init",function(){a(":input.wc-enhanced-select, :input.chosen_select").filter(":not(.enhanced)").each(function(){var c=a.extend({minimumResultsForSearch:10,allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder")},b());a(this).select2(c).addClass("enhanced")}),a(":input.wc-enhanced-select-nostd, :input.chosen_select_nostd").filter(":not(.enhanced)").each(function(){var c=a.extend({minimumResultsForSearch:10,allowClear:!0,placeholder:a(this).data("placeholder")},b());a(this).select2(c).addClass("enhanced")}),a(":input.wc-product-search").filter(":not(.enhanced)").each(function(){var c={allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"3",escapeMarkup:function(a){return a},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",delay:250,data:function(b){return{term:b.term,action:a(this).data("action")||"woocommerce_json_search_products_and_variations",security:wc_enhanced_select_params.search_products_nonce,exclude:a(this).data("exclude"),include:a(this).data("include"),limit:a(this).data("limit")}},processResults:function(b){var c=[];return b&&a.each(b,function(a,b){c.push({id:a,text:b})}),{results:c}},cache:!0}};if(c=a.extend(c,b()),a(this).select2(c).addClass("enhanced"),a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id,c=d.find('option[value="'+b+'"]')[0];d.prepend(c)})}})}}),a(":input.wc-customer-search").filter(":not(.enhanced)").each(function(){var c={allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"1",escapeMarkup:function(a){return a},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",delay:250,data:function(b){return{term:b.term,action:"woocommerce_json_search_customers",security:wc_enhanced_select_params.search_customers_nonce,exclude:a(this).data("exclude")}},processResults:function(b){var c=[];return b&&a.each(b,function(a,b){c.push({id:a,text:b})}),{results:c}},cache:!0}};if(c=a.extend(c,b()),a(this).select2(c).addClass("enhanced"),a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id,c=d.find('option[value="'+b+'"]')[0];d.prepend(c)})}})}})}).on("wc_backbone_modal_before_remove",function(){a(".wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search").filter(".select2-hidden-accessible").select2("close")}).trigger("wc-enhanced-select-init"),a("html").on("click",function(b){this===b.target&&a(".wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search").filter(".select2-hidden-accessible").select2("close")})}catch(a){window.console.log(a)}});
|
|
@ -174,9 +174,6 @@
|
||||||
|
|
||||||
// Show reset link.
|
// Show reset link.
|
||||||
form.toggleResetLink( attributes.chosenCount > 0 );
|
form.toggleResetLink( attributes.chosenCount > 0 );
|
||||||
|
|
||||||
// added to get around variation image flicker issue
|
|
||||||
$( '.product.has-default-attributes > .images' ).fadeTo( 200, 1 );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -564,11 +561,12 @@
|
||||||
$product_img.wc_set_variation_attr( 'sizes', variation.image.sizes );
|
$product_img.wc_set_variation_attr( 'sizes', variation.image.sizes );
|
||||||
$product_img.wc_set_variation_attr( 'title', variation.image.title );
|
$product_img.wc_set_variation_attr( 'title', variation.image.title );
|
||||||
$product_img.wc_set_variation_attr( 'alt', variation.image.alt );
|
$product_img.wc_set_variation_attr( 'alt', variation.image.alt );
|
||||||
|
$product_img.wc_set_variation_attr( 'data-src', variation.image.full_src );
|
||||||
$product_img.wc_set_variation_attr( 'data-large_image', variation.image.full_src );
|
$product_img.wc_set_variation_attr( 'data-large_image', variation.image.full_src );
|
||||||
$product_img.wc_set_variation_attr( 'data-large_image_width', variation.image.full_src_w );
|
$product_img.wc_set_variation_attr( 'data-large_image_width', variation.image.full_src_w );
|
||||||
$product_img.wc_set_variation_attr( 'data-large_image_height', variation.image.full_src_h );
|
$product_img.wc_set_variation_attr( 'data-large_image_height', variation.image.full_src_h );
|
||||||
$product_img_wrap.wc_set_variation_attr( 'data-thumb', variation.image.src );
|
$product_img_wrap.wc_set_variation_attr( 'data-thumb', variation.image.src );
|
||||||
$gallery_img.wc_set_variation_attr( 'src', variation.image.src );
|
$gallery_img.wc_set_variation_attr( 'src', variation.image.thumb_src );
|
||||||
$product_link.wc_set_variation_attr( 'href', variation.image.full_src );
|
$product_link.wc_set_variation_attr( 'href', variation.image.full_src );
|
||||||
} else {
|
} else {
|
||||||
$product_img.wc_reset_variation_attr( 'src' );
|
$product_img.wc_reset_variation_attr( 'src' );
|
||||||
|
@ -578,6 +576,7 @@
|
||||||
$product_img.wc_reset_variation_attr( 'sizes' );
|
$product_img.wc_reset_variation_attr( 'sizes' );
|
||||||
$product_img.wc_reset_variation_attr( 'title' );
|
$product_img.wc_reset_variation_attr( 'title' );
|
||||||
$product_img.wc_reset_variation_attr( 'alt' );
|
$product_img.wc_reset_variation_attr( 'alt' );
|
||||||
|
$product_img.wc_reset_variation_attr( 'data-src' );
|
||||||
$product_img.wc_reset_variation_attr( 'data-large_image' );
|
$product_img.wc_reset_variation_attr( 'data-large_image' );
|
||||||
$product_img.wc_reset_variation_attr( 'data-large_image_width' );
|
$product_img.wc_reset_variation_attr( 'data-large_image_width' );
|
||||||
$product_img.wc_reset_variation_attr( 'data-large_image_height' );
|
$product_img.wc_reset_variation_attr( 'data-large_image_height' );
|
||||||
|
|
|
@ -107,6 +107,8 @@ jQuery( function( $ ) {
|
||||||
$.each( fragments, function( key, value ) {
|
$.each( fragments, function( key, value ) {
|
||||||
$( key ).replaceWith( value );
|
$( key ).replaceWith( value );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$( document.body ).trigger( 'wc_fragments_loaded' );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unblock.
|
// Unblock.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*!
|
/*!
|
||||||
* WooCommerce Add to Cart JS
|
* WooCommerce Add to Cart JS
|
||||||
*/
|
*/
|
||||||
jQuery(function(a){return"undefined"!=typeof wc_add_to_cart_params&&(a(document).on("click",".add_to_cart_button",function(){var b=a(this);if(b.is(".ajax_add_to_cart")){if(!b.attr("data-product_id"))return!0;b.removeClass("added"),b.addClass("loading");var c={};return a.each(b.data(),function(a,b){c[a]=b}),a(document.body).trigger("adding_to_cart",[b,c]),a.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),c,function(c){if(c)return c.error&&c.product_url?void(window.location=c.product_url):"yes"===wc_add_to_cart_params.cart_redirect_after_add?void(window.location=wc_add_to_cart_params.cart_url):void a(document.body).trigger("added_to_cart",[c.fragments,c.cart_hash,b])}),!1}return!0}),void a(document.body).on("added_to_cart",function(b,c,d,e){var f=window.location.toString().replace("add-to-cart","added-to-cart");e="undefined"!=typeof e&&e,e&&e.removeClass("loading"),c&&a.each(c,function(b){a(b).addClass("updating")}),a(".shop_table.cart, .updating, .cart_totals").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}}),e&&(e.addClass("added"),wc_add_to_cart_params.is_cart||0!==e.parent().find(".added_to_cart").length||e.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>")),c&&a.each(c,function(b,c){a(b).replaceWith(c)}),a(".widget_shopping_cart, .updating").stop(!0).css("opacity","1").unblock(),a(".shop_table.cart").load(f+" .shop_table.cart:eq(0) > *",function(){a(".shop_table.cart").stop(!0).css("opacity","1").unblock(),a(document.body).trigger("cart_page_refreshed")}),a(".cart_totals").load(f+" .cart_totals:eq(0) > *",function(){a(".cart_totals").stop(!0).css("opacity","1").unblock()})}))});
|
jQuery(function(a){return"undefined"!=typeof wc_add_to_cart_params&&(a(document).on("click",".add_to_cart_button",function(){var b=a(this);if(b.is(".ajax_add_to_cart")){if(!b.attr("data-product_id"))return!0;b.removeClass("added"),b.addClass("loading");var c={};return a.each(b.data(),function(a,b){c[a]=b}),a(document.body).trigger("adding_to_cart",[b,c]),a.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),c,function(c){if(c)return c.error&&c.product_url?void(window.location=c.product_url):"yes"===wc_add_to_cart_params.cart_redirect_after_add?void(window.location=wc_add_to_cart_params.cart_url):void a(document.body).trigger("added_to_cart",[c.fragments,c.cart_hash,b])}),!1}return!0}),void a(document.body).on("added_to_cart",function(b,c,d,e){var f=window.location.toString().replace("add-to-cart","added-to-cart");e="undefined"!=typeof e&&e,e&&e.removeClass("loading"),c&&a.each(c,function(b){a(b).addClass("updating")}),a(".shop_table.cart, .updating, .cart_totals").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}}),e&&(e.addClass("added"),wc_add_to_cart_params.is_cart||0!==e.parent().find(".added_to_cart").length||e.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>")),c&&(a.each(c,function(b,c){a(b).replaceWith(c)}),a(document.body).trigger("wc_fragments_loaded")),a(".widget_shopping_cart, .updating").stop(!0).css("opacity","1").unblock(),a(".shop_table.cart").load(f+" .shop_table.cart:eq(0) > *",function(){a(".shop_table.cart").stop(!0).css("opacity","1").unblock(),a(document.body).trigger("cart_page_refreshed")}),a(".cart_totals").load(f+" .cart_totals:eq(0) > *",function(){a(".cart_totals").stop(!0).css("opacity","1").unblock()})}))});
|
|
@ -74,10 +74,10 @@ jQuery( function( $ ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( thislocale[ key ].sort ) {
|
if ( thislocale[ key ].priority ) {
|
||||||
field.data( 'priority', thislocale[ key ].sort );
|
field.data( 'priority', thislocale[ key ].priority );
|
||||||
} else if ( locale['default'][ key ].sort ) {
|
} else if ( locale['default'][ key ].priority ) {
|
||||||
field.data( 'priority', locale['default'][ key ].sort );
|
field.data( 'priority', locale['default'][ key ].priority );
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ( locale['default'][ key ] ) {
|
} else if ( locale['default'][ key ] ) {
|
||||||
|
@ -106,8 +106,8 @@ jQuery( function( $ ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( locale['default'][ key ].sort ) {
|
if ( locale['default'][ key ].priority ) {
|
||||||
field.data( 'priority', locale['default'][ key ].sort );
|
field.data( 'priority', locale['default'][ key ].priority );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
jQuery(function(a){function b(a,b){b?(a.find("label").append(' <abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>'),a.addClass("validate-required")):(a.find("label abbr").remove(),a.removeClass("validate-required"))}if("undefined"==typeof wc_address_i18n_params)return!1;var c=wc_address_i18n_params.locale.replace(/"/g,'"'),d=a.parseJSON(c);a(document.body).bind("country_to_state_changing",function(c,e,f){var g,h=f;g="undefined"!=typeof d[e]?d[e]:d.default;var i=h.find("#billing_postcode_field, #shipping_postcode_field"),j=h.find("#billing_city_field, #shipping_city_field"),k=h.find("#billing_state_field, #shipping_state_field");i.attr("data-o_class")||(i.attr("data-o_class",i.attr("class")),j.attr("data-o_class",j.attr("class")),k.attr("data-o_class",k.attr("class")));var l=a.parseJSON(wc_address_i18n_params.locale_fields);a.each(l,function(a,c){var e=h.find(c);g[a]?(g[a].label&&e.find("label").html(g[a].label),g[a].placeholder&&e.find("input").attr("placeholder",g[a].placeholder),b(e,!1),"undefined"==typeof g[a].required&&d.default[a].required===!0?b(e,!0):g[a].required===!0&&b(e,!0),"state"!==a&&(g[a].hidden===!0?e.hide().find("input").val(""):e.show()),g[a].sort?e.data("priority",g[a].sort):d.default[a].sort&&e.data("priority",d.default[a].sort)):d.default[a]&&("state"!==a&&("undefined"==typeof d.default[a].hidden||d.default[a].hidden===!1?e.show():d.default[a].hidden===!0&&e.hide().find("input").val("")),"postcode"!==a&&"city"!==a&&"state"!==a||(d.default[a].label&&e.find("label").html(d.default[a].label),d.default[a].placeholder&&e.find("input").attr("placeholder",d.default[a].placeholder)),d.default[a].required===!0&&0===e.find("label abbr").length&&b(e,!0),d.default[a].sort&&e.data("priority",d.default[a].sort))});var m=a(".woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-address-fields__field-wrapper, .woocommerce-additional-fields__field-wrapper .woocommerce-account-fields");m.each(function(b,c){var d=a(c).find(".form-row"),e=d.first().parent(),f=0;d.each(function(){a(this).data("priority")||a(this).data("priority",f+1),f=a(this).data("priority")}),d.sort(function(b,c){var d=a(b).data("priority"),e=a(c).data("priority");return d>e?1:d<e?-1:0}),d.detach().appendTo(e)})})});
|
jQuery(function(a){function b(a,b){b?(a.find("label").append(' <abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>'),a.addClass("validate-required")):(a.find("label abbr").remove(),a.removeClass("validate-required"))}if("undefined"==typeof wc_address_i18n_params)return!1;var c=wc_address_i18n_params.locale.replace(/"/g,'"'),d=a.parseJSON(c);a(document.body).bind("country_to_state_changing",function(c,e,f){var g,h=f;g="undefined"!=typeof d[e]?d[e]:d.default;var i=h.find("#billing_postcode_field, #shipping_postcode_field"),j=h.find("#billing_city_field, #shipping_city_field"),k=h.find("#billing_state_field, #shipping_state_field");i.attr("data-o_class")||(i.attr("data-o_class",i.attr("class")),j.attr("data-o_class",j.attr("class")),k.attr("data-o_class",k.attr("class")));var l=a.parseJSON(wc_address_i18n_params.locale_fields);a.each(l,function(a,c){var e=h.find(c);g[a]?(g[a].label&&e.find("label").html(g[a].label),g[a].placeholder&&e.find("input").attr("placeholder",g[a].placeholder),b(e,!1),"undefined"==typeof g[a].required&&d.default[a].required===!0?b(e,!0):g[a].required===!0&&b(e,!0),"state"!==a&&(g[a].hidden===!0?e.hide().find("input").val(""):e.show()),g[a].priority?e.data("priority",g[a].priority):d.default[a].priority&&e.data("priority",d.default[a].priority)):d.default[a]&&("state"!==a&&("undefined"==typeof d.default[a].hidden||d.default[a].hidden===!1?e.show():d.default[a].hidden===!0&&e.hide().find("input").val("")),"postcode"!==a&&"city"!==a&&"state"!==a||(d.default[a].label&&e.find("label").html(d.default[a].label),d.default[a].placeholder&&e.find("input").attr("placeholder",d.default[a].placeholder)),d.default[a].required===!0&&0===e.find("label abbr").length&&b(e,!0),d.default[a].priority&&e.data("priority",d.default[a].priority))});var m=a(".woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-address-fields__field-wrapper, .woocommerce-additional-fields__field-wrapper .woocommerce-account-fields");m.each(function(b,c){var d=a(c).find(".form-row"),e=d.first().parent(),f=0;d.each(function(){a(this).data("priority")||a(this).data("priority",f+1),f=a(this).data("priority")}),d.sort(function(b,c){var d=a(b).data("priority"),e=a(c).data("priority");return d>e?1:d<e?-1:0}),d.detach().appendTo(e)})})});
|
|
@ -7,21 +7,11 @@ jQuery( function( $ ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getEnhancedSelectFormatString() {
|
function getEnhancedSelectFormatString() {
|
||||||
var formatString = {
|
return {
|
||||||
noResults: function() {
|
'language': {
|
||||||
return wc_country_select_params.i18n_no_matches;
|
|
||||||
},
|
|
||||||
errorLoading: function() {
|
errorLoading: function() {
|
||||||
return wc_country_select_params.i18n_ajax_error;
|
// Workaround for https://github.com/select2/select2/issues/4355 instead of i18n_ajax_error.
|
||||||
},
|
return wc_country_select_params.i18n_searching;
|
||||||
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 );
|
|
||||||
},
|
},
|
||||||
inputTooLong: function( args ) {
|
inputTooLong: function( args ) {
|
||||||
var overChars = args.input.length - args.maximum;
|
var overChars = args.input.length - args.maximum;
|
||||||
|
@ -32,23 +22,33 @@ jQuery( function( $ ) {
|
||||||
|
|
||||||
return wc_country_select_params.i18n_input_too_long_n.replace( '%qty%', overChars );
|
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 ) {
|
maximumSelected: function( args ) {
|
||||||
if ( 1 === args.maximum ) {
|
if ( args.maximum === 1 ) {
|
||||||
return wc_country_select_params.i18n_selection_too_long_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 );
|
return wc_country_select_params.i18n_selection_too_long_n.replace( '%qty%', args.maximum );
|
||||||
},
|
},
|
||||||
loadingMore: function() {
|
noResults: function() {
|
||||||
return wc_country_select_params.i18n_load_more;
|
return wc_country_select_params.i18n_no_matches;
|
||||||
},
|
},
|
||||||
searching: function() {
|
searching: function() {
|
||||||
return wc_country_select_params.i18n_searching;
|
return wc_country_select_params.i18n_searching;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var language = { 'language' : formatString };
|
|
||||||
return language;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Select2 Enhancement if it exists
|
// Select2 Enhancement if it exists
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
jQuery(function(a){function b(){var a={noResults:function(){return wc_country_select_params.i18n_no_matches},errorLoading:function(){return wc_country_select_params.i18n_ajax_error},inputTooShort:function(a){var b=a.minimum-a.input.length;return 1===b?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",b)},inputTooLong:function(a){var b=a.input.length-a.maximum;return 1===b?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",b)},maximumSelected:function(a){return 1===a.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",a.maximum)},loadingMore:function(){return wc_country_select_params.i18n_load_more},searching:function(){return wc_country_select_params.i18n_searching}},b={language:a};return b}if("undefined"==typeof wc_country_select_params)return!1;if(a().select2){var c=function(){a("select.country_select:visible, select.state_select:visible").each(function(){var c=a.extend({placeholderOption:"first",width:"100%"},b());a(this).select2(c),a(this).on("select2:select",function(){a(this).focus()})})};c(),a(document.body).bind("country_to_state_changed",function(){c()})}var d=wc_country_select_params.countries.replace(/"/g,'"'),e=a.parseJSON(d);a(document.body).on("change","select.country_to_state, input.country_to_state",function(){var b=a(this).closest(".woocommerce-billing-fields, .woocommerce-shipping-fields, .woocommerce-shipping-calculator");b.length||(b=a(this).closest(".form-row").parent());var c=a(this).val(),d=b.find("#billing_state, #shipping_state, #calc_shipping_state"),f=d.parent(),g=d.attr("name"),h=d.attr("id"),i=d.val(),j=d.attr("placeholder")||d.attr("data-placeholder")||"";if(e[c])if(a.isEmptyObject(e[c]))d.parent().hide().find(".select2-container").remove(),d.replaceWith('<input type="hidden" class="hidden" name="'+g+'" id="'+h+'" value="" placeholder="'+j+'" />'),a(document.body).trigger("country_to_state_changed",[c,b]);else{var k="",l=e[c];for(var m in l)l.hasOwnProperty(m)&&(k=k+'<option value="'+m+'">'+l[m]+"</option>");d.parent().show(),d.is("input")&&(d.replaceWith('<select name="'+g+'" id="'+h+'" class="state_select" data-placeholder="'+j+'"></select>'),d=b.find("#billing_state, #shipping_state, #calc_shipping_state")),d.html('<option value="">'+wc_country_select_params.i18n_select_state_text+"</option>"+k),d.val(i).change(),a(document.body).trigger("country_to_state_changed",[c,b])}else d.is("select")?(f.show().find(".select2-container").remove(),d.replaceWith('<input type="text" class="input-text" name="'+g+'" id="'+h+'" placeholder="'+j+'" />'),a(document.body).trigger("country_to_state_changed",[c,b])):d.is('input[type="hidden"]')&&(f.show().find(".select2-container").remove(),d.replaceWith('<input type="text" class="input-text" name="'+g+'" id="'+h+'" placeholder="'+j+'" />'),a(document.body).trigger("country_to_state_changed",[c,b]));a(document.body).trigger("country_to_state_changing",[c,b])}),a(function(){a(":input.country_to_state").change()})});
|
jQuery(function(a){function b(){return{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(a){var b=a.input.length-a.maximum;return 1===b?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",b)},inputTooShort:function(a){var b=a.minimum-a.input.length;return 1===b?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",b)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(a){return 1===a.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",a.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}}}if("undefined"==typeof wc_country_select_params)return!1;if(a().select2){var c=function(){a("select.country_select:visible, select.state_select:visible").each(function(){var c=a.extend({placeholderOption:"first",width:"100%"},b());a(this).select2(c),a(this).on("select2:select",function(){a(this).focus()})})};c(),a(document.body).bind("country_to_state_changed",function(){c()})}var d=wc_country_select_params.countries.replace(/"/g,'"'),e=a.parseJSON(d);a(document.body).on("change","select.country_to_state, input.country_to_state",function(){var b=a(this).closest(".woocommerce-billing-fields, .woocommerce-shipping-fields, .woocommerce-shipping-calculator");b.length||(b=a(this).closest(".form-row").parent());var c=a(this).val(),d=b.find("#billing_state, #shipping_state, #calc_shipping_state"),f=d.parent(),g=d.attr("name"),h=d.attr("id"),i=d.val(),j=d.attr("placeholder")||d.attr("data-placeholder")||"";if(e[c])if(a.isEmptyObject(e[c]))d.parent().hide().find(".select2-container").remove(),d.replaceWith('<input type="hidden" class="hidden" name="'+g+'" id="'+h+'" value="" placeholder="'+j+'" />'),a(document.body).trigger("country_to_state_changed",[c,b]);else{var k="",l=e[c];for(var m in l)l.hasOwnProperty(m)&&(k=k+'<option value="'+m+'">'+l[m]+"</option>");d.parent().show(),d.is("input")&&(d.replaceWith('<select name="'+g+'" id="'+h+'" class="state_select" data-placeholder="'+j+'"></select>'),d=b.find("#billing_state, #shipping_state, #calc_shipping_state")),d.html('<option value="">'+wc_country_select_params.i18n_select_state_text+"</option>"+k),d.val(i).change(),a(document.body).trigger("country_to_state_changed",[c,b])}else d.is("select")?(f.show().find(".select2-container").remove(),d.replaceWith('<input type="text" class="input-text" name="'+g+'" id="'+h+'" placeholder="'+j+'" />'),a(document.body).trigger("country_to_state_changed",[c,b])):d.is('input[type="hidden"]')&&(f.show().find(".select2-container").remove(),d.replaceWith('<input type="text" class="input-text" name="'+g+'" id="'+h+'" placeholder="'+j+'" />'),a(document.body).trigger("country_to_state_changed",[c,b]));a(document.body).trigger("country_to_state_changing",[c,b])}),a(function(){a(":input.country_to_state").change()})});
|
|
@ -77,6 +77,12 @@ jQuery( function( $ ) {
|
||||||
this.$target = $target;
|
this.$target = $target;
|
||||||
this.$images = $( '.woocommerce-product-gallery__image', $target );
|
this.$images = $( '.woocommerce-product-gallery__image', $target );
|
||||||
|
|
||||||
|
// No images? Abort.
|
||||||
|
if ( 0 === this.$images.length ) {
|
||||||
|
this.$target.css( 'opacity', 1 );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Make this object available.
|
// Make this object available.
|
||||||
$target.data( 'product_gallery', this );
|
$target.data( 'product_gallery', this );
|
||||||
|
|
||||||
|
@ -87,7 +93,7 @@ jQuery( function( $ ) {
|
||||||
|
|
||||||
// ...also taking args into account.
|
// ...also taking args into account.
|
||||||
if ( args ) {
|
if ( args ) {
|
||||||
this.flexslider_enabled = false === args.photoswipe_enabled ? false : this.flexslider_enabled;
|
this.flexslider_enabled = false === args.flexslider_enabled ? false : this.flexslider_enabled;
|
||||||
this.zoom_enabled = false === args.zoom_enabled ? false : this.zoom_enabled;
|
this.zoom_enabled = false === args.zoom_enabled ? false : this.zoom_enabled;
|
||||||
this.photoswipe_enabled = false === args.photoswipe_enabled ? false : this.photoswipe_enabled;
|
this.photoswipe_enabled = false === args.photoswipe_enabled ? false : this.photoswipe_enabled;
|
||||||
}
|
}
|
||||||
|
@ -103,6 +109,8 @@ jQuery( function( $ ) {
|
||||||
if ( this.flexslider_enabled ) {
|
if ( this.flexslider_enabled ) {
|
||||||
this.initFlexslider();
|
this.initFlexslider();
|
||||||
$target.on( 'woocommerce_gallery_reset_slide_position', this.onResetSlidePosition );
|
$target.on( 'woocommerce_gallery_reset_slide_position', this.onResetSlidePosition );
|
||||||
|
} else {
|
||||||
|
this.$target.css( 'opacity', 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( this.zoom_enabled ) {
|
if ( this.zoom_enabled ) {
|
||||||
|
@ -119,9 +127,9 @@ jQuery( function( $ ) {
|
||||||
* Initialize flexSlider.
|
* Initialize flexSlider.
|
||||||
*/
|
*/
|
||||||
ProductGallery.prototype.initFlexslider = function() {
|
ProductGallery.prototype.initFlexslider = function() {
|
||||||
var images = this.$images;
|
var $target = this.$target;
|
||||||
|
|
||||||
this.$target.flexslider( {
|
$target.flexslider( {
|
||||||
selector: '.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image',
|
selector: '.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image',
|
||||||
animation: wc_single_product_params.flexslider.animation,
|
animation: wc_single_product_params.flexslider.animation,
|
||||||
smoothHeight: wc_single_product_params.flexslider.smoothHeight,
|
smoothHeight: wc_single_product_params.flexslider.smoothHeight,
|
||||||
|
@ -131,19 +139,7 @@ jQuery( function( $ ) {
|
||||||
animationSpeed: wc_single_product_params.flexslider.animationSpeed,
|
animationSpeed: wc_single_product_params.flexslider.animationSpeed,
|
||||||
animationLoop: wc_single_product_params.flexslider.animationLoop, // Breaks photoswipe pagination if true.
|
animationLoop: wc_single_product_params.flexslider.animationLoop, // Breaks photoswipe pagination if true.
|
||||||
start: function() {
|
start: function() {
|
||||||
var largest_height = 0;
|
$target.css( 'opacity', 1 );
|
||||||
|
|
||||||
images.each( function() {
|
|
||||||
var height = $( this ).height();
|
|
||||||
|
|
||||||
if ( height > largest_height ) {
|
|
||||||
largest_height = height;
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
|
|
||||||
images.each( function() {
|
|
||||||
$( this ).css( 'min-height', largest_height );
|
|
||||||
} );
|
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
@ -163,7 +159,7 @@ jQuery( function( $ ) {
|
||||||
$( zoomTarget ).each( function( index, target ) {
|
$( zoomTarget ).each( function( index, target ) {
|
||||||
var image = $( target ).find( 'img' );
|
var image = $( target ).find( 'img' );
|
||||||
|
|
||||||
if ( image.attr( 'width' ) > galleryWidth ) {
|
if ( image.data( 'large_image_width' ) > galleryWidth ) {
|
||||||
zoomEnabled = true;
|
zoomEnabled = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -171,10 +167,16 @@ jQuery( function( $ ) {
|
||||||
|
|
||||||
// But only zoom if the img is larger than its container.
|
// But only zoom if the img is larger than its container.
|
||||||
if ( zoomEnabled ) {
|
if ( zoomEnabled ) {
|
||||||
zoomTarget.trigger( 'zoom.destroy' );
|
var zoom_options = {
|
||||||
zoomTarget.zoom( {
|
|
||||||
touch: false
|
touch: false
|
||||||
} );
|
};
|
||||||
|
|
||||||
|
if ( 'ontouchstart' in window ) {
|
||||||
|
zoom_options.on = 'click';
|
||||||
|
}
|
||||||
|
|
||||||
|
zoomTarget.trigger( 'zoom.destroy' );
|
||||||
|
zoomTarget.zoom( zoom_options );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -239,14 +241,9 @@ jQuery( function( $ ) {
|
||||||
clicked = this.$target.find( '.flex-active-slide' );
|
clicked = this.$target.find( '.flex-active-slide' );
|
||||||
}
|
}
|
||||||
|
|
||||||
var options = {
|
var options = $.extend( {
|
||||||
index: $( clicked ).index(),
|
index: $( clicked ).index()
|
||||||
shareEl: false,
|
}, wc_single_product_params.photoswipe_options );
|
||||||
closeOnScroll: false,
|
|
||||||
history: false,
|
|
||||||
hideAnimationDuration: 0,
|
|
||||||
showAnimationDuration: 0
|
|
||||||
};
|
|
||||||
|
|
||||||
// Initializes and opens PhotoSwipe.
|
// Initializes and opens PhotoSwipe.
|
||||||
var photoswipe = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options );
|
var photoswipe = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options );
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* JavaScript Cookie v2.1.3
|
* JavaScript Cookie v2.1.4
|
||||||
* https://github.com/js-cookie/js-cookie
|
* https://github.com/js-cookie/js-cookie
|
||||||
*
|
*
|
||||||
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
||||||
|
@ -56,6 +56,9 @@
|
||||||
attributes.expires = expires;
|
attributes.expires = expires;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We're using "expires" because "max-age" is not supported by IE
|
||||||
|
attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
result = JSON.stringify(value);
|
result = JSON.stringify(value);
|
||||||
if (/^[\{\[]/.test(result)) {
|
if (/^[\{\[]/.test(result)) {
|
||||||
|
@ -74,13 +77,19 @@
|
||||||
key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
|
key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
|
||||||
key = key.replace(/[\(\)]/g, escape);
|
key = key.replace(/[\(\)]/g, escape);
|
||||||
|
|
||||||
return (document.cookie = [
|
var stringifiedAttributes = '';
|
||||||
key, '=', value,
|
|
||||||
attributes.expires ? '; expires=' + attributes.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
for (var attributeName in attributes) {
|
||||||
attributes.path ? '; path=' + attributes.path : '',
|
if (!attributes[attributeName]) {
|
||||||
attributes.domain ? '; domain=' + attributes.domain : '',
|
continue;
|
||||||
attributes.secure ? '; secure' : ''
|
}
|
||||||
].join(''));
|
stringifiedAttributes += '; ' + attributeName;
|
||||||
|
if (attributes[attributeName] === true) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
stringifiedAttributes += '=' + attributes[attributeName];
|
||||||
|
}
|
||||||
|
return (document.cookie = key + '=' + value + stringifiedAttributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read
|
// Read
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*!
|
/*!
|
||||||
* JavaScript Cookie v2.1.3
|
* JavaScript Cookie v2.1.4
|
||||||
* https://github.com/js-cookie/js-cookie
|
* https://github.com/js-cookie/js-cookie
|
||||||
*
|
*
|
||||||
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
*/
|
*/
|
||||||
!function(a){var b=!1;if("function"==typeof define&&define.amd&&(define(a),b=!0),"object"==typeof exports&&(module.exports=a(),b=!0),!b){var c=window.Cookies,d=window.Cookies=a();d.noConflict=function(){return window.Cookies=c,d}}}(function(){function a(){for(var a=0,b={};a<arguments.length;a++){var c=arguments[a];for(var d in c)b[d]=c[d]}return b}function b(c){function d(b,e,f){var g;if("undefined"!=typeof document){if(arguments.length>1){if(f=a({path:"/"},d.defaults,f),"number"==typeof f.expires){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}try{g=JSON.stringify(e),/^[\{\[]/.test(g)&&(e=g)}catch(a){}return e=c.write?c.write(e,b):encodeURIComponent(String(e)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(String(b)),b=b.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),b=b.replace(/[\(\)]/g,escape),document.cookie=[b,"=",e,f.expires?"; expires="+f.expires.toUTCString():"",f.path?"; path="+f.path:"",f.domain?"; domain="+f.domain:"",f.secure?"; secure":""].join("")}b||(g={});for(var i=document.cookie?document.cookie.split("; "):[],j=/(%[0-9A-Z]{2})+/g,k=0;k<i.length;k++){var l=i[k].split("="),m=l.slice(1).join("=");'"'===m.charAt(0)&&(m=m.slice(1,-1));try{var n=l[0].replace(j,decodeURIComponent);if(m=c.read?c.read(m,n):c(m,n)||m.replace(j,decodeURIComponent),this.json)try{m=JSON.parse(m)}catch(a){}if(b===n){g=m;break}b||(g[n]=m)}catch(a){}}return g}}return d.set=d,d.get=function(a){return d.call(d,a)},d.getJSON=function(){return d.apply({json:!0},[].slice.call(arguments))},d.defaults={},d.remove=function(b,c){d(b,"",a(c,{expires:-1}))},d.withConverter=b,d}return b(function(){})});
|
!function(a){var b=!1;if("function"==typeof define&&define.amd&&(define(a),b=!0),"object"==typeof exports&&(module.exports=a(),b=!0),!b){var c=window.Cookies,d=window.Cookies=a();d.noConflict=function(){return window.Cookies=c,d}}}(function(){function a(){for(var a=0,b={};a<arguments.length;a++){var c=arguments[a];for(var d in c)b[d]=c[d]}return b}function b(c){function d(b,e,f){var g;if("undefined"!=typeof document){if(arguments.length>1){if(f=a({path:"/"},d.defaults,f),"number"==typeof f.expires){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}f.expires=f.expires?f.expires.toUTCString():"";try{g=JSON.stringify(e),/^[\{\[]/.test(g)&&(e=g)}catch(a){}e=c.write?c.write(e,b):encodeURIComponent(String(e)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(String(b)),b=b.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),b=b.replace(/[\(\)]/g,escape);var i="";for(var j in f)f[j]&&(i+="; "+j,f[j]!==!0&&(i+="="+f[j]));return document.cookie=b+"="+e+i}b||(g={});for(var k=document.cookie?document.cookie.split("; "):[],l=/(%[0-9A-Z]{2})+/g,m=0;m<k.length;m++){var n=k[m].split("="),o=n.slice(1).join("=");'"'===o.charAt(0)&&(o=o.slice(1,-1));try{var p=n[0].replace(l,decodeURIComponent);if(o=c.read?c.read(o,p):c(o,p)||o.replace(l,decodeURIComponent),this.json)try{o=JSON.parse(o)}catch(a){}if(b===p){g=o;break}b||(g[p]=o)}catch(a){}}return g}}return d.set=d,d.get=function(a){return d.call(d,a)},d.getJSON=function(){return d.apply({json:!0},[].slice.call(arguments))},d.defaults={},d.remove=function(b,c){d(b,"",a(c,{expires:-1}))},d.withConverter=b,d}return b(function(){})});
|
|
@ -9,9 +9,8 @@
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"squizlabs/php_codesniffer": "*",
|
"squizlabs/php_codesniffer": "*",
|
||||||
"wp-coding-standards/wpcs": "*",
|
"wp-coding-standards/wpcs": "0.10.0",
|
||||||
"wimg/php-compatibility": "*",
|
"phpunit/phpunit": "5.7.19"
|
||||||
"simplyadmire/composer-plugins" : "@dev"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"post-install-cmd": [
|
"post-install-cmd": [
|
||||||
|
|
|
@ -436,9 +436,9 @@ return array(
|
||||||
),
|
),
|
||||||
'PL' => array(
|
'PL' => array(
|
||||||
'currency_code' => 'PLN',
|
'currency_code' => 'PLN',
|
||||||
'currency_pos' => 'right',
|
'currency_pos' => 'right_space',
|
||||||
'thousand_sep' => ',',
|
'thousand_sep' => ' ',
|
||||||
'decimal_sep' => '.',
|
'decimal_sep' => ',',
|
||||||
'num_decimals' => 2,
|
'num_decimals' => 2,
|
||||||
'weight_unit' => 'kg',
|
'weight_unit' => 'kg',
|
||||||
'dimension_unit' => 'cm',
|
'dimension_unit' => 'cm',
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Bolivian states
|
||||||
|
*
|
||||||
|
* @author Roman Random
|
||||||
|
* @category i18n
|
||||||
|
* @package WooCommerce/i18n
|
||||||
|
* @version 3.1.0
|
||||||
|
*/
|
||||||
|
global $states;
|
||||||
|
|
||||||
|
$states['BO'] = array(
|
||||||
|
'B' => __( 'Chuquisaca', 'woocommerce' ),
|
||||||
|
'H' => __( 'Beni', 'woocommerce' ),
|
||||||
|
'C' => __( 'Cochabamba', 'woocommerce' ),
|
||||||
|
'L' => __( 'La Paz', 'woocommerce' ),
|
||||||
|
'O' => __( 'Oruro', 'woocommerce' ),
|
||||||
|
'N' => __( 'Pando', 'woocommerce' ),
|
||||||
|
'P' => __( 'Potosí', 'woocommerce' ),
|
||||||
|
'S' => __( 'Santa Cruz', 'woocommerce' ),
|
||||||
|
'T' => __( 'Tarija', 'woocommerce' ),
|
||||||
|
);
|
|
@ -91,7 +91,7 @@ abstract class WC_Data {
|
||||||
protected $cache_group = '';
|
protected $cache_group = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores additonal meta data.
|
* Stores additional meta data.
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
* @var array
|
* @var array
|
||||||
|
@ -104,12 +104,49 @@ abstract class WC_Data {
|
||||||
* @param int|object|array $read ID to load from the DB (optional) or already queried data.
|
* @param int|object|array $read ID to load from the DB (optional) or already queried data.
|
||||||
*/
|
*/
|
||||||
public function __construct( $read = 0 ) {
|
public function __construct( $read = 0 ) {
|
||||||
|
|
||||||
$this->data = array_merge( $this->data, $this->extra_data );
|
$this->data = array_merge( $this->data, $this->extra_data );
|
||||||
|
|
||||||
$this->default_data = $this->data;
|
$this->default_data = $this->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only store the object ID to avoid serializing the data object instance.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function __sleep() {
|
||||||
|
return array( 'id' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Re-run the constructor with the object ID.
|
||||||
|
*
|
||||||
|
* If the object no longer exists, remove the ID.
|
||||||
|
*/
|
||||||
|
public function __wakeup() {
|
||||||
|
try {
|
||||||
|
$this->__construct( absint( $this->id ) );
|
||||||
|
} catch ( Exception $e ) {
|
||||||
|
$this->set_id( 0 );
|
||||||
|
$this->set_object_read( true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When the object is cloned, make sure meta is duplicated correctly.
|
||||||
|
*
|
||||||
|
* @since 3.0.2
|
||||||
|
*/
|
||||||
|
public function __clone() {
|
||||||
|
$this->maybe_read_meta_data();
|
||||||
|
if ( ! empty( $this->meta_data ) ) {
|
||||||
|
foreach ( $this->meta_data as $array_key => $meta ) {
|
||||||
|
if ( ! empty( $meta->id ) ) {
|
||||||
|
unset( $this->meta_data[ $array_key ]->id );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the data store.
|
* Get the data store.
|
||||||
*
|
*
|
||||||
|
@ -147,7 +184,7 @@ abstract class WC_Data {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save should create or update based on object existance.
|
* Save should create or update based on object existence.
|
||||||
*
|
*
|
||||||
* @since 2.6.0
|
* @since 2.6.0
|
||||||
* @return int
|
* @return int
|
||||||
|
@ -238,14 +275,16 @@ abstract class WC_Data {
|
||||||
*/
|
*/
|
||||||
public function get_meta( $key = '', $single = true, $context = 'view' ) {
|
public function get_meta( $key = '', $single = true, $context = 'view' ) {
|
||||||
$this->maybe_read_meta_data();
|
$this->maybe_read_meta_data();
|
||||||
$array_keys = array_keys( wp_list_pluck( $this->get_meta_data(), 'key' ), $key );
|
$meta_data = $this->get_meta_data();
|
||||||
|
$array_keys = array_keys( wp_list_pluck( $meta_data, 'key' ), $key );
|
||||||
$value = $single ? '' : array();
|
$value = $single ? '' : array();
|
||||||
|
|
||||||
if ( ! empty( $array_keys ) ) {
|
if ( ! empty( $array_keys ) ) {
|
||||||
|
// We don't use the $this->meta_data property directly here because we don't want meta with a null value (i.e. meta which has been deleted via $this->delete_meta_data())
|
||||||
if ( $single ) {
|
if ( $single ) {
|
||||||
$value = $this->meta_data[ current( $array_keys ) ]->value;
|
$value = $meta_data[ current( $array_keys ) ]->value;
|
||||||
} else {
|
} else {
|
||||||
$value = array_intersect_key( $this->meta_data, array_flip( $array_keys ) );
|
$value = array_intersect_key( $meta_data, array_flip( $array_keys ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'view' === $context ) {
|
if ( 'view' === $context ) {
|
||||||
|
@ -448,7 +487,6 @@ abstract class WC_Data {
|
||||||
|
|
||||||
if ( ! empty( $this->cache_group ) ) {
|
if ( ! empty( $this->cache_group ) ) {
|
||||||
WC_Cache_Helper::incr_cache_prefix( $this->cache_group );
|
WC_Cache_Helper::incr_cache_prefix( $this->cache_group );
|
||||||
wp_cache_delete( 'object-' . $this->get_id(), $this->cache_group );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -612,16 +650,33 @@ abstract class WC_Data {
|
||||||
protected function set_date_prop( $prop, $value ) {
|
protected function set_date_prop( $prop, $value ) {
|
||||||
try {
|
try {
|
||||||
if ( empty( $value ) ) {
|
if ( empty( $value ) ) {
|
||||||
$datetime = null;
|
$this->set_prop( $prop, null );
|
||||||
} elseif ( is_a( $value, 'WC_DateTime' ) ) {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( is_a( $value, 'WC_DateTime' ) ) {
|
||||||
$datetime = $value;
|
$datetime = $value;
|
||||||
} elseif ( is_numeric( $value ) ) {
|
} elseif ( is_numeric( $value ) ) {
|
||||||
|
// Timestamps are handled as UTC timestamps in all cases.
|
||||||
$datetime = new WC_DateTime( "@{$value}", new DateTimeZone( 'UTC' ) );
|
$datetime = new WC_DateTime( "@{$value}", new DateTimeZone( 'UTC' ) );
|
||||||
|
} else {
|
||||||
|
// Strings are defined in local WP timezone. Convert to UTC.
|
||||||
|
if ( 1 === preg_match( '/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(Z|((-|\+)\d{2}:\d{2}))$/', $value, $date_bits ) ) {
|
||||||
|
$offset = ! empty( $date_bits[7] ) ? iso8601_timezone_to_offset( $date_bits[7] ) : wc_timezone_offset();
|
||||||
|
$timestamp = gmmktime( $date_bits[4], $date_bits[5], $date_bits[6], $date_bits[2], $date_bits[3], $date_bits[1] ) - $offset;
|
||||||
|
} else {
|
||||||
|
$timestamp = wc_string_to_timestamp( get_gmt_from_date( gmdate( 'Y-m-d H:i:s', wc_string_to_timestamp( $value ) ) ) );
|
||||||
|
}
|
||||||
|
$datetime = new WC_DateTime( "@{$timestamp}", new DateTimeZone( 'UTC' ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set local timezone or offset.
|
||||||
|
if ( get_option( 'timezone_string' ) ) {
|
||||||
$datetime->setTimezone( new DateTimeZone( wc_timezone_string() ) );
|
$datetime->setTimezone( new DateTimeZone( wc_timezone_string() ) );
|
||||||
} else {
|
} else {
|
||||||
$datetime = new WC_DateTime( $value, new DateTimeZone( wc_timezone_string() ) );
|
$datetime->set_utc_offset( wc_timezone_offset() );
|
||||||
$datetime->setTimezone( new DateTimeZone( wc_timezone_string() ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->set_prop( $prop, $datetime );
|
$this->set_prop( $prop, $datetime );
|
||||||
} catch ( Exception $e ) {}
|
} catch ( Exception $e ) {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ abstract class WC_Deprecated_Hooks {
|
||||||
* Display a deprecated notice for old hooks.
|
* Display a deprecated notice for old hooks.
|
||||||
*/
|
*/
|
||||||
protected function display_notice( $old_hook, $new_hook ) {
|
protected function display_notice( $old_hook, $new_hook ) {
|
||||||
_deprecated_function( sprintf( 'The "%s" hook uses out of date data structures and', esc_html( $old_hook ) ), WC_VERSION, esc_html( $new_hook ) );
|
wc_deprecated_function( sprintf( 'The "%s" hook uses out of date data structures and', esc_html( $old_hook ) ), WC_VERSION, esc_html( $new_hook ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -189,7 +189,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
||||||
// Add/save items.
|
// Add/save items.
|
||||||
foreach ( $this->items as $item_group => $items ) {
|
foreach ( $this->items as $item_group => $items ) {
|
||||||
if ( is_array( $items ) ) {
|
if ( is_array( $items ) ) {
|
||||||
foreach ( $items as $item_key => $item ) {
|
foreach ( array_filter( $items ) as $item_key => $item ) {
|
||||||
$item->set_order_id( $this->get_id() );
|
$item->set_order_id( $this->get_id() );
|
||||||
$item_id = $item->save();
|
$item_id = $item->save();
|
||||||
|
|
||||||
|
@ -412,7 +412,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
||||||
$tax_totals[ $code ]->rate_id = $tax->get_rate_id();
|
$tax_totals[ $code ]->rate_id = $tax->get_rate_id();
|
||||||
$tax_totals[ $code ]->is_compound = $tax->is_compound();
|
$tax_totals[ $code ]->is_compound = $tax->is_compound();
|
||||||
$tax_totals[ $code ]->label = $tax->get_label();
|
$tax_totals[ $code ]->label = $tax->get_label();
|
||||||
$tax_totals[ $code ]->amount += $tax->get_tax_total() + $tax->get_shipping_tax_total();
|
$tax_totals[ $code ]->amount += (float) $tax->get_tax_total() + (float) $tax->get_shipping_tax_total();
|
||||||
$tax_totals[ $code ]->formatted_amount = wc_price( wc_round_tax_total( $tax_totals[ $code ]->amount ), array( 'currency' => $this->get_currency() ) );
|
$tax_totals[ $code ]->formatted_amount = wc_price( wc_round_tax_total( $tax_totals[ $code ]->amount ), array( 'currency' => $this->get_currency() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,6 +434,25 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
||||||
return array_keys( wc_get_order_statuses() );
|
return array_keys( wc_get_order_statuses() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user ID. Used by orders, not other order types like refunds.
|
||||||
|
*
|
||||||
|
* @param string $context
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function get_user_id( $context = 'view' ) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user. Used by orders, not other order types like refunds.
|
||||||
|
*
|
||||||
|
* @return WP_User|false
|
||||||
|
*/
|
||||||
|
public function get_user() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Setters
|
| Setters
|
||||||
|
@ -453,7 +472,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
||||||
* @throws WC_Data_Exception
|
* @throws WC_Data_Exception
|
||||||
*/
|
*/
|
||||||
public function set_parent_id( $value ) {
|
public function set_parent_id( $value ) {
|
||||||
if ( $value && ! wc_get_order( $value ) ) {
|
if ( $value && ( $value === $this->get_id() || ! wc_get_order( $value ) ) ) {
|
||||||
$this->error( 'order_invalid_parent_id', __( 'Invalid parent ID', 'woocommerce' ) );
|
$this->error( 'order_invalid_parent_id', __( 'Invalid parent ID', 'woocommerce' ) );
|
||||||
}
|
}
|
||||||
$this->set_prop( 'parent_id', absint( $value ) );
|
$this->set_prop( 'parent_id', absint( $value ) );
|
||||||
|
@ -470,17 +489,20 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
||||||
$old_status = $this->get_status();
|
$old_status = $this->get_status();
|
||||||
$new_status = 'wc-' === substr( $new_status, 0, 3 ) ? substr( $new_status, 3 ) : $new_status;
|
$new_status = 'wc-' === substr( $new_status, 0, 3 ) ? substr( $new_status, 3 ) : $new_status;
|
||||||
|
|
||||||
|
// If setting the status, ensure it's set to a valid status.
|
||||||
|
if ( true === $this->object_read ) {
|
||||||
// Only allow valid new status
|
// Only allow valid new status
|
||||||
if ( ! in_array( 'wc-' . $new_status, $this->get_valid_statuses() ) && 'trash' !== $new_status ) {
|
if ( ! in_array( 'wc-' . $new_status, $this->get_valid_statuses() ) && 'trash' !== $new_status ) {
|
||||||
$new_status = 'pending';
|
$new_status = 'pending';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->set_prop( 'status', $new_status );
|
|
||||||
|
|
||||||
// If the old status is set but unknown (e.g. draft) assume its pending for action usage.
|
// If the old status is set but unknown (e.g. draft) assume its pending for action usage.
|
||||||
if ( $old_status && ! in_array( 'wc-' . $old_status, $this->get_valid_statuses() ) && 'trash' !== $old_status ) {
|
if ( $old_status && ! in_array( 'wc-' . $old_status, $this->get_valid_statuses() ) && 'trash' !== $old_status ) {
|
||||||
$old_status = 'pending';
|
$old_status = 'pending';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->set_prop( 'status', $new_status );
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'from' => $old_status,
|
'from' => $old_status,
|
||||||
|
@ -652,13 +674,13 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
||||||
* @return string group
|
* @return string group
|
||||||
*/
|
*/
|
||||||
protected function type_to_group( $type ) {
|
protected function type_to_group( $type ) {
|
||||||
$type_to_group = array(
|
$type_to_group = apply_filters( 'woocommerce_order_type_to_group', array(
|
||||||
'line_item' => 'line_items',
|
'line_item' => 'line_items',
|
||||||
'tax' => 'tax_lines',
|
'tax' => 'tax_lines',
|
||||||
'shipping' => 'shipping_lines',
|
'shipping' => 'shipping_lines',
|
||||||
'fee' => 'fee_lines',
|
'fee' => 'fee_lines',
|
||||||
'coupon' => 'coupon_lines',
|
'coupon' => 'coupon_lines',
|
||||||
);
|
) );
|
||||||
return isset( $type_to_group[ $type ] ) ? $type_to_group[ $type ] : '';
|
return isset( $type_to_group[ $type ] ) ? $type_to_group[ $type ] : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -678,7 +700,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
||||||
$this->items[ $group ] = $this->data_store->read_items( $this, $type );
|
$this->items[ $group ] = $this->data_store->read_items( $this, $type );
|
||||||
}
|
}
|
||||||
// Don't use array_merge here because keys are numeric
|
// Don't use array_merge here because keys are numeric
|
||||||
$items = $items + $this->items[ $group ];
|
$items = array_filter( $items + $this->items[ $group ] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1075,14 +1097,14 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
||||||
foreach ( $this->get_items( array( 'line_item', 'fee' ) ) as $item_id => $item ) {
|
foreach ( $this->get_items( array( 'line_item', 'fee' ) ) as $item_id => $item ) {
|
||||||
$taxes = $item->get_taxes();
|
$taxes = $item->get_taxes();
|
||||||
foreach ( $taxes['total'] as $tax_rate_id => $tax ) {
|
foreach ( $taxes['total'] as $tax_rate_id => $tax ) {
|
||||||
$cart_taxes[ $tax_rate_id ] = isset( $cart_taxes[ $tax_rate_id ] ) ? $cart_taxes[ $tax_rate_id ] + $tax : $tax;
|
$cart_taxes[ $tax_rate_id ] = isset( $cart_taxes[ $tax_rate_id ] ) ? $cart_taxes[ $tax_rate_id ] + (float) $tax : (float) $tax;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( $this->get_shipping_methods() as $item_id => $item ) {
|
foreach ( $this->get_shipping_methods() as $item_id => $item ) {
|
||||||
$taxes = $item->get_taxes();
|
$taxes = $item->get_taxes();
|
||||||
foreach ( $taxes['total'] as $tax_rate_id => $tax ) {
|
foreach ( $taxes['total'] as $tax_rate_id => $tax ) {
|
||||||
$shipping_taxes[ $tax_rate_id ] = isset( $shipping_taxes[ $tax_rate_id ] ) ? $shipping_taxes[ $tax_rate_id ] + $tax : $tax;
|
$shipping_taxes[ $tax_rate_id ] = isset( $shipping_taxes[ $tax_rate_id ] ) ? $shipping_taxes[ $tax_rate_id ] + (float) $tax : (float) $tax;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1348,7 +1370,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
||||||
|
|
||||||
// Remove non-compound taxes.
|
// Remove non-compound taxes.
|
||||||
foreach ( $this->get_taxes() as $tax ) {
|
foreach ( $this->get_taxes() as $tax ) {
|
||||||
if ( $this->is_compound() ) {
|
if ( $tax->is_compound() ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$subtotal = $subtotal + $tax->get_tax_total() + $tax->get_shipping_tax_total();
|
$subtotal = $subtotal + $tax->get_tax_total() + $tax->get_shipping_tax_total();
|
||||||
|
|
|
@ -1155,13 +1155,17 @@ class WC_Product extends WC_Abstract_Legacy_Product {
|
||||||
|
|
||||||
// Validate the file extension
|
// Validate the file extension
|
||||||
if ( ! $download_object->is_allowed_filetype() ) {
|
if ( ! $download_object->is_allowed_filetype() ) {
|
||||||
|
if ( $this->get_object_read() ) {
|
||||||
$errors[] = sprintf( __( 'The downloadable file %1$s cannot be used as it does not have an allowed file type. Allowed types include: %2$s', 'woocommerce' ), '<code>' . basename( $download_object->get_file() ) . '</code>', '<code>' . implode( ', ', array_keys( $download_object->get_allowed_mime_types() ) ) . '</code>' );
|
$errors[] = sprintf( __( 'The downloadable file %1$s cannot be used as it does not have an allowed file type. Allowed types include: %2$s', 'woocommerce' ), '<code>' . basename( $download_object->get_file() ) . '</code>', '<code>' . implode( ', ', array_keys( $download_object->get_allowed_mime_types() ) ) . '</code>' );
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate the file exists.
|
// Validate the file exists.
|
||||||
if ( ! $download_object->file_exists() ) {
|
if ( ! $download_object->file_exists() ) {
|
||||||
|
if ( $this->get_object_read() ) {
|
||||||
$errors[] = sprintf( __( 'The downloadable file %s cannot be used as it does not exist on the server.', 'woocommerce' ), '<code>' . $download_object->get_file() . '</code>' );
|
$errors[] = sprintf( __( 'The downloadable file %s cannot be used as it does not exist on the server.', 'woocommerce' ), '<code>' . $download_object->get_file() . '</code>' );
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1289,7 +1293,7 @@ class WC_Product extends WC_Abstract_Legacy_Product {
|
||||||
$this->data_store->create( $this );
|
$this->data_store->create( $this );
|
||||||
}
|
}
|
||||||
if ( $this->get_parent_id() ) {
|
if ( $this->get_parent_id() ) {
|
||||||
wp_schedule_single_event( time(), 'woocommerce_deferred_product_sync', array( 'product_id' => $this->get_parent_id() ) );
|
wc_deferred_product_sync( $this->get_parent_id() );
|
||||||
}
|
}
|
||||||
return $this->get_id();
|
return $this->get_id();
|
||||||
}
|
}
|
||||||
|
@ -1581,6 +1585,17 @@ class WC_Product extends WC_Abstract_Legacy_Product {
|
||||||
return $this->is_downloadable() && $this->get_file( $download_id );
|
return $this->is_downloadable() && $this->get_file( $download_id );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether or not the product has additonal options that need
|
||||||
|
* selecting before adding to cart.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function has_options() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Non-CRUD Getters
|
| Non-CRUD Getters
|
||||||
|
@ -1834,7 +1849,7 @@ class WC_Product extends WC_Abstract_Legacy_Product {
|
||||||
/**
|
/**
|
||||||
* Returns the availability of the product.
|
* Returns the availability of the product.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string[]
|
||||||
*/
|
*/
|
||||||
public function get_availability() {
|
public function get_availability() {
|
||||||
return apply_filters( 'woocommerce_get_availability', array(
|
return apply_filters( 'woocommerce_get_availability', array(
|
||||||
|
@ -1852,7 +1867,7 @@ class WC_Product extends WC_Abstract_Legacy_Product {
|
||||||
if ( ! $this->is_in_stock() ) {
|
if ( ! $this->is_in_stock() ) {
|
||||||
$availability = __( 'Out of stock', 'woocommerce' );
|
$availability = __( 'Out of stock', 'woocommerce' );
|
||||||
} elseif ( $this->managing_stock() && $this->is_on_backorder( 1 ) ) {
|
} elseif ( $this->managing_stock() && $this->is_on_backorder( 1 ) ) {
|
||||||
$availability = __( 'Available on backorder', 'woocommerce' );
|
$availability = $this->backorders_require_notification() ? __( 'Available on backorder', 'woocommerce' ) : '';
|
||||||
} elseif ( $this->managing_stock() ) {
|
} elseif ( $this->managing_stock() ) {
|
||||||
$availability = wc_format_stock_for_display( $this );
|
$availability = wc_format_stock_for_display( $this );
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -5,7 +5,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract Rest Controler Class
|
* Abstract Rest Controller Class
|
||||||
*
|
*
|
||||||
* @author WooThemes
|
* @author WooThemes
|
||||||
* @category API
|
* @category API
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Abstract Rest CRUD Controler Class
|
* Abstract Rest CRUD Controller Class
|
||||||
*
|
*
|
||||||
* @author Automattic
|
* @author Automattic
|
||||||
* @category API
|
* @category API
|
||||||
|
@ -471,6 +471,7 @@ abstract class WC_REST_CRUD_Controller extends WC_REST_Posts_Controller {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function get_collection_params() {
|
public function get_collection_params() {
|
||||||
|
$params = array();
|
||||||
$params['context'] = $this->get_context_param();
|
$params['context'] = $this->get_context_param();
|
||||||
$params['context']['default'] = 'view';
|
$params['context']['default'] = 'view';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract Rest Posts Controler Class
|
* Abstract Rest Posts Controller Class
|
||||||
*
|
*
|
||||||
* @author WooThemes
|
* @author WooThemes
|
||||||
* @category API
|
* @category API
|
||||||
|
@ -204,7 +204,7 @@ abstract class WC_REST_Posts_Controller extends WC_REST_Controller {
|
||||||
/**
|
/**
|
||||||
* Fires after a single item is created or updated via the REST API.
|
* Fires after a single item is created or updated via the REST API.
|
||||||
*
|
*
|
||||||
* @param object $post Inserted object (not a WP_Post object).
|
* @param WP_Post $post Post object.
|
||||||
* @param WP_REST_Request $request Request object.
|
* @param WP_REST_Request $request Request object.
|
||||||
* @param boolean $creating True when creating item, false when updating.
|
* @param boolean $creating True when creating item, false when updating.
|
||||||
*/
|
*/
|
||||||
|
@ -282,7 +282,7 @@ abstract class WC_REST_Posts_Controller extends WC_REST_Controller {
|
||||||
/**
|
/**
|
||||||
* Fires after a single item is created or updated via the REST API.
|
* Fires after a single item is created or updated via the REST API.
|
||||||
*
|
*
|
||||||
* @param object $post Inserted object (not a WP_Post object).
|
* @param WP_Post $post Post object.
|
||||||
* @param WP_REST_Request $request Request object.
|
* @param WP_REST_Request $request Request object.
|
||||||
* @param boolean $creating True when creating item, false when updating.
|
* @param boolean $creating True when creating item, false when updating.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,7 +5,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract Rest Terms Controler Class
|
* Abstract Rest Terms Controller Class
|
||||||
*
|
*
|
||||||
* @author WooThemes
|
* @author WooThemes
|
||||||
* @category API
|
* @category API
|
||||||
|
@ -405,7 +405,7 @@ abstract class WC_REST_Terms_Controller extends WC_REST_Controller {
|
||||||
// Add term data.
|
// Add term data.
|
||||||
$meta_fields = $this->update_term_meta_fields( $term, $request );
|
$meta_fields = $this->update_term_meta_fields( $term, $request );
|
||||||
if ( is_wp_error( $meta_fields ) ) {
|
if ( is_wp_error( $meta_fields ) ) {
|
||||||
wp_delete_term( $term['term_id'], $taxonomy );
|
wp_delete_term( $term->term_id, $taxonomy );
|
||||||
|
|
||||||
return $meta_fields;
|
return $meta_fields;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@ class WC_Admin_API_Keys_Table_List extends WP_List_Table {
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
parent::__construct( array(
|
parent::__construct( array(
|
||||||
'singular' => __( 'key', 'woocommerce' ),
|
'singular' => 'key',
|
||||||
'plural' => __( 'keys', 'woocommerce' ),
|
'plural' => 'keys',
|
||||||
'ajax' => false,
|
'ajax' => false,
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,6 +222,8 @@ class WC_Admin_Assets {
|
||||||
'i18n_select_state_text' => esc_attr__( 'Select an option…', 'woocommerce' ),
|
'i18n_select_state_text' => esc_attr__( 'Select an option…', 'woocommerce' ),
|
||||||
'default_country' => isset( $default_location['country'] ) ? $default_location['country'] : '',
|
'default_country' => isset( $default_location['country'] ) ? $default_location['country'] : '',
|
||||||
'default_state' => isset( $default_location['state'] ) ? $default_location['state'] : '',
|
'default_state' => isset( $default_location['state'] ) ? $default_location['state'] : '',
|
||||||
|
'placeholder_name' => esc_attr__( 'Name (required)', 'woocommerce' ),
|
||||||
|
'placeholder_value' => esc_attr__( 'Value (required)', 'woocommerce' ),
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
if ( in_array( $screen_id, array( 'shop_coupon', 'edit-shop_coupon' ) ) ) {
|
if ( in_array( $screen_id, array( 'shop_coupon', 'edit-shop_coupon' ) ) ) {
|
||||||
|
@ -252,8 +254,7 @@ class WC_Admin_Assets {
|
||||||
'visible_label' => __( 'Visible on the product page', 'woocommerce' ),
|
'visible_label' => __( 'Visible on the product page', 'woocommerce' ),
|
||||||
'used_for_variations_label' => __( 'Used for variations', 'woocommerce' ),
|
'used_for_variations_label' => __( 'Used for variations', 'woocommerce' ),
|
||||||
'new_attribute_prompt' => __( 'Enter a name for the new attribute term:', 'woocommerce' ),
|
'new_attribute_prompt' => __( 'Enter a name for the new attribute term:', 'woocommerce' ),
|
||||||
'calc_totals' => __( 'Calculate totals based on order items, discounts, and shipping?', 'woocommerce' ),
|
'calc_totals' => __( 'Recalculate totals? This will calculate taxes based on the customers country (or the store base country) and update totals.', 'woocommerce' ),
|
||||||
'calc_line_taxes' => __( 'Calculate line taxes? This will calculate taxes based on the customers country. If no billing/shipping is set it will use the store base country.', 'woocommerce' ),
|
|
||||||
'copy_billing' => __( 'Copy billing information to shipping information? This will remove any currently entered shipping information.', 'woocommerce' ),
|
'copy_billing' => __( 'Copy billing information to shipping information? This will remove any currently entered shipping information.', 'woocommerce' ),
|
||||||
'load_billing' => __( 'Load the customer\'s billing information? This will remove any currently entered billing information.', 'woocommerce' ),
|
'load_billing' => __( 'Load the customer\'s billing information? This will remove any currently entered billing information.', 'woocommerce' ),
|
||||||
'load_shipping' => __( 'Load the customer\'s shipping information? This will remove any currently entered shipping information.', 'woocommerce' ),
|
'load_shipping' => __( 'Load the customer\'s shipping information? This will remove any currently entered shipping information.', 'woocommerce' ),
|
||||||
|
|
|
@ -384,7 +384,7 @@ class WC_Admin_Attributes {
|
||||||
<div class="row-actions"><span class="edit"><a href="<?php echo esc_url( add_query_arg( 'edit', $tax->attribute_id, 'edit.php?post_type=product&page=product_attributes' ) ); ?>"><?php _e( 'Edit', 'woocommerce' ); ?></a> | </span><span class="delete"><a class="delete" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'delete', $tax->attribute_id, 'edit.php?post_type=product&page=product_attributes' ), 'woocommerce-delete-attribute_' . $tax->attribute_id ) ); ?>"><?php _e( 'Delete', 'woocommerce' ); ?></a></span></div>
|
<div class="row-actions"><span class="edit"><a href="<?php echo esc_url( add_query_arg( 'edit', $tax->attribute_id, 'edit.php?post_type=product&page=product_attributes' ) ); ?>"><?php _e( 'Edit', 'woocommerce' ); ?></a> | </span><span class="delete"><a class="delete" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'delete', $tax->attribute_id, 'edit.php?post_type=product&page=product_attributes' ), 'woocommerce-delete-attribute_' . $tax->attribute_id ) ); ?>"><?php _e( 'Delete', 'woocommerce' ); ?></a></span></div>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo esc_html( $tax->attribute_name ); ?></td>
|
<td><?php echo esc_html( $tax->attribute_name ); ?></td>
|
||||||
<td><?php echo esc_html( ucfirst( $tax->attribute_type ) ); ?> <?php echo $tax->attribute_public ? __( '(Public)', 'woocommerce' ) : ''; ?></td>
|
<td><?php echo esc_html( wc_get_attribute_type_label( $tax->attribute_type ) ); ?> <?php echo $tax->attribute_public ? __( '(Public)', 'woocommerce' ) : ''; ?></td>
|
||||||
<td><?php
|
<td><?php
|
||||||
switch ( $tax->attribute_orderby ) {
|
switch ( $tax->attribute_orderby ) {
|
||||||
case 'name' :
|
case 'name' :
|
||||||
|
|
|
@ -0,0 +1,98 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Setup customize items.
|
||||||
|
*
|
||||||
|
* @author WooCommerce
|
||||||
|
* @category Admin
|
||||||
|
* @package WooCommerce/Admin/Customize
|
||||||
|
* @version 3.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! class_exists( 'WC_Admin_Customize', false ) ) :
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WC_Admin_Customize Class.
|
||||||
|
*/
|
||||||
|
class WC_Admin_Customize {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize customize actions.
|
||||||
|
*/
|
||||||
|
public function __construct() {
|
||||||
|
// Include custom items to customizer nav menu settings.
|
||||||
|
add_filter( 'customize_nav_menu_available_item_types', array( $this, 'register_customize_nav_menu_item_types' ) );
|
||||||
|
add_filter( 'customize_nav_menu_available_items', array( $this, 'register_customize_nav_menu_items' ), 10, 4 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register customize new nav menu item types.
|
||||||
|
* This will register WooCommerce account endpoints as a nav menu item type.
|
||||||
|
*
|
||||||
|
* @since 3.1.0
|
||||||
|
* @param array $item_types Menu item types.
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function register_customize_nav_menu_item_types( $item_types ) {
|
||||||
|
$item_types[] = array(
|
||||||
|
'title' => __( 'WooCommerce endpoints', 'woocommerce' ),
|
||||||
|
'type_label' => __( 'WooCommerce endpoint', 'woocommerce' ),
|
||||||
|
'type' => 'woocommerce_nav',
|
||||||
|
'object' => 'woocommerce_endpoint',
|
||||||
|
);
|
||||||
|
|
||||||
|
return $item_types;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register account endpoints to customize nav menu items.
|
||||||
|
*
|
||||||
|
* @since 3.1.0
|
||||||
|
* @param array $items List of nav menu items.
|
||||||
|
* @param string $type Nav menu type.
|
||||||
|
* @param string $object Nav menu object.
|
||||||
|
* @param integer $page Page number.
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function register_customize_nav_menu_items( $items = array(), $type = '', $object = '', $page = 0 ) {
|
||||||
|
if ( 'woocommerce_endpoint' !== $object ) {
|
||||||
|
return $items;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Don't allow pagination since all items are loaded at once.
|
||||||
|
if ( 0 < $page ) {
|
||||||
|
return $items;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get items from account menu.
|
||||||
|
$endpoints = wc_get_account_menu_items();
|
||||||
|
|
||||||
|
// Remove dashboard item.
|
||||||
|
if ( isset( $endpoints['dashboard'] ) ) {
|
||||||
|
unset( $endpoints['dashboard'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Include missing lost password.
|
||||||
|
$endpoints['lost-password'] = __( 'Lost password', 'woocommerce' );
|
||||||
|
|
||||||
|
$endpoints = apply_filters( 'woocommerce_custom_nav_menu_items', $endpoints );
|
||||||
|
|
||||||
|
foreach ( $endpoints as $endpoint => $title ) {
|
||||||
|
$items[] = array(
|
||||||
|
'id' => $endpoint,
|
||||||
|
'title' => $title,
|
||||||
|
'type_label' => __( 'Custom Link', 'woocommerce' ),
|
||||||
|
'url' => esc_url_raw( wc_get_account_endpoint_url( $endpoint ) ),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
endif;
|
||||||
|
|
||||||
|
return new WC_Admin_Customize();
|
|
@ -246,10 +246,8 @@ class WC_Admin_Dashboard {
|
||||||
*/
|
*/
|
||||||
public function recent_reviews() {
|
public function recent_reviews() {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
$comments = $wpdb->get_results( "
|
$query_from = apply_filters( 'woocommerce_report_recent_reviews_query_from', "FROM {$wpdb->comments} comments
|
||||||
SELECT posts.ID, posts.post_title, comments.comment_author, comments.comment_ID, SUBSTRING(comments.comment_content,1,100) AS comment_excerpt
|
LEFT JOIN {$wpdb->posts} posts ON (comments.comment_post_ID = posts.ID)
|
||||||
FROM $wpdb->comments comments
|
|
||||||
LEFT JOIN $wpdb->posts posts ON (comments.comment_post_ID = posts.ID)
|
|
||||||
WHERE comments.comment_approved = '1'
|
WHERE comments.comment_approved = '1'
|
||||||
AND comments.comment_type = ''
|
AND comments.comment_type = ''
|
||||||
AND posts.post_password = ''
|
AND posts.post_password = ''
|
||||||
|
@ -257,6 +255,10 @@ class WC_Admin_Dashboard {
|
||||||
ORDER BY comments.comment_date_gmt DESC
|
ORDER BY comments.comment_date_gmt DESC
|
||||||
LIMIT 5
|
LIMIT 5
|
||||||
" );
|
" );
|
||||||
|
$comments = $wpdb->get_results( "
|
||||||
|
SELECT posts.ID, posts.post_title, comments.comment_author, comments.comment_ID, SUBSTRING(comments.comment_content,1,100) AS comment_excerpt
|
||||||
|
{$query_from};
|
||||||
|
" );
|
||||||
|
|
||||||
if ( $comments ) {
|
if ( $comments ) {
|
||||||
echo '<ul>';
|
echo '<ul>';
|
||||||
|
|
|
@ -117,11 +117,17 @@ class WC_Admin_Duplicate_Product {
|
||||||
|
|
||||||
$duplicate = clone $product;
|
$duplicate = clone $product;
|
||||||
$duplicate->set_id( 0 );
|
$duplicate->set_id( 0 );
|
||||||
|
$duplicate->set_name( sprintf( __( '%s (Copy)', 'woocommerce' ), $duplicate->get_name() ) );
|
||||||
$duplicate->set_total_sales( 0 );
|
$duplicate->set_total_sales( 0 );
|
||||||
if ( '' !== $product->get_sku( 'edit' ) ) {
|
if ( '' !== $product->get_sku( 'edit' ) ) {
|
||||||
$duplicate->set_sku( wc_product_generate_unique_sku( 0, $product->get_sku( 'edit' ) ) );
|
$duplicate->set_sku( wc_product_generate_unique_sku( 0, $product->get_sku( 'edit' ) ) );
|
||||||
}
|
}
|
||||||
$duplicate->set_status( 'draft' );
|
$duplicate->set_status( 'draft' );
|
||||||
|
$duplicate->set_date_created( null );
|
||||||
|
$duplicate->set_slug( '' );
|
||||||
|
$duplicate->set_rating_counts( 0 );
|
||||||
|
$duplicate->set_average_rating( 0 );
|
||||||
|
$duplicate->set_review_count( 0 );
|
||||||
|
|
||||||
foreach ( $meta_to_exclude as $meta_key ) {
|
foreach ( $meta_to_exclude as $meta_key ) {
|
||||||
$duplicate->delete_meta_data( $meta_key );
|
$duplicate->delete_meta_data( $meta_key );
|
||||||
|
@ -133,7 +139,8 @@ class WC_Admin_Duplicate_Product {
|
||||||
// Save parent product.
|
// Save parent product.
|
||||||
$duplicate->save();
|
$duplicate->save();
|
||||||
|
|
||||||
if ( ! apply_filters( 'woocommerce_duplicate_product_exclude_children', false ) && ( $product->is_type( 'variable' ) || $product->is_type( 'grouped' ) ) ) {
|
// Duplicate children of a variable product.
|
||||||
|
if ( ! apply_filters( 'woocommerce_duplicate_product_exclude_children', false ) && $product->is_type( 'variable' ) ) {
|
||||||
foreach ( $product->get_children() as $child_id ) {
|
foreach ( $product->get_children() as $child_id ) {
|
||||||
$child = wc_get_product( $child_id );
|
$child = wc_get_product( $child_id );
|
||||||
$child_duplicate = clone $child;
|
$child_duplicate = clone $child;
|
||||||
|
|
|
@ -49,18 +49,6 @@ class WC_Admin_Help {
|
||||||
'title' => __( 'Product Settings', 'woocommerce' ),
|
'title' => __( 'Product Settings', 'woocommerce' ),
|
||||||
'url' => '//fast.wistia.net/embed/iframe/lolkan4fxf.jsonp?',
|
'url' => '//fast.wistia.net/embed/iframe/lolkan4fxf.jsonp?',
|
||||||
),
|
),
|
||||||
'wc-settings-products-display' => array(
|
|
||||||
'title' => __( 'Display Settings', 'woocommerce' ),
|
|
||||||
'url' => '//fast.wistia.net/embed/iframe/lolkan4fxf.jsonp?time=55s&',
|
|
||||||
),
|
|
||||||
'wc-settings-products-inventory' => array(
|
|
||||||
'title' => __( 'Inventory Settings', 'woocommerce' ),
|
|
||||||
'url' => '//fast.wistia.net/embed/iframe/lolkan4fxf.jsonp?time=2m38s&',
|
|
||||||
),
|
|
||||||
'wc-settings-products-downloadable' => array(
|
|
||||||
'title' => __( 'Downloadable Products Settings', 'woocommerce' ),
|
|
||||||
'url' => '//fast.wistia.net/embed/iframe/lolkan4fxf.jsonp?time=3m50s&',
|
|
||||||
),
|
|
||||||
'wc-settings-tax' => array(
|
'wc-settings-tax' => array(
|
||||||
'title' => __( 'Tax Settings', 'woocommerce' ),
|
'title' => __( 'Tax Settings', 'woocommerce' ),
|
||||||
'url' => '//fast.wistia.net/embed/iframe/qp1v19dwrh.jsonp?',
|
'url' => '//fast.wistia.net/embed/iframe/qp1v19dwrh.jsonp?',
|
||||||
|
@ -133,54 +121,30 @@ class WC_Admin_Help {
|
||||||
'title' => __( 'API Settings', 'woocommerce' ),
|
'title' => __( 'API Settings', 'woocommerce' ),
|
||||||
'url' => '//fast.wistia.net/embed/iframe/1q0ny74vvq.jsonp?',
|
'url' => '//fast.wistia.net/embed/iframe/1q0ny74vvq.jsonp?',
|
||||||
),
|
),
|
||||||
'wc-settings-api-keys' => array(
|
|
||||||
'title' => __( 'Keys & Apps', 'woocommerce' ),
|
|
||||||
'url' => '//fast.wistia.net/embed/iframe/1q0ny74vvq.jsonp?time=1m06s&',
|
|
||||||
),
|
|
||||||
'wc-settings-api-webhooks' => array(
|
|
||||||
'title' => __( 'Webhooks', 'woocommerce' ),
|
|
||||||
'url' => '//fast.wistia.net/embed/iframe/1q0ny74vvq.jsonp?time=1m52s&',
|
|
||||||
),
|
|
||||||
'product' => array(
|
'product' => array(
|
||||||
'title' => __( 'Creating Products', 'woocommerce' ),
|
'title' => __( 'Creating Products', 'woocommerce' ),
|
||||||
'url' => '//fast.wistia.net/embed/iframe/ziyjmd4kut.jsonp?',
|
'url' => '//fast.wistia.net/embed/iframe/fw0477t6wr.jsonp?',
|
||||||
),
|
),
|
||||||
'edit-product_cat' => array(
|
'edit-product_cat' => array(
|
||||||
'title' => __( 'Product Categories', 'woocommerce' ),
|
'title' => __( 'Product Categories', 'woocommerce' ),
|
||||||
'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg.jsonp?time=21s&',
|
'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg.jsonp?',
|
||||||
),
|
),
|
||||||
'edit-product_tag' => array(
|
'edit-product_tag' => array(
|
||||||
'title' => __( 'Product Tags', 'woocommerce' ),
|
'title' => __( 'Product Tags', 'woocommerce' ),
|
||||||
'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg.jsonp??time=1m56s&',
|
'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg.jsonp?',
|
||||||
),
|
),
|
||||||
'product_attributes' => array(
|
'product_attributes' => array(
|
||||||
'title' => __( 'Product Attributes', 'woocommerce' ),
|
'title' => __( 'Product Attributes', 'woocommerce' ),
|
||||||
'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg.jsonp??time=2m18s&',
|
'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg.jsonp?',
|
||||||
),
|
),
|
||||||
'wc-status' => array(
|
'wc-status' => array(
|
||||||
'title' => __( 'System Status', 'woocommerce' ),
|
'title' => __( 'System Status', 'woocommerce' ),
|
||||||
'url' => '//fast.wistia.net/embed/iframe/xdn733nnhi.jsonp?',
|
'url' => '//fast.wistia.net/embed/iframe/xdn733nnhi.jsonp?',
|
||||||
),
|
),
|
||||||
'wc-status-tools' => array(
|
|
||||||
'title' => __( 'Tools', 'woocommerce' ),
|
|
||||||
'url' => '//fast.wistia.net/embed/iframe/xdn733nnhi.jsonp?time=3m55s&',
|
|
||||||
),
|
|
||||||
'wc-reports' => array(
|
'wc-reports' => array(
|
||||||
'title' => __( 'Reports', 'woocommerce' ),
|
'title' => __( 'Reports', 'woocommerce' ),
|
||||||
'url' => '//fast.wistia.net/embed/iframe/6aasex0w99.jsonp?',
|
'url' => '//fast.wistia.net/embed/iframe/6aasex0w99.jsonp?',
|
||||||
),
|
),
|
||||||
'wc-reports-customers' => array(
|
|
||||||
'title' => __( 'Customer Reports', 'woocommerce' ),
|
|
||||||
'url' => '//fast.wistia.net/embed/iframe/6aasex0w99.jsonp?time=2m07s&',
|
|
||||||
),
|
|
||||||
'wc-reports-stock' => array(
|
|
||||||
'title' => __( 'Stock Reports', 'woocommerce' ),
|
|
||||||
'url' => '//fast.wistia.net/embed/iframe/6aasex0w99.jsonp?time=2m41s&',
|
|
||||||
),
|
|
||||||
'wc-reports-taxes' => array(
|
|
||||||
'title' => __( 'Tax Reports', 'woocommerce' ),
|
|
||||||
'url' => '//fast.wistia.net/embed/iframe/6aasex0w99.jsonp?time=3m14s&',
|
|
||||||
),
|
|
||||||
'edit-shop_coupon' => array(
|
'edit-shop_coupon' => array(
|
||||||
'title' => __( 'Coupons', 'woocommerce' ),
|
'title' => __( 'Coupons', 'woocommerce' ),
|
||||||
'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit.jsonp?',
|
'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit.jsonp?',
|
||||||
|
|
|
@ -23,8 +23,8 @@ class WC_Admin_Log_Table_List extends WP_List_Table {
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
parent::__construct( array(
|
parent::__construct( array(
|
||||||
'singular' => __( 'log', 'woocommerce' ),
|
'singular' => 'log',
|
||||||
'plural' => __( 'logs', 'woocommerce' ),
|
'plural' => 'logs',
|
||||||
'ajax' => false,
|
'ajax' => false,
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,8 @@ class WC_Admin_Menus {
|
||||||
add_filter( 'menu_order', array( $this, 'menu_order' ) );
|
add_filter( 'menu_order', array( $this, 'menu_order' ) );
|
||||||
add_filter( 'custom_menu_order', array( $this, 'custom_menu_order' ) );
|
add_filter( 'custom_menu_order', array( $this, 'custom_menu_order' ) );
|
||||||
|
|
||||||
// Add endpoints custom URLs in Appearance > Menus > Pages
|
// Add endpoints custom URLs in Appearance > Menus > Pages.
|
||||||
add_action( 'admin_init', array( $this, 'add_nav_menu_meta_boxes' ) );
|
add_action( 'admin_head-nav-menus.php', array( $this, 'add_nav_menu_meta_boxes' ) );
|
||||||
|
|
||||||
// Admin bar menus
|
// Admin bar menus
|
||||||
if ( apply_filters( 'woocommerce_show_admin_bar_visit_store', true ) ) {
|
if ( apply_filters( 'woocommerce_show_admin_bar_visit_store', true ) ) {
|
||||||
|
@ -94,7 +94,7 @@ class WC_Admin_Menus {
|
||||||
* Add menu item.
|
* Add menu item.
|
||||||
*/
|
*/
|
||||||
public function status_menu() {
|
public function status_menu() {
|
||||||
add_submenu_page( 'woocommerce', __( 'WooCommerce status', 'woocommerce' ), __( 'System status', 'woocommerce' ) , 'manage_woocommerce', 'wc-status', array( $this, 'status_page' ) );
|
add_submenu_page( 'woocommerce', __( 'WooCommerce status', 'woocommerce' ), __( 'Status', 'woocommerce' ) , 'manage_woocommerce', 'wc-status', array( $this, 'status_page' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -238,30 +238,39 @@ class WC_Admin_Menus {
|
||||||
* Output menu links.
|
* Output menu links.
|
||||||
*/
|
*/
|
||||||
public function nav_menu_links() {
|
public function nav_menu_links() {
|
||||||
$exclude = array( 'view-order', 'add-payment-method', 'order-pay', 'order-received' );
|
// Get items from account menu.
|
||||||
|
$endpoints = wc_get_account_menu_items();
|
||||||
|
|
||||||
|
// Remove dashboard item.
|
||||||
|
if ( isset( $endpoints['dashboard'] ) ) {
|
||||||
|
unset( $endpoints['dashboard'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Include missing lost password.
|
||||||
|
$endpoints['lost-password'] = __( 'Lost password', 'woocommerce' );
|
||||||
|
|
||||||
|
$endpoints = apply_filters( 'woocommerce_custom_nav_menu_items', $endpoints );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div id="posttype-woocommerce-endpoints" class="posttypediv">
|
<div id="posttype-woocommerce-endpoints" class="posttypediv">
|
||||||
<div id="tabs-panel-woocommerce-endpoints" class="tabs-panel tabs-panel-active">
|
<div id="tabs-panel-woocommerce-endpoints" class="tabs-panel tabs-panel-active">
|
||||||
<ul id="woocommerce-endpoints-checklist" class="categorychecklist form-no-clear">
|
<ul id="woocommerce-endpoints-checklist" class="categorychecklist form-no-clear">
|
||||||
<?php
|
<?php
|
||||||
$i = -1;
|
$i = -1;
|
||||||
foreach ( WC()->query->query_vars as $key => $value ) {
|
foreach ( $endpoints as $key => $value ) :
|
||||||
if ( in_array( $key, $exclude ) ) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<li>
|
<li>
|
||||||
<label class="menu-item-title">
|
<label class="menu-item-title">
|
||||||
<input type="checkbox" class="menu-item-checkbox" name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-object-id]" value="<?php echo esc_attr( $i ); ?>" /> <?php echo esc_html( $key ); ?>
|
<input type="checkbox" class="menu-item-checkbox" name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-object-id]" value="<?php echo esc_attr( $i ); ?>" /> <?php echo esc_html( $value ); ?>
|
||||||
</label>
|
</label>
|
||||||
<input type="hidden" class="menu-item-type" name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-type]" value="custom" />
|
<input type="hidden" class="menu-item-type" name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-type]" value="custom" />
|
||||||
<input type="hidden" class="menu-item-title" name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-title]" value="<?php echo esc_html( $key ); ?>" />
|
<input type="hidden" class="menu-item-title" name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-title]" value="<?php echo esc_html( $value ); ?>" />
|
||||||
<input type="hidden" class="menu-item-url" name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-url]" value="<?php echo esc_url( wc_get_endpoint_url( $key, '', wc_get_page_permalink( 'myaccount' ) ) ); ?>" />
|
<input type="hidden" class="menu-item-url" name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-url]" value="<?php echo esc_url( wc_get_account_endpoint_url( $key ) ); ?>" />
|
||||||
<input type="hidden" class="menu-item-classes" name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-classes]" />
|
<input type="hidden" class="menu-item-classes" name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-classes]" />
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
$i--;
|
$i--;
|
||||||
}
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -91,7 +91,7 @@ class WC_Admin_Meta_Boxes {
|
||||||
* Show any stored error messages.
|
* Show any stored error messages.
|
||||||
*/
|
*/
|
||||||
public function output_errors() {
|
public function output_errors() {
|
||||||
$errors = maybe_unserialize( get_option( 'woocommerce_meta_box_errors' ) );
|
$errors = array_filter( (array) get_option( 'woocommerce_meta_box_errors' ) );
|
||||||
|
|
||||||
if ( ! empty( $errors ) ) {
|
if ( ! empty( $errors ) ) {
|
||||||
|
|
||||||
|
|
|
@ -95,8 +95,8 @@ class WC_Admin_Post_Types {
|
||||||
// Disable post type view mode options
|
// Disable post type view mode options
|
||||||
add_filter( 'view_mode_post_types', array( $this, 'disable_view_mode_options' ) );
|
add_filter( 'view_mode_post_types', array( $this, 'disable_view_mode_options' ) );
|
||||||
|
|
||||||
// Update the screen options user meta.
|
// Update the screen options.
|
||||||
add_action( 'admin_init', array( $this, 'adjust_shop_order_columns' ) );
|
add_filter( 'default_hidden_columns', array( $this, 'adjust_shop_order_columns' ), 10, 2 );
|
||||||
|
|
||||||
// Show blank state
|
// Show blank state
|
||||||
add_action( 'manage_posts_extra_tablenav', array( $this, 'maybe_render_blank_state' ) );
|
add_action( 'manage_posts_extra_tablenav', array( $this, 'maybe_render_blank_state' ) );
|
||||||
|
@ -109,15 +109,16 @@ class WC_Admin_Post_Types {
|
||||||
/**
|
/**
|
||||||
* Adjust shop order columns for the user on certain conditions.
|
* Adjust shop order columns for the user on certain conditions.
|
||||||
*/
|
*/
|
||||||
public function adjust_shop_order_columns() {
|
public function adjust_shop_order_columns( $hidden, $screen ) {
|
||||||
$option_value = get_user_option( 'manageedit-shop_ordercolumnshidden' );
|
if ( isset( $screen->id ) && 'edit-shop_order' === $screen->id ) {
|
||||||
|
if ( 'disabled' === get_option( 'woocommerce_ship_to_countries' ) ) {
|
||||||
// If first time editing, disable columns by default. Likewise, CB should never be hidden.
|
$hidden[] = 'shipping_address';
|
||||||
if ( false === $option_value || ( is_array( $option_value ) && in_array( 'cb', $option_value ) ) ) {
|
} else {
|
||||||
$user = wp_get_current_user();
|
$hidden[] = 'billing_address';
|
||||||
update_user_option( get_current_user_id(), 'manageedit-shop_ordercolumnshidden', array( 0 => 'billing_address' ), true );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $hidden;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change messages when a post type is updated.
|
* Change messages when a post type is updated.
|
||||||
|
@ -323,6 +324,11 @@ class WC_Admin_Post_Types {
|
||||||
$the_product = wc_get_product( $post );
|
$the_product = wc_get_product( $post );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only continue if we have a product.
|
||||||
|
if ( empty( $the_product ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch ( $column ) {
|
switch ( $column ) {
|
||||||
case 'thumb' :
|
case 'thumb' :
|
||||||
echo '<a href="' . get_edit_post_link( $post->ID ) . '">' . $the_product->get_image( 'thumbnail' ) . '</a>';
|
echo '<a href="' . get_edit_post_link( $post->ID ) . '">' . $the_product->get_image( 'thumbnail' ) . '</a>';
|
||||||
|
@ -433,7 +439,7 @@ class WC_Admin_Post_Types {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $the_product->managing_stock() ) {
|
if ( $the_product->managing_stock() ) {
|
||||||
$stock_html .= ' (' . $the_product->get_stock_quantity() . ')';
|
$stock_html .= ' (' . wc_stock_amount( $the_product->get_stock_quantity() ) . ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo apply_filters( 'woocommerce_admin_stock_html', $stock_html, $the_product );
|
echo apply_filters( 'woocommerce_admin_stock_html', $stock_html, $the_product );
|
||||||
|
@ -531,7 +537,7 @@ class WC_Admin_Post_Types {
|
||||||
printf( '<mark class="%s tips" data-tip="%s">%s</mark>', esc_attr( sanitize_html_class( $the_order->get_status() ) ), esc_attr( wc_get_order_status_name( $the_order->get_status() ) ), esc_html( wc_get_order_status_name( $the_order->get_status() ) ) );
|
printf( '<mark class="%s tips" data-tip="%s">%s</mark>', esc_attr( sanitize_html_class( $the_order->get_status() ) ), esc_attr( wc_get_order_status_name( $the_order->get_status() ) ), esc_html( wc_get_order_status_name( $the_order->get_status() ) ) );
|
||||||
break;
|
break;
|
||||||
case 'order_date' :
|
case 'order_date' :
|
||||||
printf( '<time datetime="%s">%s</time>', esc_attr( $the_order->get_date_created()->date( 'c' ) ), esc_html( $the_order->get_date_created()->date_i18n( __( 'Y-m-d', 'woocommerce' ) ) ) );
|
printf( '<time datetime="%s">%s</time>', esc_attr( $the_order->get_date_created()->date( 'c' ) ), esc_html( $the_order->get_date_created()->date_i18n( apply_filters( 'woocommerce_admin_order_date_format', __( 'Y-m-d', 'woocommerce' ) ) ) ) );
|
||||||
break;
|
break;
|
||||||
case 'customer_message' :
|
case 'customer_message' :
|
||||||
if ( $the_order->get_customer_note() ) {
|
if ( $the_order->get_customer_note() ) {
|
||||||
|
|
|
@ -53,11 +53,11 @@ class WC_Admin_Profile {
|
||||||
'description' => '',
|
'description' => '',
|
||||||
),
|
),
|
||||||
'billing_address_1' => array(
|
'billing_address_1' => array(
|
||||||
'label' => __( 'Address 1', 'woocommerce' ),
|
'label' => __( 'Address line 1', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
),
|
),
|
||||||
'billing_address_2' => array(
|
'billing_address_2' => array(
|
||||||
'label' => __( 'Address 2', 'woocommerce' ),
|
'label' => __( 'Address line 2', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
),
|
),
|
||||||
'billing_city' => array(
|
'billing_city' => array(
|
||||||
|
@ -106,11 +106,11 @@ class WC_Admin_Profile {
|
||||||
'description' => '',
|
'description' => '',
|
||||||
),
|
),
|
||||||
'shipping_address_1' => array(
|
'shipping_address_1' => array(
|
||||||
'label' => __( 'Address 1', 'woocommerce' ),
|
'label' => __( 'Address line 1', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
),
|
),
|
||||||
'shipping_address_2' => array(
|
'shipping_address_2' => array(
|
||||||
'label' => __( 'Address 2', 'woocommerce' ),
|
'label' => __( 'Address line 2', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
),
|
),
|
||||||
'shipping_city' => array(
|
'shipping_city' => array(
|
||||||
|
|
|
@ -291,33 +291,19 @@ class WC_Admin_Settings {
|
||||||
case 'text':
|
case 'text':
|
||||||
case 'email':
|
case 'email':
|
||||||
case 'number':
|
case 'number':
|
||||||
case 'color' :
|
|
||||||
case 'password' :
|
case 'password' :
|
||||||
|
|
||||||
$type = $value['type'];
|
|
||||||
$option_value = self::get_option( $value['id'], $value['default'] );
|
$option_value = self::get_option( $value['id'], $value['default'] );
|
||||||
|
|
||||||
if ( 'color' === $value['type'] ) {
|
|
||||||
$type = 'text';
|
|
||||||
$value['class'] .= 'colorpick';
|
|
||||||
$description .= '<div id="colorPickerDiv_' . esc_attr( $value['id'] ) . '" class="colorpickdiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;display:none;"></div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
?><tr valign="top">
|
?><tr valign="top">
|
||||||
<th scope="row" class="titledesc">
|
<th scope="row" class="titledesc">
|
||||||
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
|
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
|
||||||
<?php echo $tooltip_html; ?>
|
<?php echo $tooltip_html; ?>
|
||||||
</th>
|
</th>
|
||||||
<td class="forminp forminp-<?php echo sanitize_title( $value['type'] ) ?>">
|
<td class="forminp forminp-<?php echo sanitize_title( $value['type'] ) ?>">
|
||||||
<?php
|
|
||||||
if ( 'color' == $value['type'] ) {
|
|
||||||
echo '<span class="colorpickpreview" style="background: ' . esc_attr( $option_value ) . ';"></span>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<input
|
<input
|
||||||
name="<?php echo esc_attr( $value['id'] ); ?>"
|
name="<?php echo esc_attr( $value['id'] ); ?>"
|
||||||
id="<?php echo esc_attr( $value['id'] ); ?>"
|
id="<?php echo esc_attr( $value['id'] ); ?>"
|
||||||
type="<?php echo esc_attr( $type ); ?>"
|
type="<?php echo esc_attr( $value['type'] ); ?>"
|
||||||
style="<?php echo esc_attr( $value['css'] ); ?>"
|
style="<?php echo esc_attr( $value['css'] ); ?>"
|
||||||
value="<?php echo esc_attr( $option_value ); ?>"
|
value="<?php echo esc_attr( $option_value ); ?>"
|
||||||
class="<?php echo esc_attr( $value['class'] ); ?>"
|
class="<?php echo esc_attr( $value['class'] ); ?>"
|
||||||
|
@ -328,6 +314,33 @@ class WC_Admin_Settings {
|
||||||
</tr><?php
|
</tr><?php
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Color picker.
|
||||||
|
case 'color' :
|
||||||
|
$option_value = self::get_option( $value['id'], $value['default'] );
|
||||||
|
|
||||||
|
?><tr valign="top">
|
||||||
|
<th scope="row" class="titledesc">
|
||||||
|
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
|
||||||
|
<?php echo $tooltip_html; ?>
|
||||||
|
</th>
|
||||||
|
<td class="forminp forminp-<?php echo sanitize_title( $value['type'] ) ?>">‎
|
||||||
|
<span class="colorpickpreview" style="background: <?php echo esc_attr( $option_value ); ?>"></span>
|
||||||
|
<input
|
||||||
|
name="<?php echo esc_attr( $value['id'] ); ?>"
|
||||||
|
id="<?php echo esc_attr( $value['id'] ); ?>"
|
||||||
|
type="text"
|
||||||
|
dir="ltr"
|
||||||
|
style="<?php echo esc_attr( $value['css'] ); ?>"
|
||||||
|
value="<?php echo esc_attr( $option_value ); ?>"
|
||||||
|
class="<?php echo esc_attr( $value['class'] ); ?>colorpick"
|
||||||
|
placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
|
||||||
|
<?php echo implode( ' ', $custom_attributes ); ?>
|
||||||
|
/>‎ <?php echo $description; ?>
|
||||||
|
<div id="colorPickerDiv_<?php echo esc_attr( $value['id'] ); ?>" class="colorpickdiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;display:none;"></div>
|
||||||
|
</td>
|
||||||
|
</tr><?php
|
||||||
|
break;
|
||||||
|
|
||||||
// Textarea
|
// Textarea
|
||||||
case 'textarea':
|
case 'textarea':
|
||||||
|
|
||||||
|
@ -616,7 +629,7 @@ class WC_Admin_Settings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function to get the formated description and tip HTML for a
|
* Helper function to get the formatted description and tip HTML for a
|
||||||
* given form field. Plugins can call this when implementing their own custom
|
* given form field. Plugins can call this when implementing their own custom
|
||||||
* settings types.
|
* settings types.
|
||||||
*
|
*
|
||||||
|
|
|
@ -54,7 +54,7 @@ class WC_Admin_Setup_Wizard {
|
||||||
if ( empty( $_GET['page'] ) || 'wc-setup' !== $_GET['page'] ) {
|
if ( empty( $_GET['page'] ) || 'wc-setup' !== $_GET['page'] ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->steps = array(
|
$default_steps = array(
|
||||||
'introduction' => array(
|
'introduction' => array(
|
||||||
'name' => __( 'Introduction', 'woocommerce' ),
|
'name' => __( 'Introduction', 'woocommerce' ),
|
||||||
'view' => array( $this, 'wc_setup_introduction' ),
|
'view' => array( $this, 'wc_setup_introduction' ),
|
||||||
|
@ -86,6 +86,8 @@ class WC_Admin_Setup_Wizard {
|
||||||
'handler' => '',
|
'handler' => '',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$this->steps = apply_filters( 'woocommerce_setup_wizard_steps', $default_steps );
|
||||||
$this->step = isset( $_GET['step'] ) ? sanitize_key( $_GET['step'] ) : current( array_keys( $this->steps ) );
|
$this->step = isset( $_GET['step'] ) ? sanitize_key( $_GET['step'] ) : current( array_keys( $this->steps ) );
|
||||||
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||||
|
|
||||||
|
@ -116,7 +118,7 @@ class WC_Admin_Setup_Wizard {
|
||||||
) );
|
) );
|
||||||
|
|
||||||
if ( ! empty( $_POST['save_step'] ) && isset( $this->steps[ $this->step ]['handler'] ) ) {
|
if ( ! empty( $_POST['save_step'] ) && isset( $this->steps[ $this->step ]['handler'] ) ) {
|
||||||
call_user_func( $this->steps[ $this->step ]['handler'] );
|
call_user_func( $this->steps[ $this->step ]['handler'], $this );
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
@ -127,9 +129,30 @@ class WC_Admin_Setup_Wizard {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_next_step_link() {
|
/**
|
||||||
|
* Get the URL for the next step's screen.
|
||||||
|
* @param string step slug (default: current step)
|
||||||
|
* @return string URL for next step if a next step exists.
|
||||||
|
* Admin URL if it's the last step.
|
||||||
|
* Empty string on failure.
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
public function get_next_step_link( $step = '' ) {
|
||||||
|
if ( ! $step ) {
|
||||||
|
$step = $this->step;
|
||||||
|
}
|
||||||
|
|
||||||
$keys = array_keys( $this->steps );
|
$keys = array_keys( $this->steps );
|
||||||
return add_query_arg( 'step', $keys[ array_search( $this->step, array_keys( $this->steps ) ) + 1 ] );
|
if ( end( $keys ) === $step ) {
|
||||||
|
return admin_url();
|
||||||
|
}
|
||||||
|
|
||||||
|
$step_index = array_search( $step, $keys );
|
||||||
|
if ( false === $step_index ) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return add_query_arg( 'step', $keys[ $step_index + 1 ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -191,7 +214,7 @@ class WC_Admin_Setup_Wizard {
|
||||||
*/
|
*/
|
||||||
public function setup_wizard_content() {
|
public function setup_wizard_content() {
|
||||||
echo '<div class="wc-setup-content">';
|
echo '<div class="wc-setup-content">';
|
||||||
call_user_func( $this->steps[ $this->step ]['view'] );
|
call_user_func( $this->steps[ $this->step ]['view'], $this );
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -505,10 +528,28 @@ class WC_Admin_Setup_Wizard {
|
||||||
|
|
||||||
$enable_shipping = isset( $_POST['woocommerce_calc_shipping'] );
|
$enable_shipping = isset( $_POST['woocommerce_calc_shipping'] );
|
||||||
$enable_taxes = isset( $_POST['woocommerce_calc_taxes'] );
|
$enable_taxes = isset( $_POST['woocommerce_calc_taxes'] );
|
||||||
|
$current_shipping = get_option( 'woocommerce_ship_to_countries' );
|
||||||
|
|
||||||
if ( $enable_shipping ) {
|
if ( $enable_shipping ) {
|
||||||
update_option( 'woocommerce_ship_to_countries', '' );
|
update_option( 'woocommerce_ship_to_countries', '' );
|
||||||
WC_Admin_Notices::add_notice( 'no_shipping_methods' );
|
WC_Admin_Notices::add_notice( 'no_shipping_methods' );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If this is the initial shipping setup, create a shipping
|
||||||
|
* zone containing the country the store is located in, with
|
||||||
|
* a "free shipping" method preconfigured.
|
||||||
|
*/
|
||||||
|
if ( false === $current_shipping ) {
|
||||||
|
$default_country = get_option( 'woocommerce_default_country' );
|
||||||
|
$location = wc_format_country_state_string( $default_country );
|
||||||
|
|
||||||
|
$zone = new WC_Shipping_Zone( null );
|
||||||
|
$zone->set_zone_order( 0 );
|
||||||
|
$zone->add_location( $location['country'], 'country' );
|
||||||
|
$zone->set_zone_name( $zone->get_formatted_location() );
|
||||||
|
$zone->add_shipping_method( 'free_shipping' );
|
||||||
|
$zone->save();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
update_option( 'woocommerce_ship_to_countries', 'disabled' );
|
update_option( 'woocommerce_ship_to_countries', 'disabled' );
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@ class WC_Admin_Webhooks_Table_List extends WP_List_Table {
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
parent::__construct( array(
|
parent::__construct( array(
|
||||||
'singular' => __( 'webhook', 'woocommerce' ),
|
'singular' => 'webhook',
|
||||||
'plural' => __( 'webhooks', 'woocommerce' ),
|
'plural' => 'webhooks',
|
||||||
'ajax' => false,
|
'ajax' => false,
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@ class WC_Admin_Webhooks {
|
||||||
* @param WC_Webhook $webhook Webhook instance.
|
* @param WC_Webhook $webhook Webhook instance.
|
||||||
*/
|
*/
|
||||||
private function update_api_version( $webhook ) {
|
private function update_api_version( $webhook ) {
|
||||||
$version = ! empty( $_POST['webhook_api_version'] ) ? wc_clean( $_POST['webhook_api_version'] ) : 'wp_api_v1';
|
$version = ! empty( $_POST['webhook_api_version'] ) ? wc_clean( $_POST['webhook_api_version'] ) : 'wp_api_v2';
|
||||||
|
|
||||||
$webhook->set_api_version( $version );
|
$webhook->set_api_version( $version );
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,7 @@ class WC_Admin_Webhooks {
|
||||||
|
|
||||||
update_post_meta( $webhook_id, '_webhook_pending_delivery', true );
|
update_post_meta( $webhook_id, '_webhook_pending_delivery', true );
|
||||||
$webhook = new WC_Webhook( $webhook_id );
|
$webhook = new WC_Webhook( $webhook_id );
|
||||||
$webhook->set_api_version( 'wp_api_v1' );
|
$webhook->set_api_version( 'wp_api_v2' );
|
||||||
|
|
||||||
delete_transient( 'woocommerce_webhook_ids' );
|
delete_transient( 'woocommerce_webhook_ids' );
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ class WC_Admin {
|
||||||
include_once( dirname( __FILE__ ) . '/class-wc-admin-post-types.php' );
|
include_once( dirname( __FILE__ ) . '/class-wc-admin-post-types.php' );
|
||||||
include_once( dirname( __FILE__ ) . '/class-wc-admin-taxonomies.php' );
|
include_once( dirname( __FILE__ ) . '/class-wc-admin-taxonomies.php' );
|
||||||
include_once( dirname( __FILE__ ) . '/class-wc-admin-menus.php' );
|
include_once( dirname( __FILE__ ) . '/class-wc-admin-menus.php' );
|
||||||
|
include_once( dirname( __FILE__ ) . '/class-wc-admin-customize.php' );
|
||||||
include_once( dirname( __FILE__ ) . '/class-wc-admin-notices.php' );
|
include_once( dirname( __FILE__ ) . '/class-wc-admin-notices.php' );
|
||||||
include_once( dirname( __FILE__ ) . '/class-wc-admin-assets.php' );
|
include_once( dirname( __FILE__ ) . '/class-wc-admin-assets.php' );
|
||||||
include_once( dirname( __FILE__ ) . '/class-wc-admin-api-keys.php' );
|
include_once( dirname( __FILE__ ) . '/class-wc-admin-api-keys.php' );
|
||||||
|
|
|
@ -43,7 +43,7 @@ class WC_Meta_Box_Order_Actions {
|
||||||
<option value=""><?php _e( 'Actions', 'woocommerce' ); ?></option>
|
<option value=""><?php _e( 'Actions', 'woocommerce' ); ?></option>
|
||||||
<?php
|
<?php
|
||||||
$mailer = WC()->mailer();
|
$mailer = WC()->mailer();
|
||||||
$available_emails = apply_filters( 'woocommerce_resend_order_emails_available', array( 'new_order', 'cancelled_order', 'customer_processing_order', 'customer_completed_order', 'customer_invoice', 'customer_refunded_order' ) );
|
$available_emails = apply_filters( 'woocommerce_resend_order_emails_available', array( 'new_order', 'cancelled_order', 'customer_processing_order', 'customer_completed_order', 'customer_invoice' ) );
|
||||||
$mails = $mailer->get_emails();
|
$mails = $mailer->get_emails();
|
||||||
|
|
||||||
if ( ! empty( $mails ) && ! empty( $available_emails ) ) { ?>
|
if ( ! empty( $mails ) && ! empty( $available_emails ) ) { ?>
|
||||||
|
|
|
@ -52,11 +52,11 @@ class WC_Meta_Box_Order_Data {
|
||||||
'show' => false,
|
'show' => false,
|
||||||
),
|
),
|
||||||
'address_1' => array(
|
'address_1' => array(
|
||||||
'label' => __( 'Address 1', 'woocommerce' ),
|
'label' => __( 'Address line 1', 'woocommerce' ),
|
||||||
'show' => false,
|
'show' => false,
|
||||||
),
|
),
|
||||||
'address_2' => array(
|
'address_2' => array(
|
||||||
'label' => __( 'Address 2', 'woocommerce' ),
|
'label' => __( 'Address line 2', 'woocommerce' ),
|
||||||
'show' => false,
|
'show' => false,
|
||||||
),
|
),
|
||||||
'city' => array(
|
'city' => array(
|
||||||
|
@ -101,11 +101,11 @@ class WC_Meta_Box_Order_Data {
|
||||||
'show' => false,
|
'show' => false,
|
||||||
),
|
),
|
||||||
'address_1' => array(
|
'address_1' => array(
|
||||||
'label' => __( 'Address 1', 'woocommerce' ),
|
'label' => __( 'Address line 1', 'woocommerce' ),
|
||||||
'show' => false,
|
'show' => false,
|
||||||
),
|
),
|
||||||
'address_2' => array(
|
'address_2' => array(
|
||||||
'label' => __( 'Address 2', 'woocommerce' ),
|
'label' => __( 'Address line 2', 'woocommerce' ),
|
||||||
'show' => false,
|
'show' => false,
|
||||||
),
|
),
|
||||||
'city' => array(
|
'city' => array(
|
||||||
|
@ -213,7 +213,7 @@ class WC_Meta_Box_Order_Data {
|
||||||
<h3><?php _e( 'General Details', 'woocommerce' ); ?></h3>
|
<h3><?php _e( 'General Details', 'woocommerce' ); ?></h3>
|
||||||
|
|
||||||
<p class="form-field form-field-wide"><label for="order_date"><?php _e( 'Order date:', 'woocommerce' ) ?></label>
|
<p class="form-field form-field-wide"><label for="order_date"><?php _e( 'Order date:', 'woocommerce' ) ?></label>
|
||||||
<input type="text" class="date-picker" name="order_date" id="order_date" maxlength="10" value="<?php echo date_i18n( 'Y-m-d', strtotime( $post->post_date ) ); ?>" pattern="<?php echo esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ); ?>" />@<input type="number" class="hour" placeholder="<?php esc_attr_e( 'h', 'woocommerce' ) ?>" name="order_date_hour" id="order_date_hour" min="0" max="23" step="1" value="<?php echo date_i18n( 'H', strtotime( $post->post_date ) ); ?>" pattern="([01]?[0-9]{1}|2[0-3]{1})" />:<input type="number" class="minute" placeholder="<?php esc_attr_e( 'm', 'woocommerce' ) ?>" name="order_date_minute" id="order_date_minute" min="0" max="59" step="1" value="<?php echo date_i18n( 'i', strtotime( $post->post_date ) ); ?>" pattern="[0-5]{1}[0-9]{1}" />
|
<input type="text" class="date-picker" name="order_date" id="order_date" maxlength="10" value="<?php echo date_i18n( 'Y-m-d', strtotime( $post->post_date ) ); ?>" pattern="<?php echo esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ); ?>" />@‎<input type="number" class="hour" placeholder="<?php esc_attr_e( 'h', 'woocommerce' ) ?>" name="order_date_hour" id="order_date_hour" min="0" max="23" step="1" value="<?php echo date_i18n( 'H', strtotime( $post->post_date ) ); ?>" pattern="([01]?[0-9]{1}|2[0-3]{1})" />:<input type="number" class="minute" placeholder="<?php esc_attr_e( 'm', 'woocommerce' ) ?>" name="order_date_minute" id="order_date_minute" min="0" max="59" step="1" value="<?php echo date_i18n( 'i', strtotime( $post->post_date ) ); ?>" pattern="[0-5]{1}[0-9]{1}" />‎
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="form-field form-field-wide wc-order-status"><label for="order_status"><?php _e( 'Order status:', 'woocommerce' ) ?> <?php
|
<p class="form-field form-field-wide wc-order-status"><label for="order_status"><?php _e( 'Order status:', 'woocommerce' ) ?> <?php
|
||||||
|
|
|
@ -75,43 +75,76 @@ class WC_Meta_Box_Product_Data {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private static function get_product_data_tabs() {
|
private static function get_product_data_tabs() {
|
||||||
return apply_filters( 'woocommerce_product_data_tabs', array(
|
$tabs = apply_filters( 'woocommerce_product_data_tabs', array(
|
||||||
'general' => array(
|
'general' => array(
|
||||||
'label' => __( 'General', 'woocommerce' ),
|
'label' => __( 'General', 'woocommerce' ),
|
||||||
'target' => 'general_product_data',
|
'target' => 'general_product_data',
|
||||||
'class' => array( 'hide_if_grouped' ),
|
'class' => array( 'hide_if_grouped' ),
|
||||||
|
'priority' => 10,
|
||||||
),
|
),
|
||||||
'inventory' => array(
|
'inventory' => array(
|
||||||
'label' => __( 'Inventory', 'woocommerce' ),
|
'label' => __( 'Inventory', 'woocommerce' ),
|
||||||
'target' => 'inventory_product_data',
|
'target' => 'inventory_product_data',
|
||||||
'class' => array( 'show_if_simple', 'show_if_variable', 'show_if_grouped', 'show_if_external' ),
|
'class' => array( 'show_if_simple', 'show_if_variable', 'show_if_grouped', 'show_if_external' ),
|
||||||
|
'priority' => 20,
|
||||||
),
|
),
|
||||||
'shipping' => array(
|
'shipping' => array(
|
||||||
'label' => __( 'Shipping', 'woocommerce' ),
|
'label' => __( 'Shipping', 'woocommerce' ),
|
||||||
'target' => 'shipping_product_data',
|
'target' => 'shipping_product_data',
|
||||||
'class' => array( 'hide_if_virtual', 'hide_if_grouped', 'hide_if_external' ),
|
'class' => array( 'hide_if_virtual', 'hide_if_grouped', 'hide_if_external' ),
|
||||||
|
'priority' => 30,
|
||||||
),
|
),
|
||||||
'linked_product' => array(
|
'linked_product' => array(
|
||||||
'label' => __( 'Linked Products', 'woocommerce' ),
|
'label' => __( 'Linked Products', 'woocommerce' ),
|
||||||
'target' => 'linked_product_data',
|
'target' => 'linked_product_data',
|
||||||
'class' => array(),
|
'class' => array(),
|
||||||
|
'priority' => 40,
|
||||||
),
|
),
|
||||||
'attribute' => array(
|
'attribute' => array(
|
||||||
'label' => __( 'Attributes', 'woocommerce' ),
|
'label' => __( 'Attributes', 'woocommerce' ),
|
||||||
'target' => 'product_attributes',
|
'target' => 'product_attributes',
|
||||||
'class' => array(),
|
'class' => array(),
|
||||||
|
'priority' => 50,
|
||||||
),
|
),
|
||||||
'variations' => array(
|
'variations' => array(
|
||||||
'label' => __( 'Variations', 'woocommerce' ),
|
'label' => __( 'Variations', 'woocommerce' ),
|
||||||
'target' => 'variable_product_options',
|
'target' => 'variable_product_options',
|
||||||
'class' => array( 'variations_tab', 'show_if_variable' ),
|
'class' => array( 'variations_tab', 'show_if_variable' ),
|
||||||
|
'priority' => 60,
|
||||||
),
|
),
|
||||||
'advanced' => array(
|
'advanced' => array(
|
||||||
'label' => __( 'Advanced', 'woocommerce' ),
|
'label' => __( 'Advanced', 'woocommerce' ),
|
||||||
'target' => 'advanced_product_data',
|
'target' => 'advanced_product_data',
|
||||||
'class' => array(),
|
'class' => array(),
|
||||||
|
'priority' => 70,
|
||||||
),
|
),
|
||||||
) );
|
) );
|
||||||
|
|
||||||
|
// Sort tabs based on priority.
|
||||||
|
uasort( $tabs, array( __CLASS__, 'product_data_tabs_sort' ) );
|
||||||
|
|
||||||
|
return $tabs;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback to sort product data tabs on priority.
|
||||||
|
*
|
||||||
|
* @since 3.1.0
|
||||||
|
* @param int $a First item.
|
||||||
|
* @param int $b Second item.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
private static function product_data_tabs_sort( $a, $b ) {
|
||||||
|
if ( ! isset( $a['priority'], $b['priority'] ) ) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $a['priority'] == $b['priority'] ) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $a['priority'] < $b['priority'] ? -1 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -257,8 +290,8 @@ class WC_Meta_Box_Product_Data {
|
||||||
*/
|
*/
|
||||||
public static function save( $post_id, $post ) {
|
public static function save( $post_id, $post ) {
|
||||||
// Process product type first so we have the correct class to run setters.
|
// Process product type first so we have the correct class to run setters.
|
||||||
$product_type = empty( $_POST['product-type'] ) ? 'simple' : sanitize_title( stripslashes( $_POST['product-type'] ) );
|
$product_type = empty( $_POST['product-type'] ) ? WC_Product_Factory::get_product_type( $post_id ) : sanitize_title( stripslashes( $_POST['product-type'] ) );
|
||||||
$classname = WC_Product_Factory::get_product_classname( $post_id, $product_type );
|
$classname = WC_Product_Factory::get_product_classname( $post_id, $product_type ? $product_type : 'simple' );
|
||||||
$product = new $classname( $post_id );
|
$product = new $classname( $post_id );
|
||||||
$attributes = self::prepare_attributes();
|
$attributes = self::prepare_attributes();
|
||||||
$errors = $product->set_props( array(
|
$errors = $product->set_props( array(
|
||||||
|
@ -351,7 +384,7 @@ class WC_Meta_Box_Product_Data {
|
||||||
'downloadable' => isset( $_POST['variable_is_downloadable'][ $i ] ),
|
'downloadable' => isset( $_POST['variable_is_downloadable'][ $i ] ),
|
||||||
'date_on_sale_from' => wc_clean( $_POST['variable_sale_price_dates_from'][ $i ] ),
|
'date_on_sale_from' => wc_clean( $_POST['variable_sale_price_dates_from'][ $i ] ),
|
||||||
'date_on_sale_to' => wc_clean( $_POST['variable_sale_price_dates_to'][ $i ] ),
|
'date_on_sale_to' => wc_clean( $_POST['variable_sale_price_dates_to'][ $i ] ),
|
||||||
'description' => wp_kses_post( wc_sanitize_textarea( $_POST['variable_description'][ $i ] ) ),
|
'description' => wp_kses_post( $_POST['variable_description'][ $i ] ),
|
||||||
'download_limit' => wc_clean( $_POST['variable_download_limit'][ $i ] ),
|
'download_limit' => wc_clean( $_POST['variable_download_limit'][ $i ] ),
|
||||||
'download_expiry' => wc_clean( $_POST['variable_download_expiry'][ $i ] ),
|
'download_expiry' => wc_clean( $_POST['variable_download_expiry'][ $i ] ),
|
||||||
'downloads' => self::prepare_downloads(
|
'downloads' => self::prepare_downloads(
|
||||||
|
|
|
@ -38,8 +38,8 @@ $hidden_order_itemmeta = apply_filters( 'woocommerce_hidden_order_itemmeta', arr
|
||||||
?>
|
?>
|
||||||
<tr data-meta_id="<?php echo esc_attr( $meta_id ); ?>">
|
<tr data-meta_id="<?php echo esc_attr( $meta_id ); ?>">
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="meta_key[<?php echo esc_attr( $item_id ); ?>][<?php echo esc_attr( $meta_id ); ?>]" value="<?php echo esc_attr( $meta->key ); ?>" />
|
<input type="text" placeholder="<?php esc_attr_e( 'Name (required)', 'woocommerce' ); ?>" name="meta_key[<?php echo esc_attr( $item_id ); ?>][<?php echo esc_attr( $meta_id ); ?>]" value="<?php echo esc_attr( $meta->key ); ?>" />
|
||||||
<textarea name="meta_value[<?php echo esc_attr( $item_id ); ?>][<?php echo esc_attr( $meta_id ); ?>]"><?php echo esc_textarea( rawurldecode( $meta->value ) ); ?></textarea>
|
<textarea placeholder="<?php esc_attr_e( 'Value (required)', 'woocommerce' ); ?>" name="meta_value[<?php echo esc_attr( $item_id ); ?>][<?php echo esc_attr( $meta_id ); ?>]"><?php echo esc_textarea( rawurldecode( $meta->value ) ); ?></textarea>
|
||||||
</td>
|
</td>
|
||||||
<td width="1%"><button class="remove_order_item_meta button">×</button></td>
|
<td width="1%"><button class="remove_order_item_meta button">×</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -121,8 +121,12 @@ $thumbnail = $product ? apply_filters( 'woocommerce_admin_order_item_thumbnai
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $item->get_subtotal() !== $item->get_total() ) {
|
if ( $item->get_subtotal() !== $item->get_total() ) {
|
||||||
|
if ( '' === $tax_item_total ) {
|
||||||
|
echo '<span class="wc-order-item-discount">–</span>';
|
||||||
|
} else {
|
||||||
echo '<span class="wc-order-item-discount">-' . wc_price( wc_round_tax_total( $tax_item_subtotal - $tax_item_total ), array( 'currency' => $order->get_currency() ) ) . '</span>';
|
echo '<span class="wc-order-item-discount">-' . wc_price( wc_round_tax_total( $tax_item_subtotal - $tax_item_total ), array( 'currency' => $order->get_currency() ) ) . '</span>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( $refunded = $order->get_tax_refunded_for_item( $item_id, $tax_item_id ) ) {
|
if ( $refunded = $order->get_tax_refunded_for_item( $item_id, $tax_item_id ) ) {
|
||||||
echo '<small class="refunded">' . wc_price( $refunded, array( 'currency' => $order->get_currency() ) ) . '</small>';
|
echo '<small class="refunded">' . wc_price( $refunded, array( 'currency' => $order->get_currency() ) ) . '</small>';
|
||||||
|
|
|
@ -161,19 +161,9 @@ if ( wc_tax_enabled() ) {
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label"><?php _e( 'Order total', 'woocommerce' ); ?>:</td>
|
<td class="label"><?php _e( 'Order total', 'woocommerce' ); ?>:</td>
|
||||||
<td>
|
<td width="1%"></td>
|
||||||
<?php if ( $order->is_editable() ) : ?>
|
|
||||||
<div class="wc-order-edit-line-item-actions">
|
|
||||||
<a class="edit-order-item" href="#"></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
</td>
|
|
||||||
<td class="total">
|
<td class="total">
|
||||||
<div class="view"><?php echo $order->get_formatted_order_total(); ?></div>
|
<?php echo $order->get_formatted_order_total(); ?>
|
||||||
<div class="edit" style="display: none;">
|
|
||||||
<input type="text" class="wc_input_price" id="_order_total" name="_order_total" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo esc_attr( wc_format_localized_price( $order->get_total( 'edit' ) ) ); ?>" />
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@ -210,8 +200,7 @@ if ( wc_tax_enabled() ) {
|
||||||
do_action( 'woocommerce_order_item_add_action_buttons', $order );
|
do_action( 'woocommerce_order_item_add_action_buttons', $order );
|
||||||
?>
|
?>
|
||||||
<?php if ( $order->is_editable() ) : ?>
|
<?php if ( $order->is_editable() ) : ?>
|
||||||
<button type="button" class="button button-primary calculate-tax-action"><?php _e( 'Calculate taxes', 'woocommerce' ); ?></button>
|
<button type="button" class="button button-primary calculate-action"><?php _e( 'Recalculate', 'woocommerce' ); ?></button>
|
||||||
<button type="button" class="button button-primary calculate-action"><?php _e( 'Calculate total', 'woocommerce' ); ?></button>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -219,12 +208,12 @@ if ( wc_tax_enabled() ) {
|
||||||
<button type="button" class="button add-order-item"><?php _e( 'Add product(s)', 'woocommerce' ); ?></button>
|
<button type="button" class="button add-order-item"><?php _e( 'Add product(s)', 'woocommerce' ); ?></button>
|
||||||
<button type="button" class="button add-order-fee"><?php _e( 'Add fee', 'woocommerce' ); ?></button>
|
<button type="button" class="button add-order-fee"><?php _e( 'Add fee', 'woocommerce' ); ?></button>
|
||||||
<button type="button" class="button add-order-shipping"><?php _e( 'Add shipping cost', 'woocommerce' ); ?></button>
|
<button type="button" class="button add-order-shipping"><?php _e( 'Add shipping cost', 'woocommerce' ); ?></button>
|
||||||
<button type="button" class="button cancel-action"><?php _e( 'Cancel', 'woocommerce' ); ?></button>
|
|
||||||
<button type="button" class="button button-primary save-action"><?php _e( 'Save', 'woocommerce' ); ?></button>
|
|
||||||
<?php
|
<?php
|
||||||
// allow adding custom buttons
|
// allow adding custom buttons
|
||||||
do_action( 'woocommerce_order_item_add_line_buttons', $order );
|
do_action( 'woocommerce_order_item_add_line_buttons', $order );
|
||||||
?>
|
?>
|
||||||
|
<button type="button" class="button cancel-action"><?php _e( 'Cancel', 'woocommerce' ); ?></button>
|
||||||
|
<button type="button" class="button button-primary save-action"><?php _e( 'Save', 'woocommerce' ); ?></button>
|
||||||
</div>
|
</div>
|
||||||
<?php if ( 0 < $order->get_total() - $order->get_total_refunded() || 0 < absint( $order->get_item_count() - $order->get_item_count_refunded() ) ) : ?>
|
<?php if ( 0 < $order->get_total() - $order->get_total_refunded() || 0 < absint( $order->get_item_count() - $order->get_item_count_refunded() ) ) : ?>
|
||||||
<div class="wc-order-data-row wc-order-refund-items wc-order-data-row-toggle" style="display: none;">
|
<div class="wc-order-data-row wc-order-refund-items wc-order-data-row-toggle" style="display: none;">
|
||||||
|
|
|
@ -14,7 +14,7 @@ $who_refunded = new WP_User( $refund->get_refunded_by() );
|
||||||
<td class="name">
|
<td class="name">
|
||||||
<?php
|
<?php
|
||||||
/* translators: 1: refund id 2: date */
|
/* translators: 1: refund id 2: date */
|
||||||
printf( __( 'Refund #%1$s - %2$s', 'woocommerce' ), $refund->get_id(), wc_format_datetime( $order->get_date_created(), get_option( 'date_format' ) . ', ' . get_option( 'time_format' ) ) );
|
printf( __( 'Refund #%1$s - %2$s', 'woocommerce' ), $refund->get_id(), wc_format_datetime( $refund->get_date_created(), get_option( 'date_format' ) . ', ' . get_option( 'time_format' ) ) );
|
||||||
|
|
||||||
if ( $who_refunded->exists() ) {
|
if ( $who_refunded->exists() ) {
|
||||||
echo ' ' . esc_attr_x( 'by', 'Ex: Refund - $date >by< $username', 'woocommerce' ) . ' ' . '<abbr class="refund_by" title="' . sprintf( esc_attr__( 'ID: %d', 'woocommerce' ), absint( $who_refunded->ID ) ) . '">' . esc_attr( $who_refunded->display_name ) . '</abbr>' ;
|
echo ' ' . esc_attr_x( 'by', 'Ex: Refund - $date >by< $username', 'woocommerce' ) . ' ' . '<abbr class="refund_by" title="' . sprintf( esc_attr__( 'ID: %d', 'woocommerce' ), absint( $who_refunded->ID ) ) . '">' . esc_attr( $who_refunded->display_name ) . '</abbr>' ;
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<label for="_sale_price_dates_from">' . __( 'Sale price dates', 'woocommerce' ) . '</label>
|
<label for="_sale_price_dates_from">' . __( 'Sale price dates', 'woocommerce' ) . '</label>
|
||||||
<input type="text" class="short" name="_sale_price_dates_from" id="_sale_price_dates_from" value="' . esc_attr( $sale_price_dates_from ) . '" placeholder="' . _x( 'From…', 'placeholder', 'woocommerce' ) . ' YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ) . '" />
|
<input type="text" class="short" name="_sale_price_dates_from" id="_sale_price_dates_from" value="' . esc_attr( $sale_price_dates_from ) . '" placeholder="' . _x( 'From…', 'placeholder', 'woocommerce' ) . ' YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ) . '" />
|
||||||
<input type="text" class="short" name="_sale_price_dates_to" id="_sale_price_dates_to" value="' . esc_attr( $sale_price_dates_to ) . '" placeholder="' . _x( 'To…', 'placeholder', 'woocommerce' ) . ' YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ) . '" />
|
<input type="text" class="short" name="_sale_price_dates_to" id="_sale_price_dates_to" value="' . esc_attr( $sale_price_dates_to ) . '" placeholder="' . _x( 'To…', 'placeholder', 'woocommerce' ) . ' YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ) . '" />
|
||||||
<a href="#" class="cancel_sale_schedule">' . __( 'Cancel', 'woocommerce' ) . '</a>' . wc_help_tip( __( 'The sale will end at the beginning of the set date.', 'woocommerce' ) ) . '
|
<a href="#" class="description cancel_sale_schedule">' . __( 'Cancel', 'woocommerce' ) . '</a>' . wc_help_tip( __( 'The sale will end at the beginning of the set date.', 'woocommerce' ) ) . '
|
||||||
</p>';
|
</p>';
|
||||||
|
|
||||||
do_action( 'woocommerce_product_options_pricing' );
|
do_action( 'woocommerce_product_options_pricing' );
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<?php foreach ( self::get_product_type_options() as $key => $option ) :
|
<?php foreach ( self::get_product_type_options() as $key => $option ) :
|
||||||
if ( $product_object ) {
|
if ( metadata_exists( 'post', $post->ID, '_' . $key ) ) {
|
||||||
$selected_value = is_callable( array( $product_object, "is_$key" ) ) ? $product_object->{"is_$key"}() : 'yes' === get_post_meta( $post->ID, '_' . $key, true );
|
$selected_value = is_callable( array( $product_object, "is_$key" ) ) ? $product_object->{"is_$key"}() : 'yes' === get_post_meta( $post->ID, '_' . $key, true );
|
||||||
} else {
|
} else {
|
||||||
$selected_value = 'yes' === ( isset( $option['default'] ) ? $option['default'] : 'no' );
|
$selected_value = 'yes' === ( isset( $option['default'] ) ? $option['default'] : 'no' );
|
||||||
|
|
|
@ -513,11 +513,13 @@ class WC_Admin_Report {
|
||||||
switch ( $current_range ) {
|
switch ( $current_range ) {
|
||||||
|
|
||||||
case 'custom' :
|
case 'custom' :
|
||||||
$this->start_date = strtotime( sanitize_text_field( $_GET['start_date'] ) );
|
|
||||||
$this->end_date = strtotime( 'midnight', strtotime( sanitize_text_field( $_GET['end_date'] ) ) );
|
|
||||||
|
|
||||||
if ( ! $this->end_date ) {
|
$this->start_date = max( strtotime( '-20 years' ), strtotime( sanitize_text_field( $_GET['start_date'] ) ) );
|
||||||
$this->end_date = current_time( 'timestamp' );
|
|
||||||
|
if ( empty( $_GET['end_date'] ) ) {
|
||||||
|
$this->end_date = strtotime( 'midnight', current_time( 'timestamp' ) );
|
||||||
|
} else {
|
||||||
|
$this->end_date = strtotime( 'midnight', strtotime( sanitize_text_field( $_GET['end_date'] ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
$interval = 0;
|
$interval = 0;
|
||||||
|
@ -643,4 +645,21 @@ class WC_Admin_Report {
|
||||||
* Output the report.
|
* Output the report.
|
||||||
*/
|
*/
|
||||||
public function output_report() {}
|
public function output_report() {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check nonce for current range.
|
||||||
|
*
|
||||||
|
* @since 3.0.4
|
||||||
|
* @param string $current_range Current range.
|
||||||
|
*/
|
||||||
|
public function check_current_range_nonce( $current_range ) {
|
||||||
|
if ( 'custom' !== $current_range ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! isset( $_GET['wc_reports_nonce'] ) || ! wp_verify_nonce( $_GET['wc_reports_nonce'], 'custom_range' ) ) {
|
||||||
|
wp_safe_redirect( remove_query_arg( array( 'start_date', 'end_date', 'range', 'wc_reports_nonce' ) ) );
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,14 +105,14 @@ class WC_Report_Coupon_Usage extends WC_Admin_Report {
|
||||||
$total_coupons = absint( $this->get_order_report_data( $total_coupons_query ) );
|
$total_coupons = absint( $this->get_order_report_data( $total_coupons_query ) );
|
||||||
|
|
||||||
$legend[] = array(
|
$legend[] = array(
|
||||||
/* translators: %s: discount ammount */
|
/* translators: %s: discount amount */
|
||||||
'title' => sprintf( __( '%s discounts in total', 'woocommerce' ), '<strong>' . wc_price( $total_discount ) . '</strong>' ),
|
'title' => sprintf( __( '%s discounts in total', 'woocommerce' ), '<strong>' . wc_price( $total_discount ) . '</strong>' ),
|
||||||
'color' => $this->chart_colours['discount_amount'],
|
'color' => $this->chart_colours['discount_amount'],
|
||||||
'highlight_series' => 1,
|
'highlight_series' => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
$legend[] = array(
|
$legend[] = array(
|
||||||
/* translators: %s: coupons ammount */
|
/* translators: %s: coupons amount */
|
||||||
'title' => sprintf( __( '%s coupons used in total', 'woocommerce' ), '<strong>' . $total_coupons . '</strong>' ),
|
'title' => sprintf( __( '%s coupons used in total', 'woocommerce' ), '<strong>' . $total_coupons . '</strong>' ),
|
||||||
'color' => $this->chart_colours['coupon_count'],
|
'color' => $this->chart_colours['coupon_count'],
|
||||||
'highlight_series' => 0,
|
'highlight_series' => 0,
|
||||||
|
@ -144,6 +144,7 @@ class WC_Report_Coupon_Usage extends WC_Admin_Report {
|
||||||
$current_range = '7day';
|
$current_range = '7day';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->check_current_range_nonce( $current_range );
|
||||||
$this->calculate_current_range( $current_range );
|
$this->calculate_current_range( $current_range );
|
||||||
|
|
||||||
include( WC()->plugin_path() . '/includes/admin/views/html-report-by-date.php' );
|
include( WC()->plugin_path() . '/includes/admin/views/html-report-by-date.php' );
|
||||||
|
|
|
@ -24,8 +24,8 @@ class WC_Report_Customer_List extends WP_List_Table {
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
|
|
||||||
parent::__construct( array(
|
parent::__construct( array(
|
||||||
'singular' => __( 'Customer', 'woocommerce' ),
|
'singular' => 'customer',
|
||||||
'plural' => __( 'Customers', 'woocommerce' ),
|
'plural' => 'customers',
|
||||||
'ajax' => false,
|
'ajax' => false,
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ class WC_Report_Customers extends WC_Admin_Report {
|
||||||
$legend = array();
|
$legend = array();
|
||||||
|
|
||||||
$legend[] = array(
|
$legend[] = array(
|
||||||
/* translators: %s: signups ammount */
|
/* translators: %s: signups amount */
|
||||||
'title' => sprintf( __( '%s signups in this period', 'woocommerce' ), '<strong>' . sizeof( $this->customers ) . '</strong>' ),
|
'title' => sprintf( __( '%s signups in this period', 'woocommerce' ), '<strong>' . sizeof( $this->customers ) . '</strong>' ),
|
||||||
'color' => $this->chart_colours['signups'],
|
'color' => $this->chart_colours['signups'],
|
||||||
'highlight_series' => 2,
|
'highlight_series' => 2,
|
||||||
|
@ -178,6 +178,7 @@ class WC_Report_Customers extends WC_Admin_Report {
|
||||||
$current_range = '7day';
|
$current_range = '7day';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->check_current_range_nonce( $current_range );
|
||||||
$this->calculate_current_range( $current_range );
|
$this->calculate_current_range( $current_range );
|
||||||
|
|
||||||
$admin_users = new WP_User_Query(
|
$admin_users = new WP_User_Query(
|
||||||
|
|
|
@ -125,6 +125,7 @@ class WC_Report_Sales_By_Category extends WC_Admin_Report {
|
||||||
$current_range = '7day';
|
$current_range = '7day';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->check_current_range_nonce( $current_range );
|
||||||
$this->calculate_current_range( $current_range );
|
$this->calculate_current_range( $current_range );
|
||||||
|
|
||||||
// Get item sales data
|
// Get item sales data
|
||||||
|
|