Known compatibility issues

Known compatibility issues

Here we gather the plugins that have known compatibility issues with Payson Checkout for WooCommerce. This document will be updated if/when needed and it’s our goal that the list will shorten rather than expand.

Some of the plugins listed below may have a solution; others unfortunately do not. We always try to make our plugins compatible with as many other plugins and set-ups as possible, but depending on code outside of our control in other plugins, we can not always enable compatibility.


Weglot Translate


Weglot Translate

Problem: Weglot does not update locale when the customer change language. The result being that the standard locale for your WooCommerce store is still being used.

Solution: The snippet below will run a check of the current set language in Weglot and update the locale.

If you need support for additional languages you need to match what we have in the snippet. You also need to make sure that Payson support said language. If it doesn’t, it will default to English.

add_filter( 'locale', 'payson_set_locale' );

function payson_set_locale( $locale ) {
	if ( function_exists( 'weglot_get_current_language' ) ) {
		$iso = weglot_get_current_language();
		switch ( $iso ) {
			case 'sv':
				return 'sv_SE';
			case 'fi':
				return 'fi';
			case 'es':
				return 'es_ES';
			case 'de':
				return 'de_DE';
			case 'nb':
				return 'nb_NO';
			default:
				return $locale;
		}
	}

	return $locale;
}

To get the functions exemplified in this section to work you need to add the code to your theme’s functions.php. You can add it as its own plugin or through the Code Snippets plugin.


WooCommerce 8.7 – order attribution origin


With the release of WooCommerce 8.7 (see PR), the fields required for keeping track of the order origin has been moved to a different action, namely woocommerce_checkout_after_customer_details.

The action hooks that we have in our existing template are, therefore, no longer adequate. So as to not break any existing custom template, we’ve decided not to modify the template file. Instead, you need to add this code snippet:

function pco_add_after_customer_details() {
    do_action( 'woocommerce_checkout_after_customer_details' );
}
add_action( 'pco_wc_after_snippet', 'pco_add_after_customer_details' );

To get the functions exemplified in this section to work you need to add the code to your theme’s functions.php. You can add it as its own plugin or through the Code Snippets plugin, or something similiar of your choice.