{"id":370330,"date":"2026-09-22T13:35:49","date_gmt":"2026-09-22T13:35:49","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/cod-rules-for-woocommerce\/"},"modified":"2026-09-22T15:45:31","modified_gmt":"2026-09-22T15:45:31","slug":"codvia-cod-rules-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/codvia-cod-rules-for-woocommerce\/","author":23567746,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.1","stable_tag":"trunk","tested":"7.1.2","requires":"6.6","requires_php":"7.4","requires_plugins":null,"header_name":"Codvia \u2013 COD Fee & Cash on Delivery Rules for WooCommerce","header_author":"codrulesdev","header_description":"Cash on Delivery fees and availability rules that stay correct: taxed fees, thresholds that never count the fee itself, block checkout support, a message when COD is hidden, unlimited cities and postcodes, and one-click import from Smart COD.","assets_banners_color":"f0f0e8","last_updated":"2026-09-22 15:45:31","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/codvia-cod-rules-for-woocommerce\/","header_author_uri":"https:\/\/profiles.wordpress.org\/codrulesdev\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":72,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"codrulesdev","date":"2026-09-22 13:35:29","revision":3707446}},"upgrade_notice":{"1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3707434,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3707434,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3707434,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3707434,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3707434,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3707434,"resolution":"1","location":"assets","locale":"","width":1280,"height":960},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3707434,"resolution":"2","location":"assets","locale":"","width":1280,"height":760},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3707434,"resolution":"3","location":"assets","locale":"","width":1300,"height":950},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3707434,"resolution":"4","location":"assets","locale":"","width":1300,"height":1150},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3707434,"resolution":"5","location":"assets","locale":"","width":1280,"height":600},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3707434,"resolution":"6","location":"assets","locale":"","width":1280,"height":720}},"screenshots":{"1":"The rule editor: what happens, and when.","2":"The scenario tester explains every rule and condition.","3":"A taxed COD fee on the block checkout.","4":"The message customers see when a rule hides Cash on delivery.","5":"One-click import from Smart COD.","6":"The decision recorded on each order."}},"plugin_section":[],"plugin_tags":[31179,31178,267110,6593,286],"plugin_category":[45],"plugin_contributors":[282063],"plugin_business_model":[],"class_list":["post-370330","plugin","type-plugin","status-publish","hentry","plugin_tags-cash-on-delivery","plugin_tags-cod","plugin_tags-cod-fee","plugin_tags-payment-gateway","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-codrulesdev","plugin_committers-codrulesdev"],"banners":{"banner":"https:\/\/ps.w.org\/codvia-cod-rules-for-woocommerce\/assets\/banner-772x250.png?rev=3707434","banner_2x":"https:\/\/ps.w.org\/codvia-cod-rules-for-woocommerce\/assets\/banner-1544x500.png?rev=3707434","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/codvia-cod-rules-for-woocommerce\/assets\/icon.svg?rev=3707434","icon":"https:\/\/ps.w.org\/codvia-cod-rules-for-woocommerce\/assets\/icon.svg?rev=3707434","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/codvia-cod-rules-for-woocommerce\/assets\/screenshot-1.png?rev=3707434","caption":"The rule editor: what happens, and when."},{"src":"https:\/\/ps.w.org\/codvia-cod-rules-for-woocommerce\/assets\/screenshot-2.png?rev=3707434","caption":"The scenario tester explains every rule and condition."},{"src":"https:\/\/ps.w.org\/codvia-cod-rules-for-woocommerce\/assets\/screenshot-3.png?rev=3707434","caption":"A taxed COD fee on the block checkout."},{"src":"https:\/\/ps.w.org\/codvia-cod-rules-for-woocommerce\/assets\/screenshot-4.png?rev=3707434","caption":"The message customers see when a rule hides Cash on delivery."},{"src":"https:\/\/ps.w.org\/codvia-cod-rules-for-woocommerce\/assets\/screenshot-5.png?rev=3707434","caption":"One-click import from Smart COD."},{"src":"https:\/\/ps.w.org\/codvia-cod-rules-for-woocommerce\/assets\/screenshot-6.png?rev=3707434","caption":"The decision recorded on each order."}],"raw_content":"<!--section=description-->\n<p><strong>Codvia COD Rules<\/strong> manages WooCommerce's Cash on Delivery gateway with rules you can read: <em>charge a fee<\/em>, <em>hide COD<\/em>, or <em>always allow COD<\/em> when conditions match. What it does:<\/p>\n\n<ul>\n<li><strong>The fee is taxed properly.<\/strong> Choose taxable or not, and which tax class, per rule or as a default. The tax shows separately in the cart, checkout, emails and invoices, exactly like any other WooCommerce fee.<\/li>\n<li><strong>Thresholds never count the fee itself.<\/strong> \"COD only under 400\" means the items total, not items plus the COD fee. Choose whether shipping and tax are part of the amount rules look at.<\/li>\n<li><strong>Works on the block checkout and the classic checkout.<\/strong> The fee appears the moment the customer picks Cash on delivery, and disappears when they change their mind or their address.<\/li>\n<li><strong>Tells the customer why.<\/strong> When a rule hides COD, the customer sees your message where the payment options are, instead of a silently missing option. Each rule can carry its own message.<\/li>\n<li><strong>Unlimited cities and postcodes, free.<\/strong> Paste a list, one per line. Wildcards (<code>Al *<\/code>, <code>1234*<\/code>) and numeric ranges (<code>10000-19999<\/code>) work. Spelling variants are folded before matching, so \"Al-Rayyan\", \"al rayyan\" and \"AL RAYYAN\" are one entry, and so are \"\u0627\u0644\u0631\u064a\u0627\u0646\" and \"\u0627\u0644\u0631\u064a\u0651\u0627\u0646\" whatever the hamza, taa-marbuta or alef-maqsura. List a city in both scripts to catch both \u2014 the ready-made lists for Qatar, Saudi Arabia, UAE, Kuwait, Bahrain, Oman and Egypt already include both, and insert with one click.<\/li>\n<li><strong>The fee shows in emails, invoices and the order.<\/strong> It is a real WooCommerce fee line, tagged with the rule that created it, and every order gets a note explaining the decision.<\/li>\n<li><strong>Explainable.<\/strong> The scenario tester shows, rule by rule and condition by condition, why a given customer gets a fee or loses COD. Test unsaved rules before you publish them.<\/li>\n<li><strong>One-click import from Smart COD.<\/strong> If you used <em>Smart COD for WooCommerce<\/em>, your restrictions, fees and messages are rebuilt as rules in a few seconds. Your existing settings are not touched.<\/li>\n<\/ul>\n\n<h4>Conditions (free)<\/h4>\n\n<p>Order amount, item quantity, city, postcode, state\/region, country, shipping method, customer role.<\/p>\n\n<h4>Pro<\/h4>\n\n<ul>\n<li><strong>Date &amp; time schedules<\/strong> \u2013 restrict COD or change the fee on certain days, hours or date ranges (Ramadan and Eid delivery windows, with the Hijri date shown next to the Gregorian one).<\/li>\n<li><strong>Product, category, shipping class, cart weight and coupon conditions.<\/strong><\/li>\n<li><strong>Customer history<\/strong> \u2013 e.g. hide COD for first-time buyers, or waive the fee for repeat customers.<\/li>\n<li><strong>Manual and phone orders<\/strong> \u2013 the fee line is added, updated or removed when an admin order set to COD is recalculated.<\/li>\n<li>Priority support.<\/li>\n<\/ul>\n\n<h4>How rules run<\/h4>\n\n<p>Rules run top to bottom. The first matching <em>hide<\/em> rule hides COD and stops. The first matching <em>fee<\/em> rule sets the fee. An <em>allow<\/em> rule that matches protects COD from any hide rule below it. Every rule can require all of its conditions, or any of them.<\/p>\n\n<h4>For developers<\/h4>\n\n<p>Filters: <code>crfw_condition_types<\/code>, <code>crfw_match_condition<\/code>, <code>crfw_decision<\/code>, <code>crfw_cart_fee<\/code>, <code>crfw_gateway_id<\/code>, <code>crfw_presets<\/code>, <code>crfw_rules<\/code>, <code>crfw_context_from_cart<\/code>, <code>crfw_context_from_order<\/code>, <code>crfw_pro_active<\/code>. REST namespace <code>crfw\/v1<\/code>. The block checkout receives the decision under <code>extensions[\"cod-rules\"]<\/code> on the Store API cart response.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate the plugin. WooCommerce 8.6 or newer is required.<\/li>\n<li>Make sure the Cash on delivery gateway is enabled under WooCommerce \u2192 Settings \u2192 Payments.<\/li>\n<li>Go to WooCommerce \u2192 COD Rules and add your first rule, or import your Smart COD settings from the Import tab.<\/li>\n<li>Use \"Test a scenario\" to check what a customer in a given city, with a given order amount, will see.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"why%20is%20the%20fee%20not%20taxed%3F\"><h3>Why is the fee not taxed?<\/h3><\/dt>\n<dd><p>Check that taxes are enabled in WooCommerce \u2192 Settings \u2192 General, that a tax rate exists for the customer's location, and that the rule (or the default in Settings) is set to <em>Taxable<\/em>. The scenario tester shows whether a fee is taxable and which class it uses.<\/p><\/dd>\n<dt id=\"the%20customer%27s%20city%20has%20a%20different%20spelling%20in%20arabic.%20will%20it%20match%3F\"><h3>The customer's city has a different spelling in Arabic. Will it match?<\/h3><\/dt>\n<dd><p>Yes. Case, punctuation, diacritics and common letter variants (\u0629\/\u0647, \u0623\/\u0627, \u0649\/\u064a) are folded before matching, and you can add both spellings to a list anyway. Use <code>*<\/code> for a wildcard.<\/p><\/dd>\n<dt id=\"does%20the%20%22order%20amount%22%20include%20the%20cod%20fee%3F\"><h3>Does the \"order amount\" include the COD fee?<\/h3><\/dt>\n<dd><p>Never. It is the items total after discounts, optionally plus shipping and tax, as chosen in Settings.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20the%20block-based%20checkout%3F\"><h3>Does it work with the block-based checkout?<\/h3><\/dt>\n<dd><p>Yes. COD Rules is built for the block checkout first and also supports the classic shortcode checkout and the \"pay for order\" page.<\/p><\/dd>\n<dt id=\"can%20i%20use%20it%20for%20a%20gateway%20other%20than%20the%20built-in%20cash%20on%20delivery%3F\"><h3>Can I use it for a gateway other than the built-in Cash on delivery?<\/h3><\/dt>\n<dd><p>Yes. Set the gateway id in Settings \u2192 Advanced. Any gateway with that id is managed the same way.<\/p><\/dd>\n<dt id=\"will%20it%20conflict%20with%20smart%20cod%20or%20another%20cod%20fee%20plugin%3F\"><h3>Will it conflict with Smart COD or another COD fee plugin?<\/h3><\/dt>\n<dd><p>Run one at a time. After importing from Smart COD, deactivate Smart COD so the fee is not charged twice.<\/p><\/dd>\n<dt id=\"what%20happens%20on%20uninstall%3F\"><h3>What happens on uninstall?<\/h3><\/dt>\n<dd><p>The plugin's settings and rules are removed. Order notes and the fee lines on existing orders are kept, because they are part of your order history.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Renamed for clarity: the plugin is the same, the title now says what it does.<\/li>\n<li>Corrected the description of Arabic city matching. Spelling variants fold within each script; list a city in both scripts to match both. The ready-made GCC lists already contain both.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Add a properly taxed COD fee, or hide cash on delivery by city, postcode or order amount \u2014 and tell the customer why.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/370330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=370330"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/codrulesdev"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=370330"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=370330"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=370330"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=370330"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=370330"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=370330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}