OpenLampTech issue #109
WooCommerce block product editor | Escaping output in PHP and Laravel | SQL must go | GitHub and MySQL v8. OpenLampTech is a media and content source for PHP, MySQL, and the LAMP stack.
Thank you for reading the OpenLampTech newsletter!
If someone awesome shared this newsletter with you and you are not yet subscribed, please use the Subscribe button below and join:
And now, a message from this week’s sponsor. Thank you, Depot for sponsoring the OpenLampTech newsletter!
Depot is a remote container build service hosting BuildKit as a service, the same build engine that backs Docker. We can build Docker images up to 20x faster, thanks to fast persistent caching on NVMe SSDs, 16 CPUs, 32GB of memory, and fast native CPUs for Intel and Arm.
If you’re tired of waiting for slow Docker image builds, check out depot.dev.
OpenLampTech has sponsorship opportunities for your brand, product, or service in the weekly newsletter. As an independent publication, collaboration is very affordable. Inquire by email at openlamptech@substack.com for more information on reaching the OpenLampTech readership. Sponsorships are available for early 2024.
Christian Olear shared some great content in his recent OpenLampTech developer interview.
Read it here:
Extending The WooCommerce Block Product Editor With PHP
The (beta) block-based WooCommerce Product Editor can be extended using a PHP-based API. Read more about my exploration, learning, and findings.
CREATE A WORDPRESS SITE WITH FAKE DATA
Surely everyone who is spinning up test WordPress sites has thought about this or am I the only one? This article has a nice walkthrough using a couple of plugins to populate all sorts of WordPress-y data. Until this point, I had no idea some of these plugins even existed. I believe there is a Duplicator plugin that duplicates just posts (maybe Pages too - or vice-versa), but oftentimes we need more data to verify many different aspects of the WordPress site. [damonacook.com]
Security Tip: Escape Output with e(), htmlspecialchars(), & htmlentities()!
Stephen Rees-Carter of Securing Laravel gives us the rundown on 2 built-in PHP methods along with a Laravel-specific one. These methods: htmlspecialchars()
, htmlentities()
, and e()
are used to ‘safely’ escape HTML output. However, they have their differences and should be used accordingly. Learn more about StephenRees-Carter in this OpenLampTech developer interview. [Securing Laravel]
Woocommerce: and the mysterious Product Attributes
I was researching some study sources and content recently about WooCommerce Product attributes and found this great read. While the content is from 2021 (a bit dated in the WordPress and WooCommerce spaces since things tend to move and update frequently), I still learned a great deal about programmatically manipulating the WooCommerce Product and attributes. Good code samples on how to create and save a product with code. [Medium]
Upgrading GitHub.com to MySQL 8.0
Good behind-the-scenes of just how massive and complex GitHub's MySQL infrastructure is. Wanting to update from the waning MySQL v5.7, v8 is the next logical step. And, quite an improvement feature-wise over the older version. There is plenty to learn and digest in this one. MySQL is everywhere on the web. Likely, even storing our code repositories for us. [github.blog]
Keep your testing database separate from development
Words to live by. Heck, I'm already a nervous wreck working on the testing database lol. Don't let me have to do anything with the database on production. Lord, blood pressure is off the cuff.
In all seriousness, Joel Clermont of Mastering Laravel has some good tips and pointers for settings in the Laravel application. [Mastering Laravel]
Lol. Even though I do agree with a lot of these, we all know deep down that SQL isn't going anywhere anytime soon.
Here are some passages that make sense (quoted directly from the source article):
“It can be clunky and verbose…”
“It can be lightning quick when a query is written correctly, and slow as molasses when the query misses the mark”
“SQL's tabular model is so dominant that many non-SQL projects end up adding an SQLish interface because users demand it.” (Agreed)
Be sure and read the article to see the real 9 reasons. [InfoWorld]
WooCommerce News and Updates
The Woo Blocks Merge to the Monorepo is complete (along with Monorepo Tool Enhancements) (December 11th, 2023)
WooCommerce 8.4.0 Released (December 12th, 2023)
Ready to Grow? It’s Time to Build Your Multichannel Strategy (December 14th, 2023)
[#Classifieds, #Affiliates, #Click Ads, #Shoutouts]
🤝 OpenLampTech earns a small commission (or payment/gain in some form) from many of these links. Your support helps keep the weekly OpenLampTech newsletter free for readers.
Take your Laravel applications to the next level with Battle Ready Laravel by Ash Allen. Learn how to improve the performance, maintainability, and security of your Laravel projects in this e-book.
Thank you for reading. I hope you have a great rest of your week.
Take care.
Josh Otwell
When you are ready, here are more ways I can help...
Content, E-commerce Development, and Email/Newsletter Services - Photography services; Shopify and WooCommerce customizations, development, and setup; Email and Newsletter setup and management.
Interested? Great!
Just hit Reply and ask for more information about any of these services.
OpenLampTech is a reader-supported publication. You can support the publication with a virtual coffee for as little as $3 (USD).