A number of recent versions of the Facebook for WooCommerce plugin retain an integration error that looks like this:

is_readable(): open_basedir restriction in effect. File(/includes/fbwpml.php) is not within the allowed path(s): (/home/:/tmp/)

The solution to the error is described on GitHub:

To fix, you need to make changes to the plugin file wp-content/plugins/facebook-for-woocommerce/includes/Integrations/Integrations.php

Open this file and find code like this:

$registered_integrations = array(
	'WC_Facebook_WPML_Injector' => '/includes/fbwpml.php',
	Bookings::class             => '/includes/Integrations/Bookings.php',
);

After the two arrows => add the text:

$this->plugin->get_plugin_path() . 

As a result, you will have code like this:

$registered_integrations = array(
	'WC_Facebook_WPML_Injector' => $this->plugin->get_plugin_path() . '/includes/fbwpml.php',
	Bookings::class             => $this->plugin->get_plugin_path() . '/includes/Integrations/Bookings.php',
);

Then save the file and replace the original plugin file with it.
Done. The error no longer appears.

Important: this change will have to be made manually after each update of the plugin version until the developers fix the error completely.

For other popular Facebook plugins for Wucommers, see the link.

Leave a comment

Your email address will not be published. Required fields are marked *