Dev Blog 1 – LMS updates

Hello and welcome to the WPSecurity101 Dev Blog, where you’ll find updates about what’s happening behind the scenes here at WPSecurity101.

Last week, we onboarded our pre-sale learners and invited new learners onto the course, while also launching Module 2: Users.

This week has been largely focused on adding extra functionality to the site that was previously missing.

Invoices

Some countries require an invoice for all transactions, and a Stripe receipt is not sufficient. Stripe does offer invoicing but at significantly more cost per payment and, well, we can do better. So we have built a new invoice option available via your account page. This is available for new learners right now. For pre-sale learners we are importing the historical data and once complete, invoicing should be available to you too. 

To generate an invoice, go to Accounts, ensure your Billing Section is filled out and saved. A new ‘Download Invoice’ button should appear once done. Note that the invoice generator only shows when a completed billing section and a purchase have been made. 

Powering this is a custom block for the billing section, and then the MPDF library. The library is very easy to use, though there was a bit of a shock when seeing it was over 100 MB of disk space. It turns out it comes with a bunch of fonts, of which none are actually needed in our case. There is no easy way to disable fetching them during an update, so our build script gains a weird edge case rule. 

Importing the pre-sales is being done via a WP-CLI command, which will take a CSV and import it into the database. There are some shenanigans, as past Tim thought he was being smart and ensuring there was a clear identifier between a pre-sale and a learner on the site. Past Tim didn’t expect slightly nearer past Tim to make changes. We have had to ensure that we match records in a couple of ways. Unfortunately, this also means hand-generating the CSV.

Other changes

Mostly, little cosmetic changes and a few plugin upgrades occurred automatically. We made a couple of performance tweaks as we prepare to add a second server to the mix, and we have re-enabled caching for non-logged-in users on most pages.

When a user logs in who hasn’t purchased, they are taken to the purchase screen by default; previously, they would have to jump between screens.

What’s coming next week?

We have two big things coming up:

Multi-Currency Support

Multiple currency support is available. If you are in the US or EU, starting next week you will be able to purchase in USD and EUR, depending on your location. Outside of the US/EU, you will see GBP as you currently do. We were using Stripe Adaptive pricing, which auto-converted to your local currency, but it was adding up to 5% to the cost and costing us for currency conversion. With the changes, we will be able to hold on to our US and EU funds and send them to our business accounts for those currencies. The implementation is more complicated, but should be seamless for new learners and help reduce the friction to purchase a little bit.

Company management portal

We will be inviting our first beta testers to the company management portal where they will be able to enrol members of their team. At this stage, it will be simply an invitation management system, but going forward, company administrators will be able to see progress, check on certifications, and verify that users are active. With billing management built directly in. Company management is one of the primary reasons we opted for a custom route, and we’re happy to be working on it and getting it out soon. We have a couple of companies that have signed up to beta test, but if your company is also interested, please drop us a message.

Looking down the line:

The first set of quizzes is scheduled to arrive the following week. For the Users module, we have active labs via WP Playground, allowing users to follow the hands-on labs without needing to set anything up.