AWS S3 as WordPress media storage
Offloading media attachment to AWS S3 to free up space and optimise resource loading performance is easy
Apache config for hosting single-page Vue APP with vue-router
When navigating to any route in a single-page application, a Page not found will occur. It is because the server is trying to retrieve an actual file from the web folder. add the following config to the web server can direct all traffic to the entry page.
Xdebug with Docker on localhost with proxy to the Internet
Simple config to allow Xdebug to connect to the VS Code and container to the Internet via proxy.
fix empty $_FILES via form submission
attribute "enctype" is required if a <form> is to submit a file.
Dynamic List Render Animation on Vuejs and TailwindCSS
List animation with VueJS and TailwindCSS
Rest API authentication with Headless WordPress
WordPress provides built-in support for authenticating the incoming request to its restful API, which is handy.
SQL Query to Retrieve Woocommerce Order with Product Detail
Woocommerce order detail is saved in several tables which could be tricky to retrieve, this snippet may be handy to help you out
Dynamic Redirect in WordPress
programmatically register an endpoint to enable customised dynamic redirection
phpcs Fatal Error with wp-coding-standards/wpcs
The phpcs autoformat-er failed to perform on save in VS Code. "A Fatal Error" pops up. It is caused by the sniffs applied, wpcs, which is not yet compatible with PHP8. But it can be resolved with a line of PHP configuration.
Collecting One-Step Payment with Woocommerce
create a checkout link to quickly collect one-time payment