Code Craftsman https://www.codecraftsman.us/ Tales from a Dev Dad Tue, 15 Nov 2022 05:22:20 +0000 en-US hourly 1 https://wordpress.org/?v=5.9.3 https://www.codecraftsman.us/wp-content/uploads/2020/08/cropped-code-craftsman-logo-32x32.png Code Craftsman https://www.codecraftsman.us/ 32 32 Programmatically add a custom fee to the WooCommerce cart https://www.codecraftsman.us/programmatically-add-a-custom-fee-to-the-woocommerce-cart/ Tue, 15 Nov 2022 02:55:01 +0000 https://www.codecraftsman.us/?p=710 Charging additional fees to an e-com order is a common ask from many online retailers using WooCommerce. This post gets right to the point with a couple solid code snippets to get your custom fee working right away.

The post Programmatically add a custom fee to the WooCommerce cart appeared first on Code Craftsman.

]]>
Add custom fields to WooCommerce product variations https://www.codecraftsman.us/add-custom-fields-to-woocommerce-product-variations/ Sun, 06 Nov 2022 04:14:40 +0000 http://www.codecraftsman.us/?p=662 Here's a simple way to add custom meta fields to WooCommerce Product Variations in PHP. Change your custom property per variant right from the native WooCommerce product editor.

The post Add custom fields to WooCommerce product variations appeared first on Code Craftsman.

]]>
How to create a reusable code template in PHPStorm https://www.codecraftsman.us/how-to-create-a-reusable-code-template-in-phpstorm/ Tue, 25 Oct 2022 04:37:36 +0000 http://www.codecraftsman.us/?p=660 JetBrains actually calls these Live Templates. They allow you to quickly insert a code template for any language and get prompted for filling optional variable names. The snippet is then bound to an abbreviation of your choice. There’s so many settings in PHPStorm, I’m not surprised if you didn’t know about the enormous number of Live Templates available to you out-of-the-box. They’re activated via a short abbreviation, then Tab or Enter. To access them, open the dialog at File > Settings > Editor > Live Templates. Here’s a list of the default categories: Just look at the collection of VueJS-based…

The post How to create a reusable code template in PHPStorm appeared first on Code Craftsman.

]]>
Quiet that bathroom ceiling fan https://www.codecraftsman.us/quiet-that-bathroom-ceiling-fan/ Wed, 19 Oct 2022 03:25:39 +0000 https://www.codecraftsman.us/?p=643 Developers need focus and noisy bathroom exhaust fans don't help. Follow along as I show you a simple trick to silence the shakes and vibrations of your bathroom fan.

The post Quiet that bathroom ceiling fan appeared first on Code Craftsman.

]]>
Add a 3rd-party SSL certificate to your Azure App Service https://www.codecraftsman.us/add-a-3rd-party-ssl-certificate-to-your-azure-app-service/ Mon, 17 Oct 2022 03:49:16 +0000 http://www.codecraftsman.us/?p=631 Need a quick guide on setting up an SSL certificate to secure your Azure App Service? I'll walk you through uploading your wildcard or sans cert with visual examples.

The post Add a 3rd-party SSL certificate to your Azure App Service appeared first on Code Craftsman.

]]>
Create a clean zip file of your WordPress plugin folder https://www.codecraftsman.us/create-a-clean-zip-file-of-your-custom-wordpress-plugin-folder/ Wed, 12 Oct 2022 02:31:29 +0000 http://www.codecraftsman.us/?p=613 Want to zip up your custom plugin for distribution, but don't want that huge node_modules directory or package.json to get shipped along with it? There's a script for that.

The post Create a clean zip file of your WordPress plugin folder appeared first on Code Craftsman.

]]>
How to override a WooCommerce product’s price https://www.codecraftsman.us/how-to-override-a-woocommerce-products-price/ Tue, 04 Oct 2022 02:55:28 +0000 http://www.codecraftsman.us/?p=585 Taking full control of the price rendered by WooCommerce can be a tricky task, especially considering variation products and all the different locations it can be displayed. I'll show you the combination of hooks that worked for me.

The post How to override a WooCommerce product’s price appeared first on Code Craftsman.

]]>
How I built my hyper-fast blog for free https://www.codecraftsman.us/how-i-built-my-hyper-fast-blog-for-free/ Sun, 25 Sep 2022 04:10:24 +0000 http://www.codecraftsman.us/?p=551 It's a thing of beauty when you see your blog post a full 100 Google Page Speed score. To think that it was done completely free just makes you all warm and fuzzy inside.

The post How I built my hyper-fast blog for free appeared first on Code Craftsman.

]]>
Lorem ipsum for Photoshop designers https://www.codecraftsman.us/lorem-ipsum-for-photoshop-designers/ Tue, 20 Sep 2022 02:58:27 +0000 http://www.codecraftsman.us/?p=522 We all need it. Filler text for our designs is a must. I'll admit I created this because I'm too lazy to truncate text out of Photoshop's built-in Lorem ipsum generator. This tool creates placeholder text at just the right length for pasting into your design.

The post Lorem ipsum for Photoshop designers appeared first on Code Craftsman.

]]>
Generate a PFX file from a GoDaddy SSL certificate https://www.codecraftsman.us/generate-a-pfx-file-from-a-godaddy-ssl-certificate/ Fri, 09 Sep 2022 03:24:16 +0000 http://www.codecraftsman.us/?p=512 This happens to me regularly with Azure apps. I need the PFX version of an SSL certificate in order to secure a Web App or service. I'll show you the simplest command to get the job done.

The post Generate a PFX file from a GoDaddy SSL certificate appeared first on Code Craftsman.

]]>