Forum Replies Created

Viewing 15 replies - 1 through 15 (of 27 total)
  • Thread Starter EasyEl

    (@easyel)

    Femi,

    correct but super important as the plugin/mollie will fail due to this. Mollie did not communicate the change.

    Long story short: the two new IPs were getting auto-blocked by Cloudflare. I added them to the whitelist and it works. Just as an info for you in case you get more requests like this.

    Best, El

    Thread Starter EasyEl

    (@easyel)

    It seems like you added new source IPs to your server list.

    34.90.108.3

    34.147.124.17

    Those were not in the old list and have been blocked by Cloudflare. Can we get a notification if you add / alter the source server IP′s?

    Thread Starter EasyEl

    (@easyel)

    Femi, debugged and the return url is there. The order manipulation still does not work. How can we share the Logs securely with you?

    Thread Starter EasyEl

    (@easyel)

    We switched on logging but downgraded to 7.8.0, so you will probably have to wait for other reports. Your support mentioned that the webhook_url is empty, but we have kept everything the same on our end. The webhook_url is obviously essential, but I presume that this can only be set via the API and is not plugin-related. Best, Elmar

    Yes, the error is insufficeient testing by the dev team. Downgrade to last version and it will work ??

    Same date. Same issue. The plugin is broken currently.

    Yes, same issue. Mollie needs to re-eval their quality testing.

    Mollie seems to have one of the worst testing setups possible. Same issue. No idea on how things like that can slip through to production. Crazy.

    Thread Starter EasyEl

    (@easyel)

    Hi Sasa,

    I got it to work – appreciate the feedback! Actually most of the issues I had where caused by GDPR consent plugins even when cookies were set to essential. Not sure what causes this but there is definitely a challenge to implement sich together with cookies/caching.

    Best,
    El

    Thread Starter EasyEl

    (@easyel)

    Hi Sasa,

    it is literally “woocommerce_current_currency” that stores the value. I would also like to exclude

    aelia_cs_selected_currency
    aelia_customer_country
    aelia_customer_state
    aelia_billing_country
    aelia_tax_exempt

    Cookies from being cached.

    Best,
    Elmar

    Thread Starter EasyEl

    (@easyel)

    Sasa,

    yes it is an official plugin from Aelia. I added the code and it does appear in the error log. So it seems to load but not work properly.

    Best,
    Elmar

    Thread Starter EasyEl

    (@easyel)

    And yes, there is an entry for it in wp-cache-config.php:

    $wpsc_plugins = array ( 0 => 'wp-content/wpsc-plugins/aelia-wpsupercache-ac-plugin.php', );
    $wp_cache_mobile_groups = '';
    $wp_cache_debug_username = 'XXX';
    $wp_cache_home_path = '/';
    $wp_cache_slash_check = 1;
    $cache_page_secret = 'XXX';
    $cache_time_interval = '600';
    if ( ! defined('WPCACHEHOME') )
    	define( 'WPCACHEHOME', WP_CONTENT_DIR . "/plugins/wp-super-cache/" );
    Thread Starter EasyEl

    (@easyel)

    Sasa, very helpful. I initialized with the init code in functions and can confirm that the plugin does not load. File and directory permissions are 755. Below is the plugin code. I checked for the Global in the last line – it is not set. No errors in log.

    Plugin Code:

    <?php
    /**
     * Extends WP Super Cache to allow it to work correctly with Aelia Internationalisation
     * solutions.
     *
     * @author Aelia <[email protected]>
     */
    class Aelia_Internationalisation_WPSuperCache {
    	const VERSION = '1.0.1.160401';
    
    	// @var Aelia_Internationalisation_SuperCache The class instance
    	protected static $instance;
    
    	// @var string The cache key that Super Cache should use to retrieve the cached content
    	protected $cache_key;
    
    	// @var array A list of the cookies that should be processed to build the cache key
    	protected function expected_cookies() {
    		return array(
    			'aelia_cs_selected_currency',
    			'aelia_customer_country',
    			'aelia_customer_state',
    			'aelia_billing_country',
    			'aelia_tax_exempt',
    		);
    	}
    
    	/**
    	 * Returns the cache key to be used by WP Super Cache. The key takes into account
    	 * elements such as the selected currency, customer's country, customer's
    	 * State/county, and so on.
    	 *
    	 * @return string
    	 */
    	protected function get_cache_key() {
    		$cache_key = '';
    		foreach($this->expected_cookies() as $cookie_name) {
    			if(!empty($_COOKIE[$cookie_name])) {
    				$cache_key .= $_COOKIE[$cookie_name];
    			}
    		}
    		return $cache_key;
    	}
    
    	/**
    	 * Class constructor.
    	 */
    	public function __construct() {
    		$this->cache_key = $this->get_cache_key();
    
    		// If one or more cookies are set by the Aelia internationalisation plugins,
    		// enable the callback that will set the cache key
    		if(!empty($this->cache_key)) {
    			add_cacheaction('wp_cache_key', array($this, 'wp_cache_key'), 10, 1);
    		}
    		else {
    			// Debug
    			//var_dump("NO COOKIES FOUND. ASSUMING FIRST TIME VISITOR AND DISABLING CACHE");
    			if(!defined('DONOTCACHEPAGE')) {
    				define('DONOTCACHEPAGE', true);
    			}
    		}
    	}
    
    	/**
    	 * Initialises the plugin.
    	 */
    	public static function init() {
    		self::$instance = new self();
    	}
    
    	/**
    	 * Extends the standard cache key with one that includes additional arguments,
    	 * such as customer's currency, country, state, etc.
    	 *
    	 * @param string $cache_key The original cache key passed by WP Super Cache.
    	 * @return string The updated cache key.
    	 */
    	public function wp_cache_key($cache_key) {
    		$cache_key .= (string)$this->cache_key;
    		// Debug
    		//var_dump("CACHE KEY FOR PAGE: {$cache_key}");
    		return $cache_key;
    	}
    }
    
    $GLOBALS['aelia-internationalisation-wpsupercache']

    = Aelia_Internationalisation_WPSuperCache::init();

    Thread Starter EasyEl

    (@easyel)

    Sasa,

    it does not seem to fire. Do you have demo code where to place the plugin call in the functions.php? Just paste the do_action without hook or filter like this?

    do_action( ‘wpsc_add_plugin’, ABSPATH . ‘wp-content/wpsc-plugins/aelia-wpsupercache-ac-plugin.php’ );

    Best,
    Elmar

    Thread Starter EasyEl

    (@easyel)

    Sasa,

    thank you. Is there a programmatic way to check wether the plugin was loaded?

    Best,
    Elmar

Viewing 15 replies - 1 through 15 (of 27 total)