Writing
Thoughts on WordPress, web development, and the tools I use.
How I stopped Product Add-ons from bypassing Sold Individually in WooCommerce
When Product Add-ons is active, the Sold individually setting stops working because each add-on configuration creates a unique cart item. This code snippet ensures products can only be added once per order, regardless of the add-on options selected.
How to use PHPCS with WordPress Coding Standards?
Learn how to install and run PHPCS with WordPress Coding Standards locally and in projects. From global setup to Composer scripts, you'll see how to keep your plugins and themes clean, consistent, and review-ready.
How to Set Up PHPStan for WordPress and WooCommerce?
Learn how to set up PHPStan for WordPress and WooCommerce with the right config, stubs, and bootstrap so it actually understands your code.
How to reset Variation Selections after adding to Cart in WooCommerce?
By default, WooCommerce doesn't reset selected variations after adding a product to the cart. Here's a simple snippet to automatically clear variation options for a smoother shopping experience.
A new home for my writing
I bought a new blog domain every time my work shifted. After almost a decade of that pattern, shameemreza.com is where I finally stopped moving.
How to change Read More to Add to Cart for Bookable products?
By default, WooCommerce Bookings shows Read More instead of Add to Cart. Here's a simple code snippet to change that while keeping the booking flow intact.
How to show Product Global ID in WooCommerce Order Details and Quick Preview?
WooCommerce doesn't show product GTIN/UPC/ISBN in order details or quick previews by default. Here's a simple snippet to show GTIN/UPC/ISBN alongside SKUs in the admin order page.
How to show company names in the WooCommerce orders list
WooCommerce shows the customer's name in the orders list by default. For B2B stores, that isn't what you want to see. Here's the filter that swaps it for the billing company name, with a fallback to the customer name when the field is empty.
How I skip the cart and send customers straight to checkout in WooCommerce
A practical guide to skipping the WooCommerce cart page and redirecting customers straight to checkout, based on real project experience.
How I upload and update a WordPress plugin on WordPress.org using SVN
A real-world guide to uploading and updating WordPress plugins on WordPress.org using SVN on macOS, based on lessons learned and real mistakes.