Support » Plugin: Accept Stripe Payments » Cookie asp_transient_id

  • Resolved krenni

    (@krenni)


    Good morning!

    I am working on a site and I want to use this Plugin für donations.
    Unfortunately the plugin sets a cookie – on every page, not only on those where I am actually using it: asp_transient_id

    I could not find out, what it is used for: is it a functional cookie? Or is also data processed (tracking) like IP etc.? I need to know that out of GDPR issues.

    Is there an option or way to deactivate the cookie?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Hi, I have submitted a message to the developers to investigate further your issue/request.

    Kind regards.

    Plugin Author mra13

    (@mra13)

    This one cookie is needed for our plugin’s functionality with full compatibility with all the browsers and devices. So if your site cannot use a cookie then this plugin won’t be suitable for your project unfortunately 🙁

    Thread Starter krenni

    (@krenni)

    Okay, thx for the information!
    Yes, I can use cookies – but the question is:

    Is this Cookie according to the GDPR of the European Union only a “functional cookie” or is it a cookie that does some kind of tracking, submits IP Adresse or something like that.

    You know what I mean?

    Oliver Campion

    (@domainsupport)

    @krenni I also had the same question(s) as one of our clients uses this plugin and the Stripe payment is only required on one page. I do not accept that this cookie has to be dropped on every single page for the plugin to work because the plugin should work if a user just visits the one page!

    So I’ve looked at their code and can only find reference to the cookie in one place …

    	public function init() {
    		$cookie_transient_id = filter_input( INPUT_COOKIE, 'asp_transient_id', FILTER_SANITIZE_STRING );
    		if ( empty( $cookie_transient_id ) ) {
    			if ( ! headers_sent() ) {
    				$cookiepath    = ! defined( 'COOKIEPATH' ) ? '/' : COOKIEPATH;
    				$cookie_domain = ! defined( 'COOKIE_DOMAIN' ) ? false : COOKIE_DOMAIN;
    				setcookie( 'asp_transient_id', $this->get_transient_id(), time() + 604800, $cookiepath, $cookie_domain );
    			}
    		} else {
    			$this->transient_id = $cookie_transient_id;
    		}
    		$this->trans_name = 'asp_session_data_' . $this->get_transient_id();
    	}

    I suspect that they want this on every page so that the cookie has more chance of being reset and therefore kept by the browser.

    In our client’s use, however, payments will be made very rarely so it’s highly unlikely that the visitor’s cookie would still be in the browser’s cache.

    So we decided to block the plugin from loading except for on admin pages and on the page we have a payment button on. We’ve done that by creating a “Must-Use” plugin located in /wp-content/mu-plugins/deactivate-stripe-payments-plugin.php as follows …

    <?php
    /*
     * Plugin Name: Deactivate Stripe Payments Plugin
     * Version: 1.0.0
     * Description: Deactivates Stripe Payments plugin on all but specific pages
     * Author: webd.uk
     * Author URI: https://webd.uk
     */
    
    
    
    if (!defined('ABSPATH')) {
        exit('This isn\'t the page you\'re looking for. Move along, move along.');
    }
    
    
    
    add_filter('option_active_plugins', 'deactivate_stripe_payments_option_active_plugins' );
    
    
    
    function deactivate_stripe_payments_option_active_plugins($plugins){
    
        if (
            false === strpos($_SERVER['REQUEST_URI'], '/my-payment-page/') &&
            !is_admin()
        ) {
    
            $key = array_search('stripe-payments/accept-stripe-payments.php', $plugins);
    
            if (false !== $key) {
    
                unset($plugins[$key]);
    
             }
    
        }
    
        return $plugins;
    
    }
    
    ?>
    

    I hope this helps you.

    Oliver

    Thread Starter krenni

    (@krenni)

    Nice! I will try it out – thx & greetings!

    Oliver Campion

    (@domainsupport)

    @krenni No problem. I’ve actually posted another support topic because I believe the developers have unanswered questions including the ones of yours above that have been missed.

    Plugin Author mra13

    (@mra13)

    Since the original post 6 months ago, we have reworked some of the code (over time). So I am in a position to be able to introduce a checkbox to disable the use of cookie for this plugin.

    I have just released an update to the plugin where you will find a new checkbox labelled “Don’t Use Cookie” in the Advanced Settings menu of the plugin. This should resolve the issue for you. Let me know if this works for you.

    Note: If there was a cookie already there from before, it will need to be deleted from the browser to test the new option.

    Oliver Campion

    (@domainsupport)

    Excellent.

    I can confirm this works.

    Oliver

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Cookie asp_transient_id’ is closed to new replies.