{"id":248868,"date":"2025-11-04T08:52:19","date_gmt":"2025-11-04T08:52:19","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/cod-control\/"},"modified":"2025-11-04T09:30:25","modified_gmt":"2025-11-04T09:30:25","slug":"cod-control","status":"publish","type":"plugin","link":"https:\/\/lug.wordpress.org\/plugins\/cod-control\/","author":15665708,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.4","stable_tag":"1.0.4","tested":"6.8.5","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"COD Control","header_author":"changlee","header_description":"Adds an admin list of customers (including guests) with fields Name, Email, City, and \"Received COD\" (Yes\/No). If set to No for an email, the Cash on Delivery payment method is disabled for that customer on checkout\/order-pay.","assets_banners_color":"","last_updated":"2025-11-04 09:30:25","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":170,"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":"changlee","date":"2025-11-04 09:02:45"},"1.0.4":{"tag":"1.0.4","author":"changlee","date":"2025-11-04 09:30:25"}},"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.4"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[3148,31178,7619,507,286],"plugin_category":[45],"plugin_contributors":[250229],"plugin_business_model":[],"class_list":["post-248868","plugin","type-plugin","status-publish","hentry","plugin_tags-checkout","plugin_tags-cod","plugin_tags-customers","plugin_tags-payment","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-changlee","plugin_committers-changlee"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/cod-control.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<ul>\n<li>Admin menu: <strong>COD Customers<\/strong> with columns Name, Email, City, Received COD (Yes\/No).<\/li>\n<li>If <strong>Received COD = No<\/strong>, the <strong>cod<\/strong> gateway is removed at checkout for that customer.<\/li>\n<li>Applies when users are logged in OR when they simply enter their email address on the checkout form.<\/li>\n<li>Lightweight, no database tables required (uses user meta).<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the ZIP via <strong>Plugins \u2192 Add New \u2192 Upload Plugin<\/strong>.<\/li>\n<li>Activate <strong>COD Control<\/strong>.<\/li>\n<li>Go to <strong>COD Control<\/strong> in the admin menu to manage flags.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='does%20this%20work%20for%20guests%3F'><h3>Does this work for guests?<\/h3><\/dt>\n<dd><p>If the guest uses an email that belongs to an existing WordPress user (customer\/subscriber) that has <strong>Received COD = No<\/strong>, COD will be disabled.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>wordpress.org changes recommended.<\/li>\n<li>Fixed <code>readme.txt<\/code> Contributors line to use WordPress.org username <code>changlee<\/code>.<\/li>\n<li>Moved inline <code>&lt;style&gt;<\/code> and <code>&lt;script&gt;<\/code> from PHP into <code>assets\/css\/codco-style.css<\/code> and <code>assets\/js\/codco-script.js<\/code>.<\/li>\n<li>Added proper asset loading via <code>wp_enqueue_scripts<\/code> with <code>wp_register_style\/script<\/code>, and <code>wp_localize_script<\/code> for <code>ajaxurl<\/code> + <code>nonce<\/code>.<\/li>\n<li>Prefixed actions and methods (<code>codco_*<\/code>) and renamed class to <code>CODCO_Control<\/code> to avoid collisions.<\/li>\n<li>Added nonce checks with <code>check_ajax_referer( 'codco_email_nonce', 'security' )<\/code> in AJAX handler.<\/li>\n<li>Hardened <code>wp_verify_nonce()<\/code> inputs with <code>sanitize_text_field( wp_unslash( ... ) )<\/code>.<\/li>\n<li>Escaped output late using <code>esc_url<\/code>, <code>esc_js<\/code> for dynamic values.<\/li>\n<li>Added placeholder <code>ajax-loader.gif<\/code> if missing.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>wordpress.org changes recommended.<\/li>\n<li>Fixed security issues with nonces and sanitization<\/li>\n<li>Added proper permission checks (<code>current_user_can<\/code>)<\/li>\n<li>Replaced inline CSS\/JS with proper <code>wp_enqueue_*<\/code> methods<\/li>\n<li>Updated version numbers for release<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>wordpress.org changes recommended.<\/li>\n<li>Fixed security issues with nonces and sanitization<\/li>\n<li>Added proper permission checks (<code>current_user_can<\/code>)<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>wordpress.org changes recommended.<\/li>\n<li>plugin prefix gets Updated<\/li>\n<\/ul>","raw_excerpt":"Control WooCommerce Cash on Delivery availability per customer.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lug.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/248868","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lug.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/lug.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/lug.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=248868"}],"author":[{"embeddable":true,"href":"https:\/\/lug.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/changlee"}],"wp:attachment":[{"href":"https:\/\/lug.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=248868"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/lug.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=248868"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/lug.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=248868"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/lug.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=248868"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/lug.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=248868"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/lug.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=248868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}