Auto-Complete Virtual and Downloadable WooCommerce Orders on Successful Payment
Automatically marks orders containing only virtual or downloadable products as Completed immediately after successful payment.
Production-ready, copy-paste PHP functions, WooCommerce hooks, and speed tweaks.
Automatically marks orders containing only virtual or downloadable products as Completed immediately after successful payment.
When migrating a WordPress site or switching domain names, execute these SQL queries in phpMyAdmin to replace old URLs across post content, excerpts, post meta, options, and comments in one pass.
Declutter the WordPress admin dashboard for clients and content managers by removing unnecessary default boxes such as WordPress Events and News, Quick Draft, and the Welcome panel.
XML-RPC pingbacks are frequently exploited in large-scale DDoS amplification and brute-force attacks. This snippet disables dangerous pingback methods without breaking Jetpack or the official WordPress mobile app.
WordPress loads unnecessary JavaScript and CSS styles on every page load to support legacy browser emojis. This snippet completely removes wp-emoji scripts, styles, and DNS prefetch requests to reduce HTTP requests.
Enforce a storewide minimum checkout threshold in WooCommerce. If a customer attempts to checkout with a cart value below the threshold, an error notice is triggered preventing checkout.
When posts or custom post types are deleted without proper cleanup hooks, their metadata remains in wp_postmeta. This query cleans orphaned post meta.
Expired transients often accumulate into tens of thousands of unused rows in wp_options, inflating database backup size and slowing autoloaded options. This SQL query safely purges expired transients.
Save time when managing large blogs by previewing featured image thumbnails directly in the WordPress posts list table.
White-label the WordPress administration area for client sites with custom branding and support links in the dashboard footer.
Eliminate render-blocking CSS on classic pages, landing pages, or lightweight custom templates by dequeuing default Gutenberg block stylesheets.
The WordPress Heartbeat API sends frequent AJAX requests (/wp-admin/admin-ajax.php) every 15-60 seconds, which can overload CPU on shared and VPS hosting. This snippet disables heartbeat globally except while drafting posts.
Prevent automated vulnerability scanners from identifying your exact WordPress core version across HTML meta tags, scripts, and RSS feeds.
Attackers and botnets use URL parameters like /?author=1 to reveal administrative usernames. This snippet intercepts query parameters and safely redirects or returns a 404 header.
By default, WooCommerce continues to display Flat Rate and Local Pickup alongside Free Shipping. This filter hides paid shipping rates once a customer qualifies for Free Shipping.