Testing payments on WordPress + WooCommerce sometimes requires your website to be publicly accessible. To make your local website publicly accessible, you can use ngrok. 1. Install and activate relative-url 2. Update your config/application.php file Replace With 3. Add your subdomain to your site’s config file Replace your-subdomain with … your sudomain. Open ~/.config/valet/Nginx/{sitename} and …
Applying patches to 3rd party WordPress plugins
Modify a 3rd party plugin without manually having to apply the changes after each update/deploy.
Unit testing must-use WordPress plugins inside Local by Flywheel
WP-CLI allows us to quickly implement unit testing using PHPUnit. This post will guide you through the process of setting PHPUnit up to test must-use plugins in Local by Flywheel. By default WordPress only allows single-file plugins inside the mu-plugins directory. Bedrock implements an autoloader for mu-plugins in directories. Check out https://github.com/wemakecustom/wp-mu-loader if you aren’t …
Verder lezen “Unit testing must-use WordPress plugins inside Local by Flywheel”
Set WooCommerce product variation thumbnail by attribute
WooCommerce allows you to assign a thumbnail to each of your product variations. If you have a lot of variations, this will be very time-consuming. In some cases, it would be more convenient to assign a thumbnail to each attribute term. If you’re selling T-shirts for example, you would have 2 attributes: color and size. …
Verder lezen “Set WooCommerce product variation thumbnail by attribute”
Implementing a user-friendly accordion FAQ in WordPress
A lot of clients ask me to implement a FAQ in their website. There are a couple of ways to accomplish this, but for me, this seems the best way. The main advantage of this method, is that questions/answer will be found with the default search form, and will be linked to the accordion. I’m …
Verder lezen “Implementing a user-friendly accordion FAQ in WordPress”
WPML: remember user’s language choice
There is no built-in function to remember a user’s language choice in WPML, and redirect him accordingly. WPML can only redirect returning visitors according to their browser language. I figured out a way to store the user’s language choice, and redirect the user to his preferred language when he revisits your website. There are 3 …
Deploying Bedrock WordPress website to Combell using AutoGit
Bedrock creates a project structure which is way more maintainable than a normal WordPress install. It is easy to check in to version control and we can manage our dependencies with Composer. In this post, I will be describing how to automatically deploy your Bedrock installation from your local development environment to Combell using AutoGit. …
Verder lezen “Deploying Bedrock WordPress website to Combell using AutoGit”