Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter lhornaday

    (@lhornaday)

    This issue has been resolved. The fix is described below and may be helpful to plugin developers.

    I reluctantly admit the problem was my own creation. I didn’t see my plugin as an issue because it has been in use for years and it threw no errors or warnings. The problem only occurred with asynchronous loading, such as with JSON data.

    I had to change the way I check if WooCommerce is active. I now use this to ensure the WooCommerce instance is not null. Checking the existence of the class is no longer enough.

    // Bail if WooCommerce is not enabled.
    if ( ! class_exists( 'WooCommerce' ) || ! function_exists( 'WC' ) ) {
     return false;
    }	
    
    // Get the WooCommerce instance.
    $woocommerce = WC();
    
    // Bail if WooCommerce instance is null.
    if ( is_null( $woocommerce ) ) {
     return false;
    }

    Additionally, I had to remove some custom usage related to the woocommerce_prevent_admin_access filter. Something in the asynchronous processes requires access to load the payment form.

    The biggest breakthrough was tracking down the transient that controls the form loading (_transient_timeout_wcpay_locale_info). Removing the timestamp helped me recreate the problem instantly instead of waiting 24 hours. That’s why it would work correctly for everyone if I had recently loaded the form.

    Thanks so much for the assistance, Luke.

    Thread Starter lhornaday

    (@lhornaday)

    Thank you both. I’ve completed the cache-clearing steps, as well as a complete plugin removal and fresh download and install. It seems to be working; however, it is usually 12-24 hours before the form ceases to load.

    I would highly appreciate the info if there is a specific cache that could be cleared to speed up debugging. I’ll provide a full list of steps completed once it is confirmed to be working.

    Thread Starter lhornaday

    (@lhornaday)

    I just noticed a JS error when the form doesn’t load properly. This is from within a private Firefox window and not logged in.

    Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    
    wp-content/plugins/woocommerce-payments/dist/checkout.js?ver=7.4.0:1

    If I view the form in another browser session while logged in, there is no error. Then I return to the private window and the error is removed and the form loads properly.


    I will report back after doing a fresh install and tranisitiong over to using blocks instead of shortcodes for the checkout process.

    • This reply was modified 1 week, 4 days ago by lhornaday.
    Forum: Plugins
    In reply to: [Gutenberg] Remove duotone
    Thread Starter lhornaday

    (@lhornaday)

    Thank you, but I’m needing to completely remove the features from Gutenberg. They have no effect on the frontend.

    Forum: Plugins
    In reply to: [Gutenberg] Remove duotone
    Thread Starter lhornaday

    (@lhornaday)

    Any help would be appreciated. This feature doesn’t work on the frontend and I can’t find any documentation.

    Forum: Plugins
    In reply to: [Gutenberg] Remove duotone
    Thread Starter lhornaday

    (@lhornaday)

    Also looking to remove the new text over image button.

    Thread Starter lhornaday

    (@lhornaday)

    I found the problem. I forgot to disable my network plugins.

    AStickyPostOrderER caused the problem if it happens to anyone else.

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