Docs Archive - CheckoutWC https://www.checkoutwc.com/documentation/ Tue, 13 Feb 2024 17:21:35 +0000 en-US hourly 1 How To Fix Problems With The Bluehost Plugin https://www.checkoutwc.com/documentation/how-to-fix-problems-with-the-bluehost-plugin/ Tue, 13 Feb 2024 17:21:22 +0000 https://www.checkoutwc.com/?post_type=bonita-doc&p=117720 Bluehost provides a plugin named The Bluehost Plugin. This plugin must be deactivated to prevent problems with CheckoutWC. The reason it must be deactivated is that the plugin forcibly swaps the billing and shipping checkout fields if the default shipping destination is set to the shipping address which causes all sorts of problems. Related GitHub […]

The post How To Fix Problems With The Bluehost Plugin appeared first on CheckoutWC.

]]>
Bluehost provides a plugin named The Bluehost Plugin. This plugin must be deactivated to prevent problems with CheckoutWC.

The reason it must be deactivated is that the plugin forcibly swaps the billing and shipping checkout fields if the default shipping destination is set to the shipping address which causes all sorts of problems.

Related GitHub issue: https://github.com/bluehost/bluehost-wordpress-plugin/issues/905

The post How To Fix Problems With The Bluehost Plugin appeared first on CheckoutWC.

]]>
Fix Problems With Porto Theme https://www.checkoutwc.com/documentation/fix-problems-with-porto-theme/ Wed, 20 Dec 2023 14:52:32 +0000 https://www.checkoutwc.com/?post_type=bonita-doc&p=114195 CheckoutWC works perfectly with Porto, but there is one setting that will create problems: Merge javascripts and stylesheets You should not combine stylesheets and scripts. Before HTTP/2, this could increase performance but in modern times this will actually have the reverse effect. Modern browsers and servers allow browsers to process requests efficiently in parallel. Downloading […]

The post Fix Problems With Porto Theme appeared first on CheckoutWC.

]]>
CheckoutWC works perfectly with Porto, but there is one setting that will create problems: Merge javascripts and stylesheets

You should not combine stylesheets and scripts. Before HTTP/2, this could increase performance but in modern times this will actually have the reverse effect. Modern browsers and servers allow browsers to process requests efficiently in parallel. Downloading multiple smaller files is faster than downloading a single big file.

How to Fix Broken JavaScript On The CheckoutWC Checkout Page With Porto Theme

Go to WP Admin > Porto > Speed Optimization Wizard > Advanced and uncheck Merge javascripts and stylesheets

Click Save & Continue

And now you’re done – the JavaScript errors that prevent the page from loading properly will be fixed.

The post Fix Problems With Porto Theme appeared first on CheckoutWC.

]]>
How To Fix Layout and Store Policy Bugs With Elementor https://www.checkoutwc.com/documentation/how-to-fix-layout-and-store-policy-bugs-with-elementor/ Thu, 07 Dec 2023 19:04:32 +0000 https://www.checkoutwc.com/?post_type=bonita-doc&p=113427 Note: This guide only applies to CheckoutWC 8.x and before. CheckoutWC 9.0 and above does not require this fix. If you previously created your checkout page with Elementor and you have configured Store Policies in CheckoutWC > Pages > Checkout, you may hit a bug where one of two things happens: Your page layout is […]

The post How To Fix Layout and Store Policy Bugs With Elementor appeared first on CheckoutWC.

]]>
Note: This guide only applies to CheckoutWC 8.x and before. CheckoutWC 9.0 and above does not require this fix.

If you previously created your checkout page with Elementor and you have configured Store Policies in CheckoutWC > Pages > Checkout, you may hit a bug where one of two things happens:

  1. Your page layout is broken
  2. When clicking a store policy, the modal has the checkout page content (see screenshot below)

We have reported this bug to Elementor but the have yet to fix it. (It’s been over a year!)

The Fix: Recreate your checkout page as a normal page

(Note: If you don’t want to save your current page, you can move it to the trash and permanently delete it. If you do this, skip to Step 3)

Step 1: Edit your current checkout page slug

Go to WP Admin > Pages, search for your checkout page. Change the page slug to something like ‘checkout-bak’

Step 2: Set your current checkout page publish status to Draft

From the same place, update your current page to Draft status.

Step 3: Create a new checkout page

Recreate your checkout page as a normal page with this as the only contents:
[woocommerce_checkout]

Step 4: Tell WooCommerce that your new page is the checkout page

Go to WP Admin > WooCommerce > Settings > Advanced and set your new page as the Checkout page.

Save Settings

Everything should work fine now. 

The post How To Fix Layout and Store Policy Bugs With Elementor appeared first on CheckoutWC.

]]>
Fix Issues With LiteSpeed Cache https://www.checkoutwc.com/documentation/fix-issues-with-litespeed-cache/ Tue, 05 Dec 2023 20:21:23 +0000 https://www.checkoutwc.com/?post_type=bonita-doc&p=113290 In order for CheckoutWC to work properly with LiteSpeed Cache, you must DISABLE their ESI caching feature:

The post Fix Issues With LiteSpeed Cache appeared first on CheckoutWC.

]]>
In order for CheckoutWC to work properly with LiteSpeed Cache, you must DISABLE their ESI caching feature:

The post Fix Issues With LiteSpeed Cache appeared first on CheckoutWC.

]]>
How To Configure Payment Plugins for Stripe WooCommerce To Work With Express Checkout https://www.checkoutwc.com/documentation/how-to-configure-payment-plugins-for-stripe-woocommerce-to-work-with-express-checkout/ Mon, 30 Oct 2023 19:33:56 +0000 https://www.checkoutwc.com/?post_type=bonita-doc&p=110630 Payment Plugins for Stripe WooCommerce is our preferred Stripe gateway. We’ve worked with the Payment Plugins team to ensure our customers get the best Stripe experience with CheckoutWC. There are two configuration steps you need to take to ensure maximum compatibility. Configuring Payment Plugins Stripe for WooCommerce for Express Checkout  Enable ‘Top of Checkout’ for […]

The post How To Configure Payment Plugins for Stripe WooCommerce To Work With Express Checkout appeared first on CheckoutWC.

]]>
Payment Plugins for Stripe WooCommerce is our preferred Stripe gateway. We’ve worked with the Payment Plugins team to ensure our customers get the best Stripe experience with CheckoutWC.

There are two configuration steps you need to take to ensure maximum compatibility.

Configuring Payment Plugins Stripe for WooCommerce for Express Checkout 

Enable ‘Top of Checkout’ for each express button

Go to WP Admin > WooCommerce > Settings > Payments and find the settings for each express button. Example: 
Apple Pay (Stripe) by Payment Plugins

Find the setting called Payment Sections and enable Top of Checkout.

Click Save changes and repeat for any other express buttons you want to enable.

 

The post How To Configure Payment Plugins for Stripe WooCommerce To Work With Express Checkout appeared first on CheckoutWC.

]]>
How To Deselect Initial WooCommerce Payment Method (Comply With Finnish Regulations in 2023) https://www.checkoutwc.com/documentation/how-to-deselect-initial-woocommerce-payment-method-comply-with-finnish-regulations-in-2023/ Wed, 13 Sep 2023 17:04:00 +0000 https://www.checkoutwc.com/?post_type=bonita-doc&p=107460 To help customers comply with new regulations in Finland that require that the checkout page is loaded without a payment gateway selected, we have added two new filters to 8.2.11.  Both are required. Please review the examples below. PHP Filter: cfw_ensure_selected_payment_method This is a standard WordPress filter with receives a boolean value that determines whether […]

The post How To Deselect Initial WooCommerce Payment Method (Comply With Finnish Regulations in 2023) appeared first on CheckoutWC.

]]>
To help customers comply with new regulations in Finland that require that the checkout page is loaded without a payment gateway selected, we have added two new filters to 8.2.11. 

Both are required. Please review the examples below.

PHP Filter: cfw_ensure_selected_payment_method

This is a standard WordPress filter with receives a boolean value that determines whether or not a gateway will be selected by default. (Default: true)

JS Filter: cfw_js_ensure_selected_payment_method

This is a JS filter using @wordpress/hooks. Our JS action and filter hooks use the global wp.hooks object that is available on the window object.

Just like the PHP version, it receives a boolean value that determines whether a payment gateway should be opportunistically selected if none is selected. (Default: true)

How To Deselect Initial Payment Method with WooCommerce and CheckoutWC

Step 1: Add the following code to WP Admin > CheckoutWC > Advanced > Scripts > PHP Snippets

Step 2: Add the following code to WP Admin > CheckoutWC > Advanced > Scripts > Checkout (subsection) > Header Scripts:

The post How To Deselect Initial WooCommerce Payment Method (Comply With Finnish Regulations in 2023) appeared first on CheckoutWC.

]]>
Hot To Add Custom HTML To The WooCommerce Checkout Page https://www.checkoutwc.com/documentation/hot-to-add-custom-html-to-the-woocommerce-checkout-page/ Wed, 23 Aug 2023 15:26:58 +0000 https://www.checkoutwc.com/?post_type=bonita-doc&p=106076 Adding custom HTML to the checkout page is pretty simple, but it does take a small amount of PHP.  Step 1: Where do you want to add the custom HTML? You first need to decide where you want to output your custom HTML. The easiest way to do this is to look at our Visual […]

The post Hot To Add Custom HTML To The WooCommerce Checkout Page appeared first on CheckoutWC.

]]>
Adding custom HTML to the checkout page is pretty simple, but it does take a small amount of PHP. 

Step 1: Where do you want to add the custom HTML?

You first need to decide where you want to output your custom HTML. The easiest way to do this is to look at our Visual Hook Guide. This allows you to see exactly where each action hook outputs.

Simply pick an action hook and proceed to step 2.

For our purposes, we’ll use this one: cfw_after_cart_summary

Step 2: Write a PHP snippet to output your custom HTML

Using the WordPress Action Hook API we can insert our HTML anywhere.

Here’s an example using cfw_after_cart_summary:

You can modify this example to suit your needs.

Step 3: Deploy your custom HTML block

To deploy your custom HTML block, you have a few options:

  1. You can add it as a PHP Snippet here: WP Admin > CheckoutWC > Advanced > Scripts > PHP Snippets
  2. You can add it to your child theme’s functions.php file
  3. You can use a plugin like Code Snippets.

The post Hot To Add Custom HTML To The WooCommerce Checkout Page appeared first on CheckoutWC.

]]>
Fix Layout Issues with Astra Pro https://www.checkoutwc.com/documentation/fix-layout-issues-with-astra-pro/ Mon, 24 Jul 2023 16:12:15 +0000 https://www.checkoutwc.com/?post_type=bonita-doc&p=104352 If you’re using Astra Pro, you may need to change your Checkout Layout setting to Default in order for the CheckoutWC templates to display properly:

The post Fix Layout Issues with Astra Pro appeared first on CheckoutWC.

]]>
If you’re using Astra Pro, you may need to change your Checkout Layout setting to Default in order for the CheckoutWC templates to display properly:

The post Fix Layout Issues with Astra Pro appeared first on CheckoutWC.

]]>
How To Ensure Your WordPress Cron Is Working Properly https://www.checkoutwc.com/documentation/how-to-ensure-your-wordpress-cron-is-working-properly/ Tue, 16 May 2023 15:17:45 +0000 https://www.checkoutwc.com/?post_type=bonita-doc&p=100135 WordPress includes a system for processing repeated tasks, often called cron jobs. (Cron stands for Command Run On – it’s a very Unix name) But whatever it stands for, it’s job is to make sure that background tasks are consistently run. Within WordPress, this is accomplished by default in a less than ideal way. Instead […]

The post How To Ensure Your WordPress Cron Is Working Properly appeared first on CheckoutWC.

]]>
WordPress includes a system for processing repeated tasks, often called cron jobs. (Cron stands for Command Run On – it’s a very Unix name) But whatever it stands for, it’s job is to make sure that background tasks are consistently run.

Within WordPress, this is accomplished by default in a less than ideal way. Instead of having a system level cron job that reliably executes any tasks that are due every minute, WordPress has a different approach: whenever someone visits your site, it spins up its own cron mechanism in the background. This happens at the end of the PHP request, so as to cause as little disruption as possible.

When wp-cron spins up, it checks for any behind schedule tasks and processes them. There are two major issues with this approach, which you may have already anticipated:

  1. If your site is not accessed frequently (or is cached), the WP cron jobs will run infrequently (or never at all)
  2. If a cron job takes awhile to run, it could lock up multiple PHP threads reducing the number of available resources for your visitors.

Fortunately there are a few of straight forward ways to fix this.

Note: If you’re using a WordPress managed host, chances are they already manage your cron setup for you and you won’t need to do anything. When it doubt, ask your host.

Step 1: Disable WP Cron

Disabling the WP cron doesn’t prevent tasks from running, it disables the normal method those tasks are executed. To disable WP cron, add the following to your wp-config.php file:

define('DISABLE_WP_CRON', true);

Step 2: Setup properly functioning cron scheduling

Option 1: Use cron-job.org (Difficulty: Easy)

cron-job.org solves issue 1: infrequently executed cron jobs

You can use cron-job.org to regularly call WP’s cron script and make sure it executes reliably. Here’s how to do it:

1. Create an account

Create an account, verify your email address, and login. (You don’t need help with this part!)

2. Create a cronjob

Here are the settings you should use for your new cronjob:

Title: Your Awesome Site!
Address: https://yoursite.com/wp-cron.php?doing_wp_cron 
Schedule: Every 1 minute(s)

 

These are example values. Replace yoursite.com with your site’s domain. 

Once you’ve created the cronjob, you are done. Cron jobs should execute properly. 

Note: Some hosts might improperly detect the once-every-sixty-seconds page load as a threat. You can ensure that this isn’t a problem by asking your host to whitelist these IPs:

  • 195.201.26.157
  • 116.203.134.67
  • 116.203.129.16
  • 23.88.105.37

Option 2: Use cpanel (Difficulty: Medium)

If your host uses cpanel, you can add scheduled tasks right from your hosting control panel. 

Here is how you can do it:

Set up a Cron job in cPanel: Log in to your cPanel account and look for the Cron jobs tool. This tool is often found in the “Advanced” section. After you open the tool, follow these steps:

  • In the “Common Settings” dropdown, select Every Minute (* * * * *).
  • In the command field, you need to add the command that will run the wp-cron.php file. The command should look like this:
    /usr/local/bin/php /path/to/public_html/wp-cron.php >/dev/null 2>&1
  • After you’ve added the command, click on the Add New Cron Job button. The cron job is now set up and will run the wp-cron.php file every minute.

Please note that the PHP cli command might not work on all servers. If it doesn’t work on your server, you can try using one of the following commands:

  • For servers with wget installed:
    wget -q -O – http://yourwebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
  • For servers that have curl installed:
    curl http://yourwebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

Replace `yourwebsite.com` with your actual website URL!

This setup will reduce the load on your server and ensure that scheduled tasks are run on time, even if your website doesn’t receive much traffic.

Option 3: The best option: Use a real cron job with WP CLI (Difficulty: Hardest)

To set up WP Cron using WP CLI and the system’s crontab, you’ll first need to ensure that WP CLI is installed on your server. WP CLI is a command line interface for WordPress that allows you to manage your site from the command line. Installing WP CLI is outside of the scope of this document – check with your hosting provider.

Here are the steps to do it:

Configure Cron using WP CLI and crontab

  1. SSH into your server
  2. Open your crontab for editing. You can do this by executing the following command in your terminal:
    crontab -e

    This will open your crontab file in your default text editor.

    Note: This is the user you are using to SSH into the server’s crontab file. It can only do things your user can do.

  3. Next, you need to add a new line to your crontab that tells it to run WP CLI’s cron event runner. This line should look something like this:
    * * * * * cd /path/to/your/wordpress/install && wp cron event run –due-now >/dev/null 2>&1

    Replace `/path/to/your/wordpress/install` with the actual directory path of your WordPress installation.

  4. This line tells the system to:

    • Navigate to your WordPress directory (cd /path/to/your/wordpress/install)
    • Run the WP CLI command (wp cron event run –due-now)
    • Run this command every minute (* * * * * is crontab syntax for “run this command every minute”)
    • Discard any output from the command (>/dev/null 2>&1)
  • Save your changes and exit the text editor to save the crontab.

Now, your server will run any due WordPress cron events every minute. This is a more reliable method than the default WordPress cron, especially for sites that don’t receive a lot of traffic.

The post How To Ensure Your WordPress Cron Is Working Properly appeared first on CheckoutWC.

]]>