{"id":418755,"date":"2026-12-04T00:24:22","date_gmt":"2026-12-04T00:24:22","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/codwarden-stop-fake-cash-on-delivery-orders-for-woocommerce\/"},"modified":"2026-12-04T00:55:52","modified_gmt":"2026-12-04T00:55:52","slug":"codwarden","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/codwarden\/","author":20970965,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.1","stable_tag":"1.0.1","tested":"7.1.5","requires":"6.2","requires_php":"7.4","requires_plugins":null,"header_name":"CODWarden: Stop Fake Cash on Delivery Orders for WooCommerce","header_author":"Iqbal Hossen","header_description":"Stops fake and repeat-refused cash on delivery orders: phone checks, order limits, duplicate guard and a refuser list.","last_updated":"2026-12-04 00:55:52","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wardenplugins.com\/plugins\/codwarden\/","header_author_uri":"https:\/\/profiles.wordpress.org\/iqbal511138\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":144,"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":"iqbal511138","date":"2026-12-04 00:24:02","revision":3843591},"1.0.1":{"tag":"1.0.1","author":"iqbal511138","date":"2026-12-04 00:55:52","revision":3843610}},"upgrade_notice":{"1.0.1":"<p>New Pro page. No changes to how orders are checked.<\/p>","1.0.0":"<p>First release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3843591,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3843591,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3843591,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3843591,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3843610,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"landingPage\":\"\\\/wp-admin\\\/admin.php?page=codwarden\",\"preferredVersions\":{\"php\":\"8.2\",\"wp\":\"latest\"},\"login\":true,\"steps\":[{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"woocommerce\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"codwarden\"},\"options\":{\"activate\":true}},{\"step\":\"setSiteOptions\",\"options\":{\"woocommerce_onboarding_profile\":{\"skipped\":true},\"blogname\":\"Dhaka Fashion House\"}},{\"step\":\"runPHP\",\"code\":\"<?php\\nrequire '\\\/wordpress\\\/wp-load.php';\\nglobal $wpdb;\\nupdate_option('woocommerce_cod_settings', array('enabled'=>'yes','title'=>'Cash on delivery','description'=>'Pay with cash when your parcel arrives.','instructions'=>'','enable_for_methods'=>array(),'enable_for_virtual'=>'yes'));\\nupdate_option('woocommerce_default_country','BD:BD-13');\\nupdate_option('woocommerce_currency','BDT');\\nif (class_exists('CODWarden_Store')) { CODWarden_Store::install(); }\\n$ev = $wpdb->prefix.'codwarden_events'; $ph = $wpdb->prefix.'codwarden_phones';\\n$now = time();\\n$masks = array('+8801712xxx678','+8801819xxx204','+8801915xxx551','+8801632xxx019','+8801556xxx873','+8801777xxx342','+8801309xxx966','+8801850xxx127');\\n$reasons = array('bad_phone','limit_phone','duplicate','blocked_phone','limit_ip','new_over_total','bad_phone','duplicate','over_total','limit_phone');\\n$rows = array();\\n$offs = array(4,17,26,41,58,75,96,130,170,210,260,330,420,520,640,800,1000,1300,1700,2200,2900,3700,4600,5600,7000,8600);\\nforeach ($offs as $i=>$m) {\\n  $r = $reasons[$i % count($reasons)];\\n  $mask = ($r==='bad_phone') ? '' : $masks[$i % count($masks)];\\n  $rows[] = array($now - $m*60, 'stopped', $r, ($i%3===0)?'store_api':'classic', $mask);\\n}\\nfor ($d=0;$d<7;$d++){ $n = ($d===0)? 9 : 30+($d*7)%17; for($k=0;$k<$n;$k++){ $rows[]=array($now - $d*86400 - $k*1500 - 300, 'placed','', ($k%2)?'store_api':'classic', $masks[$k%8]); } }\\nfor ($d=1;$d<7;$d++){ for($k=0;$k<6+$d;$k++){ $rows[]=array($now - $d*86400 - 7200 - $k*2600,'stopped',$reasons[($k+$d)%10],'classic',$masks[$k%8]); } }\\nusort($rows, function($a,$b){return $a[0]-$b[0];});\\nforeach ($rows as $r) {\\n  $wpdb->insert($ev, array('created_at'=>gmdate('Y-m-d H:i:s',$r[0]),'event'=>$r[1],'reason'=>$r[2],'channel'=>$r[3],'phone_hash'=>hash('sha256',$r[4].'x'),'phone_masked'=>$r[4],'ip_hash'=>'','cart_hash'=>''));\\n}\\n$list = array(array('+8801712xxx678',3,1,0),array('+8801819xxx204',4,1,0),array('+8801632xxx019',0,1,1),array('+8801915xxx551',2,0,0),array('+8801556xxx873',1,0,0),array('+8801777xxx342',3,1,0),array('+8801850xxx127',1,0,0));\\nforeach ($list as $j=>$p) {\\n  $wpdb->replace($ph, array('phone_hash'=>hash('sha256',$p[0]),'phone_masked'=>$p[0],'strikes'=>$p[1],'blocked'=>$p[2],'manual'=>$p[3],'updated_at'=>gmdate('Y-m-d H:i:s',$now-($j+1)*86400*1.7)));\\n}\\n\"}]}"}},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3843610,"resolution":"1","location":"assets","locale":"","width":1180,"height":737},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3843610,"resolution":"2","location":"assets","locale":"","width":1180,"height":737},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3843610,"resolution":"3","location":"assets","locale":"","width":1180,"height":737}},"screenshots":{"1":"Overview.","2":"Settings.","3":"Phone list."}},"plugin_section":[],"plugin_tags":[31179,31178,236038,12891,286],"plugin_category":[45],"plugin_contributors":[224304],"plugin_business_model":[],"class_list":["post-418755","plugin","type-plugin","status-publish","hentry","plugin_tags-cash-on-delivery","plugin_tags-cod","plugin_tags-fake-orders","plugin_tags-fraud","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-iqbal511138","plugin_committers-iqbal511138"],"banners":{"banner":"https:\/\/ps.w.org\/codwarden\/assets\/banner-772x250.png?rev=3843591","banner_2x":"https:\/\/ps.w.org\/codwarden\/assets\/banner-1544x500.png?rev=3843591","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/codwarden\/assets\/icon-128x128.png?rev=3843591","icon_2x":"https:\/\/ps.w.org\/codwarden\/assets\/icon-256x256.png?rev=3843591","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/codwarden\/assets\/screenshot-1.png?rev=3843610","caption":"Overview."},{"src":"https:\/\/ps.w.org\/codwarden\/assets\/screenshot-2.png?rev=3843610","caption":"Settings."},{"src":"https:\/\/ps.w.org\/codwarden\/assets\/screenshot-3.png?rev=3843610","caption":"Phone list."}],"raw_content":"<!--section=description-->\n<p>Cash on delivery is how most people pay in Bangladesh, India, Pakistan, the Gulf and much of Africa. It is also where stores lose the most money: prank orders with fake numbers, the same customer ordering five times, and parcels that come back because the buyer never meant to pay. Every one of those costs you courier fees and blocks stock.<\/p>\n\n<p>CODWarden checks every cash on delivery order before WooCommerce accepts it.<\/p>\n\n<h4>What it does<\/h4>\n\n<ul>\n<li><strong>Real phone numbers only.<\/strong> The billing phone must be a real mobile number for the customer's country, so the courier can call. Built-in rules for Bangladesh, India, Pakistan, UAE, Saudi Arabia, Egypt, Morocco, Nigeria, Kenya, Nepal and Sri Lanka, and a sensible length check everywhere else.<\/li>\n<li><strong>Order limits.<\/strong> At most a few cash on delivery orders from the same phone or the same IP address in a time window you choose.<\/li>\n<li><strong>Duplicate guard.<\/strong> The same cart from the same phone within minutes is stopped with a friendly message.<\/li>\n<li><strong>Refuser list.<\/strong> Adds a \"Refused\" order status. Mark a returned parcel as Refused and the phone gets a strike; after the number of strikes you choose, cash on delivery is turned off for that phone. Add or remove numbers by hand too.<\/li>\n<li><strong>Amount rules.<\/strong> Hide cash on delivery above an order total, or for first-time customers above a smaller total.<\/li>\n<li><strong>Clear dashboard.<\/strong> Cash on delivery orders this week, what was stopped and why, and the phones on your refuser list.<\/li>\n<li>Works with the classic checkout and the block checkout, and with High-Performance Order Storage.<\/li>\n<li>Returning customers with a completed order and shop managers are never checked.<\/li>\n<li>Other payment methods are never touched.<\/li>\n<\/ul>\n\n<h4>Privacy<\/h4>\n\n<p>Phone numbers and IP addresses are stored only as keyed fingerprints plus a shortened label such as +8801712xxx678. CODWarden makes no external requests.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate CODWarden. WooCommerce must be active, with the Cash on delivery payment method enabled.<\/li>\n<li>Open CODWarden in the admin menu. The defaults are safe for most stores.<\/li>\n<li>When a parcel comes back, set that order's status to \"Refused\".<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"will%20real%20customers%20be%20blocked%3F\"><h3>Will real customers be blocked?<\/h3><\/dt>\n<dd><p>Only when a rule says so, and they always see a clear message and can pick another payment method. Logged-in customers who already received a parcel are never checked.<\/p><\/dd>\n<dt id=\"my%20country%20is%20not%20in%20the%20phone%20list.\"><h3>My country is not in the phone list.<\/h3><\/dt>\n<dd><p>CODWarden still requires 7 to 15 digits. You can turn the phone check off in Settings.<\/p><\/dd>\n<dt id=\"does%20it%20work%20behind%20cloudflare%3F\"><h3>Does it work behind Cloudflare?<\/h3><\/dt>\n<dd><p>CODWarden reads the visitor address from the server. Developers can change that with the <code>codwarden_client_ip<\/code> filter.<\/p><\/dd>\n<dt id=\"does%20it%20send%20data%20anywhere%3F\"><h3>Does it send data anywhere?<\/h3><\/dt>\n<dd><p>No.<\/p><\/dd>\n<dt id=\"is%20there%20a%20pro%20version%3F\"><h3>Is there a Pro version?<\/h3><\/dt>\n<dd><p>Yes. CODWarden Pro is a separate add-on: customers confirm their cash on delivery order by email before you ship, orders nobody confirms cancel themselves, plus order screen tools, a 30 day report, CSV export and alerts. Everything in the free plugin stays free with no limits. See the Pro tab in CODWarden or https:\/\/wardenplugins.com\/plugins\/codwarden\/<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>New Pro page with plans and prices.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release.<\/li>\n<\/ul>","raw_excerpt":"Stops fake and repeat-refused cash on delivery orders with phone checks, order limits, a duplicate guard and a refuser list.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/418755","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=418755"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/iqbal511138"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=418755"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=418755"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=418755"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=418755"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=418755"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=418755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}