=== Restricted Shipping and Payment for WooCommerce === Contributors: waseem_senjer, wprubyplugins Donate link: https://wpruby.com Tags: woocommerce, shipping, admin Requires at least: 6.2 Tested up to: 7.1 Requires PHP: 7.4 Stable tag: 5.0.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html A simplistic plugin for excluding shipping methods based on multiple rules such as shipping class, package weight and cart totals. == Installation == 1. Upload `restricted-shipping-and-payment-for-woocommerce.php` to the `/wp-content/plugins/` directory 2. Activate the plugin through the 'Plugins' menu in WordPress 3. A new admin menu item `Shipping Conditions` will be added. == Screenshots == 1. Shipping Conditions == Changelog == = 5.0.0 = * ADDED: New condition editor. Rules are grouped, and groups and rules can be combined with AND or OR, e.g. (Country is US AND Cart total more than 100) OR Role is wholesale. * ADDED: Conditions list shows what each condition hides and its rules, with an Enabled switch, a Priority column and a Duplicate action. * ADDED: Priority (Order) for conditions, and an option to stop checking lower-priority conditions after a match. * ADDED: With WooCommerce shipping debug mode on, store managers see at checkout why each condition matched or not. * ADDED: Support for the Cart and Checkout blocks, including live condition messages. * ADDED: rspw_rule_types filter to register custom rules. * ADDED: "Show only when the cart matches" action: a condition can hide its methods or gateways unless the rules match. * ADDED: New rules: Day of Week, Date (range), Previous Orders, Product, and Logged In or Guest. * ADDED: Postcode rule accepts lists, wildcards (902*) and ranges (90000...90999), like shipping zones. City rule accepts lists. * CHANGED: "Stop checking lower-priority conditions" now applies when a condition hides something, which for existing conditions is when it matches. * CHANGED: Only users who can manage WooCommerce (administrators and shop managers) can edit conditions. Editors no longer can. * CHANGED: Conditions are no longer public posts. * CHANGED: Requires WordPress 6.2, PHP 7.4 and WooCommerce 7.0. * CHANGED: Existing conditions are migrated to the new rules format automatically; the old data is kept. * CHANGED: Billing Country rule: the result was inverted. Check conditions that use "is not" as a workaround. * CHANGED: Shipping Method rule: matches the selected method instance only, not every method of the same type. * FIXED: Payment Gateway and Time of Day rules were ignored when WooCommerce served cached shipping rates. * FIXED: Payment conditions ignored Cart Total, City, Postcode, State and Customer rules. * FIXED: A payment condition without gateways stopped all later payment conditions. * FIXED: Package Weight rule fatal error, Customer rule fatal error for guests, reversed Total Cart Quantity operators. * FIXED: Time of Day rule uses the site timezone and supports ranges past midnight. * REMOVED: CMB2 library. = 4.0.0 = * ADDED: New Rule: Payment Gateway Rule for shipping conditions. * ADDED: New Rule: Shipping method Rule for payment conditions. * ADDED: New Rule: Time of the Day rule. = 3.0.3 = Fixed: Fatal error in the product tag rule. = 3.0.2 = Added: declaring WooCommerce HPOS compatibility. Fixed: The state rule was not working correctly. Fixed: PHP warnings. = 3.0.1 = Fixed: fatal error when adding items to the cart. = 3.0.0 = Added: Cart and Checkout messages when a rules is matched. Fixed: Payment rules were not working in some cases. Fixed: fix product tag for variant products Fixed: fix shipping package for shipping classes rule. = 2.3.0 = * Fixed: invalid payment rules key. * Fixed: Using payment method title instead of title. * Fixed: Shipping classes for product variations. * Fixed: updating the license validation url. = 2.2.2 = * Fixed: PHP warnings at the checkout page. = 2.2.1 = * Fixed: The plugin updater. = 2.2.0 = * Added: Now you can add conditions based on the customer role. = 2.1.2 = * Fixed: shipping rules. = 2.1.1 = * Added: Automatic updates. = 2.1.0 = * Added: Now you can evaluate the rules as OR or AND evaluation. (one rule applies is enough) or (all rules must meet). * Fixed: Not In operator was not evaluated correctly. = 2.0.2 = * FIXED: activating the license was not triggered and the plugin was not accessible. = 2.0.1 = * ADDED: Translation file. * FIXED: error tolerance when a wrong rule is provided. = 2.0.0 = * ADDED: New Rule: Postcode. * ADDED: New Rule: City. * ADDED: New Rule: State. * ADDED: New Rule: Product Category. * ADDED: New Rule: Product Tag. * ADDED: New Rule: Product Attribute. * ADDED: New Rule: Cart has downloadable products. * ADDED: New Rule: Cart has virtual products. * ADDED: New Rule: Total Cart Quantity. * ADDED: Complete code refactoring. * FIXED: Adding new payment rule for condition does not refresh the operators. = 1.2.0 = * Fixed: The exclusion logic of payment gateways. = 1.1.1 = * Fixed: remove unnecessary CSS and JS files loading. = 1.1.0 = * Add the ability to exclude shipping methods by coupon code = 1.0.0 = * Initial release == Upgrade Notice == = 1.0.0 = Initial release