We are a big fan of the WooCommerce plugin for its stability and the ability to create our own custom templates. We are also a big fan of clean UX and performant enterprise level websites. https://wordpress.org/plugins/woocommerce/ One thing we have never been a fan of was WooCommerce Blocks. Don't get me wrong, the blocks are really cool. In a world of Full Site Editing it's reasonably necessary for WooCommerce to provide blocks for users to have the ability to build the site code free. … [Read more...]
Gutenberg Block Editor – Translating TypeScript
WordPress versions 4.9 and below allowed you to translate text in your JavaScript by passing JSON objects via wp_localize_script. While this system works great it has some limitations. With the release of WordPress 5.0, support was introduced to allow developers to translate their theme or plugin directly within JavaScript. Translating in JavaScript has some nice benefits: You add your text in the React components where it is used so you don't have to map objects to strings.Translations … [Read more...]
Retrieving Account Access For a Discontinued Email
A relatively common occurrence is for a user on your organization to purchase a plugin license using their personal email address instead of a shared email. This works fine until the user leaves your organization and their email is removed. If you know the password of the plugin account you may log in and change the email address under Account Details. The following process will allow you to regain access to the plugin account as well as change the email address to a shared … [Read more...]
Making PHPUnit 7 tests work with PHP8
Update: The WordPress core integration testing library now supports PHPUnit 9 and no longer requires a special PHPUnit 7 library. Our version of PHPUnit 7 has been discontinued and is no longer available. More information may be found here. A few months ago a new major version of PHP was released which brought many code style and functionality enhancements. A very useful update toward making PHP strict typed and running more computational complex programs natively on PHP. If you are … [Read more...]
Adding Custom JavaScript to Your Site
There are times when you need to add a little JavaScript to your WordPress site but don't want to spin up an entire plugin. Maybe you're doing some AB testing or don't want to edit your theme's JavaScript directly. Maybe you're adding some Google Analytics code. If you've ever requested a customization of the accordion functionality in our Advanced Sidebar Menu PRO plugin, you most likely needed to add some custom JavaScript. Whatever your reasons, there are a few methods to accomplish … [Read more...]
Writing a proper commit message
These days every developer is using some form of version control to manage their code bases and contributions from their team. Most predominantly we are using GIT as our version control of choice. No matter what form of version control you are using, the most important part of keeping a usable code history is, "Writing a proper commit message." Why? If you have ever used git log --grep or used an IDE to find commits you know the importance of having a relevant message to locate the … [Read more...]