✅"; } else { echo " ❌"; } } function check_woo_api_v2_uri( &$http_status, &$content_type ) { $ch = curl_init(); $curlConfig = array( CURLOPT_URL => BEANS_WOO_API_ENDPOINT, CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_CONNECTTIMEOUT => 30, CURLOPT_TIMEOUT => 80 ); curl_setopt_array( $ch, $curlConfig ); curl_exec( $ch ); $http_status = curl_getinfo( $ch, CURLINFO_HTTP_CODE ); $content_type = curl_getinfo( $ch, CURLINFO_CONTENT_TYPE ); curl_close( $ch ); return in_array($http_status, [200, 503]); // && strpos( $content_type, 'application/json' ) !== false } function check_woo_api_v2_auth( &$http_status, &$content_type ) { $ch = curl_init(); $curlConfig = array( CURLOPT_URL => BEANS_WOO_API_AUTH_ENDPOINT, CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_CONNECTTIMEOUT => 30, CURLOPT_TIMEOUT => 80 ); curl_setopt_array( $ch, $curlConfig ); curl_exec( $ch ); $http_status = curl_getinfo( $ch, CURLINFO_HTTP_CODE ); $content_type = curl_getinfo( $ch, CURLINFO_CONTENT_TYPE ); curl_close( $ch ); return in_array($http_status, [401, 503]) && strpos( $content_type, 'text/html' ) !== false; } $woo_version = plugin_version( 'woocommerce' ); $woo_version_supported = '3.0.0'; $woo_is_supported = version_compare( $woo_version, $woo_version_supported ) >= 0; global $wp_version; $wp_version_supported = '4.5.0'; $wp_is_supported = version_compare( $wp_version, $wp_version_supported ) >= 0; $php_version = phpversion(); $php_version_supported = '5.6.0'; $php_is_supported = version_compare( $php_version, $php_version_supported ) >= 0; $curl_is_supported = function_exists( 'curl_init' ); $json_is_supported = function_exists( 'json_decode' ); $permalink_is_supported = ! is_null( get_option( 'permalink_structure' ) ); $wp_permalink_is_supported = ! is_null(get_option('permalink_structure')); $beans_is_supported = $woo_is_supported && $wp_is_supported && $php_is_supported && $curl_is_supported && $json_is_supported && $permalink_is_supported && $wp_permalink_is_supported; $woo_api_v2_uri_http_status = null; $woo_api_v2_uri_content_type = null; $woo_api_v2_uri_is_up = $beans_is_supported ? check_woo_api_v2_uri( $woo_api_v2_uri_http_status, $woo_api_v2_uri_content_type ) : null; $beans_is_supported = $woo_api_v2_uri_is_up; $woo_api_v2_auth_http_status = null; $woo_api_v2_auth_content_type = null; $woo_api_v2_auth_is_up = $beans_is_supported ? check_woo_api_v2_auth( $woo_api_v2_auth_http_status, $woo_api_v2_auth_content_type ) : null; $beans_is_supported = $woo_api_v2_auth_is_up; $admin = wp_get_current_user(); $country_code = get_option('woocommerce_default_country'); if($country_code && strpos($country_code, ':') !== false){ try { $country_parts = explode( ':', $country_code ); $country_code = $country_parts[0]; }catch(\Exception $e){} } $force = isset( $_GET['force_beans'] ); $connect = "https://". Helper::getDomain( 'CONNECT' ). "/cms/woocommerce/".static::$app_name."/connect/"; if (static::$app_name == 'ultimate') { $connect = "https://". Helper::getDomain( 'CONNECT' ). "/radix/woocommerce/connect"; } ?>
Beans leverages WooCommerce REST API to supercharge your online store with powerful fonctionnalites .
WooCommerce Version:
Please update your WooCommerce plugin: How to update WooCommerce
Wordpress Version:
Please upgrade your Wordpress: Upgrading Wordpress
PHP Version:
Contact your web host to update your PHP: Learn more on PHP Update
CURL Supported:
Contact your web host to enable CURL support.
JSON Supported:
Contact your web host to enable JSON support.
Permalink Enabled:
Please enable Permalinks: How to enable Permalink
WordPress Permalink Enabled:
Please enable pretty permalink: How to enable pretty permalink
WooCommerce API V2 URI Test:
Unable to connect to the API using endpoint:
HTTP Status:
Content Type:
Please:
Contact the Beans Team for
assistance.
Attach a screenshot of this page to your email.
WooCommerce API V2 Authentication Test:
Unable to connect to the API using authentication endpoint:
HTTP Status:
Content Type:
Please:
Contact the Beans Team for
assistance.
Attach a screenshot of this page to your email.