Getting Hosts File Changes to Work with Firefox 76

Firefox Master Brand Logo

You may be migrating a website to a new host, migrating an entire server’s worth of domains, or doing one of many tasks that requires you to temporarily change the hosts file on your computer in order to test a site that is on a new IP address.

Regardless of the reason, if you alter the hosts file and expect the changes to work immediately in Firefox 76, you may get an unpleasant surprise.

Today, I’m in the midst of testing a server migration, so I have a number of sites to test on the new, temporary IP addresses. I’m using Linux and Firefox 76, so I edited my /etc/hosts file, adding the new, temporary IP address for one of the sites, started Firefox, and browsed to the domain.

I got the old server.

Continue reading “Getting Hosts File Changes to Work with Firefox 76”

WooCommerce: Hide a Shipping Method Based On User Role

Sometimes, it’s necessary to hide a shipping method in WooCommerce.

A client of mine offers local pickup only to a select group of customers. His business doesn’t have a showroom. The majority of his sales are on-line; however, he does sell to a few local businesses who prefer to pick up their orders in person. He’d been using a free-shipping coupon for those customers who picked up their orders at his shop, which works, but is more trouble for the customer than a custom user-role capability.

The example below shows how to hide the shipping method “Local Pickup” from all but users granted a specific user role capability using Vladimir Garagulya’s plugin User Role Editor to set and manage the custom user role capability.

Continue reading “WooCommerce: Hide a Shipping Method Based On User Role”

Enom DNSSEC Tool

In the 1990s, the engineers of the Internet Engineering Task Force (IETF), the organization responsible for DNS protocol standards, came up with the DNS Security Extensions (DNSSEC). Their goal was to make the Internet safer by making it possible for end users to know: 1) that the data they receive from a web site actually comes from that site, and 2) to know that the data hasn’t been modified in transit.

That seems like something we should have been doing all along, but implementation of DNSSEC has been slow. So, why isn’t everyone using DNSSEC?

Continue reading “Enom DNSSEC Tool”

WooCommerce 3.8: Send a Notification Email When a Customer Changes Their Address

Envelope

Several years ago, I wrote a post, Send a Notification Email When a Woocommerce Customer Changes Their Address, that included a code snippet. Yesterday, I was contacted by a developer who tried to use the snippet and found it wasn’t triggered in his theme. I tested the snippet on my client’s site–he’s still using the Twenty Ten Theme–and found that it was triggered, but the email included the old address, not the updated address.

Note: I tested this code in PHP 7.3 and WooCommerce 4.0, and it still works.

Continue reading “WooCommerce 3.8: Send a Notification Email When a Customer Changes Their Address”

WordPress: Make Major Page and Post Edits Safely

If you’re like me, since the Gutenberg editor came out with WordPress 5.0, every time you edit an old page or post and see that “Classic Block,” you have trouble resisting the temptation to click the “Convert to Blocks” link.

Maybe you just have some major edits to do on an old page, or you want to convert a post with a whole slew of individual images to a Gallery Block.

If you leave WordPress’ revisions enabled, you’re already in pretty good shape; however, in order to keep my WordPress’ databases as small and streamlined as possible, one of the first things I do when installing WordPress is to disable revisions. I needed another way to prevent major edits from becoming major hassles.

Fortunately, WordPress makes it easy to create a backup of a single page or post, and you don’t even need an extra plugin to do it.

Continue reading “WordPress: Make Major Page and Post Edits Safely”