• Resolved JK123

    (@zealoapparel)


    Hi,

    I found out today that orders have been placed on my site and Stripe hasn’t been taking payment so they have auto-cancelled.

    After some research I think this has been caused by a cache plugin I had installed; I hadn’t excluded the checkout page.
    I’ve since removed the plugin but the issue persists.
    I reactivated it, excluded the checkout page, cleared the cache, and uninstalled it again.
    I deleted the cache files mentioned in the cache plugin via cpanel, but I don’t know what else to do to revert the caching or solve this problem.

    Any help would be greatly appreciated!

    Josie

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

    (@mbrsolution)

    Hi, since you have already checked your site in regards to the cache issue, have you also spoken to your host? They might have a cache system set up in your server.

    Regards

    Thread Starter JK123

    (@zealoapparel)

    Hi, thanks! I spoke to them and there is another cache system but I cleared it and turned it off and the problem’s still happening.

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, please check the following documentation to carry out a test transaction.

    You might also be interested in the following documentation to help you read your debug log file.

    Let me know how you go.

    Thank you

    • This reply was modified 7 years, 1 month ago by mbrsolution.
    Thread Starter JK123

    (@zealoapparel)

    Hi,

    I did a test transaction earlier today and it didn’t work. But a relative helped me identify that it was a problem with some php code for 30 day cookies. Removing that code makes it work, but I don’t know if I need the code for other functions.

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    But a relative helped me identify that it was a problem with some php code for 30 day cookies. Removing that code makes it work, but I don’t know if I need the code for other functions.

    Can you provide more information so that I can understand what you mean.

    Thank you

    Thread Starter JK123

    (@zealoapparel)

    Sure, removing this code from functions.php makes the order go through as normal.

    
    // Set cookie for new users
    add_action( 'init', 'set_newuser_cookie'); // Run when WordPress loads
    function set_newuser_cookie() {
    	
    	$cookie_value = $_SERVER["HTTP_REFERER"]; // Get URL the user came to your site for
    	
    	if ( !is_admin() && !isset($_COOKIE['origin'])) { // If not an admin or if cookie doesn't exist already
    		setcookie( 'origin', $cookie_value, time()+3600*24*30, COOKIEPATH, COOKIE_DOMAIN, false); // Set cookie for 30 days
    	}
    }
    // Check cookie when order made and add to order
    add_action('woocommerce_checkout_update_order_meta', 'add_referral_meta'); // Run when an order is made in WooCommerce
    function add_referral_meta( $order_id, $posted ){
    	$ref_url = $_COOKIE['origin']; // Get the cookie
        update_post_meta( $order_id, 'referrer', $ref_url ); // Add to order meta
    }
    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, was that function added for WooCommerce plugin? Are you running our plugin separately to WooCommerce plugin?

    If you think removing this function can affect you in any way, you should contact WooCommerce developers. However as you have already found out this function causes an issue with our plugin.

    Kind regards

    Thread Starter JK123

    (@zealoapparel)

    I have the WooCommerce Stripe Gateway plugin and the WooCommerce plugin.

    I have no idea where that function came from I’m afraid, but if it’s not associated with Stripe I’ll look into it elsewhere.

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, well the good news is that your issue with our plugin is resolved πŸ™‚

    You can mark this thread as resolved if you don’t need any more help with your issue and our plugin.

    Kind regards

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    You might have confused our plugin with WooCommerce Stripe Payment Gateway – https://wordpress.org/plugins/woocommerce-gateway-stripe/

    Thread Starter JK123

    (@zealoapparel)

    Oh, so sorry! I didn’t know there were different ones.

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    No problem. Though you might want to notify the devs of the issue you had, perhaps it could be fixed on their side.

    Thread Starter JK123

    (@zealoapparel)

    Ok, thanks!

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Problem with caching’ is closed to new replies.