Working with Porto Theme’s Custom Country Selector on WooCommerce Checkout

In a recent Business Bloomer Club discussion, a member encountered an issue with the Porto theme’s checkout customization in WooCommerce.

Specifically, Porto replaces the standard WooCommerce select dropdown for country selection with a custom element, making it difficult to trigger certain events, like reloading the checkout when a country changes. Here’s how to handle custom elements like these and ensure checkout updates work smoothly.

Porto’s theme uses the Select2 script to enhance standard select elements, replacing the default WooCommerce country selector. This can prevent traditional jQuery selectors from working as expected when trying to detect changes and update the checkout page.

Continue reading Working with Porto Theme’s Custom Country Selector on WooCommerce Checkout

How to Round Prices Without VAT for Non-European Customers in WooCommerce

In a recent Business Bloomer Club thread, a member raised a question about displaying rounded prices for non-European customers. Although prices on the site were set to include VAT, users outside of Europe were seeing unrounded, non-taxed prices (e.g., €1143.75 displayed as €1144).

The goal was to adjust both the display and actual prices, so non-European customers would see rounded amounts in all relevant areas, such as product pages, cart, and checkout.

Here’s a guide on how to implement this feature by overriding WooCommerce product prices based on the customer’s location.

Continue reading How to Round Prices Without VAT for Non-European Customers in WooCommerce

Resolving Tax Display Issues in WooCommerce: Ensuring Consistent VAT-Inclusive Prices

In a recent Business Bloomer Club discussion, a member encountered a perplexing tax display issue in their WooCommerce store. Despite setting up prices to include VAT and configuring WooCommerce’s tax display settings to always show VAT-inclusive prices, an unexpected amount was displayed on the product listing page.

Only in the cart or after selecting a shipping country did the correct price appear. This inconsistent behavior led to confusion, as it seemed WooCommerce was ignoring the store’s tax settings.

Here’s how we approached diagnosing and fixing this problem.

Continue reading Resolving Tax Display Issues in WooCommerce: Ensuring Consistent VAT-Inclusive Prices

Simulating Automatic Cancellation of Pending Payments in WooCommerce

In a recent Business Bloomer Club discussion, a WooCommerce store owner wanted to simulate the automatic cancellation of “Pending Payment” orders after a set time.

WooCommerce has a built-in feature to move pending payments to “Canceled” status, but in this case, the auto-cancellation wasn’t consistently triggering during testing with Mollie’s test API key. Since no actual order is created on Mollie’s platform with the test key, pending orders in the shop would remain in that status, causing issues with testing sub-orders in the Yith Deposit plugin.

For anyone facing similar challenges, here’s a potential solution using WooCommerce’s Action Scheduler.

Continue reading Simulating Automatic Cancellation of Pending Payments in WooCommerce

Quantity Input as a Dropdown in WooCommerce: Limiting Quantity to a Custom Maximum

In a recent Business Bloomer Club discussion, a WooCommerce developer encountered a challenge when implementing a quantity dropdown for product selection.

Despite setting a maximum quantity of 20, the dropdown was still allowing up to 9999 units. This scenario highlighted some key considerations when adjusting WooCommerce’s quantity input fields, especially for products with stock management enabled.

The default quantity input field in WooCommerce is typically a text field, but with some custom code, it can be turned into a dropdown to enhance user experience. Here’s a breakdown of how to modify this input field while ensuring it adheres to a maximum limit.

Continue reading Quantity Input as a Dropdown in WooCommerce: Limiting Quantity to a Custom Maximum

Displaying WooCommerce Products in Swedish Alphabetical Order

In a recent Business Bloomer Club discussion, a member shared a challenge with displaying product titles alphabetically according to Swedish standards in WooCommerce.

By default, WooCommerce sorts letters like å, ä, and ö before “A,” which doesn’t match the Swedish alphabetical order, where they should appear at the end. Efforts to adjust the database settings directly didn’t resolve the issue, even after disabling plugins and testing with the Storefront theme.

This scenario highlights a common hurdle for WooCommerce users working with international character sorting. Below is a breakdown of the troubleshooting steps taken and the eventual solution.

Continue reading Displaying WooCommerce Products in Swedish Alphabetical Order

Unexpected WooCommerce Product Purchase Despite Private Setting: How It Happened

In a recent Business Bloomer Club discussion, a member shared a perplexing situation with a WooCommerce product that was set to “Private” but still ended up being ordered by a customer.

When a product is marked private, it shouldn’t be accessible publicly; instead, it’s intended to be hidden from non-admin or non-editor users. However, this case suggests that even private products may still be accessible under certain conditions or due to unexpected system behaviors.

Here’s a breakdown of possible explanations for this occurrence and how it might be resolved.

Continue reading Unexpected WooCommerce Product Purchase Despite Private Setting: How It Happened

Displaying a Cart Notice for Missing Shipping Information in WooCommerce

A Business Bloomer Club member recently asked about adding a cart notice in WooCommerce to prompt customers to enter their postal code in the shipping calculator.

They noted that customers sometimes overlook this step, leading to confusion when no shipping options are available.

Below, we’ll walk through a method to display a notice at the top of the cart page, reminding customers to add their address information to view shipping options.

Continue reading Displaying a Cart Notice for Missing Shipping Information in WooCommerce

Tracking Monthly Customer Cohorts in WooCommerce for Repeat Orders

A recent Business Bloomer Club member posed a question about tracking customer behavior over time, specifically aiming to monitor how many orders new customers place after their initial signup.

For instance, if 30 new customers joined in May 2023, they’d like to observe how many of these customers placed additional orders in subsequent months. This type of analysis is known as cohort analysis and can provide insights into customer loyalty and engagement over time.

Here’s a guide on how to implement cohort analysis in WooCommerce.

Continue reading Tracking Monthly Customer Cohorts in WooCommerce for Repeat Orders

Running Custom Server-Side Code on Checkout Field Blur in WooCommerce

A recent query in the Business Bloomer Club asked for advice on executing custom server-side code when a user enters their email address during checkout in WooCommerce, specifically after the field loses focus (similar to how the cart updates for coupons and shipping).

This setup can be useful for verifying user input dynamically without a full page refresh.

Here’s a guide on how to achieve this functionality using AJAX and JavaScript.

Continue reading Running Custom Server-Side Code on Checkout Field Blur in WooCommerce

Creating a Table View for WooCommerce Product Variation Quantity Selection

A recent discussion in the Business Bloomer Club centered around displaying WooCommerce product variations in a table format for easier quantity selection.

The goal was to replicate a specific “table view” for selecting product quantities rather than the default dropdown menu. While some plugins offer this table-style selection on single product pages, the request here was to have a similar interface on the product category page as well.

Here’s a look at possible solutions and plugins to achieve this setup.

Continue reading Creating a Table View for WooCommerce Product Variation Quantity Selection

WooCommerce: Search Orders By 2-Letter Country Code [HPOS]

WooCommerce’s order search function is essential for store admins, but with the introduction of High-Performance Order Storage (HPOS), searching by billing or shipping country code may no longer work as expected.

If you’re used to quickly filtering orders by country, this limitation can be frustrating. Fortunately, there’s a simple way to bring back this functionality using a custom code snippet.

In this post, we’ll walk through how to modify the WooCommerce order search to support two-letter country codes, making it easier to find the orders you need. Let’s dive into the solution!

Continue reading WooCommerce: Search Orders By 2-Letter Country Code [HPOS]