• Resolved freq32

    (@freq32)


    first off, the problem is not live on the site, else we cannot take orders.

    we have a super-fast version of our homepage which works everywhere, even with woocommerce and other plugins, all the way until the checkout square payment window.. which twirls the spinner forever.

    The homepage is static, as we don’t need all the wp or woocommerce fragments or scripts until they come into the site.

    What’s the best method to please this plugin and have it not report errors missing fragment/405 code?

    thanks

    • This topic was modified 5 years, 9 months ago by freq32.
    • This topic was modified 5 years, 9 months ago by freq32.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter freq32

    (@freq32)

    If you can just give me the key fragment or script to add to the page to have this plugin functional that would be great. it somehow needs to post to the homepage possibly? but can’t that be done in ajax?

    or, perhaps use the shop URL on your end rather than the homepage?
    here’s that URL https://www.ikrusher.com/shop/

    • This reply was modified 5 years, 9 months ago by freq32.
    Thread Starter freq32

    (@freq32)

    I have it working. 3 steps.

    1. USING NGINX CONFIG:
    added the page rule for 405 errors:

    error_page 405 https://$host/index.php?$args;

    2. USING PHP:
    In the init wp index.php, made a URI query:

    $uri = $_SERVER['REQUEST_URI'];
    if($uri == '/') 
    { ?> 
    
    //do a song and dance here
    
    <?php 
    
    define( 'WP_USE_THEMES', false );
    $wp_did_header = true;
    require_once __DIR__ . '/wp-load.php';
    wp();
    
    } elseif ($uri != '/') 
    { 
    
    // do the norm stuff in index.php

    3. in wordpress set your static homepage as a pure blank slate, loading nada

    • This reply was modified 5 years, 9 months ago by freq32.
    Plugin Support slash1andy

    (@slash1andy)

    Automattic Happiness Engineer

    Hey there!

    Sorry that it took so long for a response, but glad you got it sorted!

    Have a great one!

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

The topic ‘Static Homepage – Square disabled only on home’ is closed to new replies.