WP Manifestindependent plugin directory
manifest / ecommerce / oli-conditional-shipping-payments

Oli Conditional Shipping and Payments for WooCommerce

Restrict shipping methods, payment gateways, and shipping destinations based on conditional rules. Supports classic and block checkout, HPOS, and multicurrency.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/olivierbigras/oli-conditional-shipping-payments/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin to restrict shipping methods, payment gateways, and shipping destinations in WooCommerce based on conditional rules.

Features

Three Restriction Types

  • Shipping Methods (exclude methods/instances)
  • Payment Gateways (exclude gateways)
  • Shipping Destinations (block countries/states/postcodes)

22 Condition Types

  • Cart/Order totals, products, categories, tags
  • Shipping classes, package weight, item quantities
  • Location-based (countries, states, postcodes with wildcards)
  • Customer roles, login status, coupons
  • Backorders, currency, selected methods/gateways
  • OR logic between condition groups; AND logic within a group
  • Per-zone shipping method restrictions
  • Admin rules UI under WooCommerce > Settings > Restrictions

Global & Per-Product Restrictions

  • Set site-wide restrictions
  • Override with product-specific rules

Modern WooCommerce Support

  • Classic checkout
  • Block checkout (Store API)
  • HPOS compatible
  • Multicurrency support

Import/Export

  • JSON import/export
  • Import from official WooCommerce extension
  • Dry-run mode with comparison report

Installation

  1. Upload the plugin to /wp-content/plugins/oli-conditional-shipping-payments/
  2. Activate through WordPress admin
  3. Go to WooCommerce > Settings > Restrictions

Requirements

  • WordPress 6.5+
  • WooCommerce 9.0+
  • PHP 7.4+

Documentation

See readme.txt for full documentation, including the External services section.

Development

# Install dependencies
composer install

# Run tests
composer test

# Check coding standards
composer lint

Testing

Unit tests use PHPUnit with WordPress test framework:

# Set up test environment
bash tests/bin/install-wp-tests.sh wordpress_test root root localhost latest

# Run tests
vendor/bin/phpunit

Migration from Official Extension

The plugin can import restrictions from WooCommerce Conditional Shipping and Payments 3.x:

  1. Go to WooCommerce > Settings > Restrictions
  2. Click Import from Official Extension
  3. Run a dry-run first to preview
  4. Import to migrate all rules

Known Gaps vs Official Extension

  • Restriction scheduling (date/time-based)
  • Customer history conditions (previous orders, lifetime value)

See CHANGELOG.md for the roadmap.

License

GPL v2 or later — see LICENSE

Author

Olivier Bigras

Credits

Written independently. Not affiliated with WooCommerce.