kaitnicole
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Checkout taking 2+ minutes, orders automatically cancelledSorry about that guys. My apologies. Stef, I will try these things when I get home. All the overrides are in my child theme functions file though so wouldn’t they technically not interfere with the process if my child theme was disabled and twenty-nineteen was enabled?
Forum: Plugins
In reply to: [WooCommerce] Checkout taking 2+ minutes, orders automatically cancelledHi Stef,
Yes, on the live site we are restricting users to be registered. Our products are free but we are integrating WooCommerce with Ultimate Member so they don’t have to fill out their contact information every time they request a product (AKA make a “purchase”).
Feel free to log in with the following test credentials by clicking “login” in the navigation.
redacted
Then you can “complete checkout” by requesting to review a product in any of the categories.
We’ve disabled Ultimate Member on our dev site as well as legacy staging and also allowed guests to complete checkout, and unfortunately checkout is still taking a long while.
Thanks!
- This reply was modified 5 years, 10 months ago by Steven Stern (sterndata).
Forum: Plugins
In reply to: [WooCommerce] Checkout taking 2+ minutes, orders automatically cancelledGood morning,
Here’s the latest I heard from WPEngine.
Mandy (WP Engine Support)
Jun 4, 8:47 AM CDTHello Kaitlyn,
The 502s you are experiencing on the checkout occasionally are due to the page running too long and being killed by the server timeout. This doesn’t happen every time but it is apparent the page is quite slow and we’re able to replicate that consistently enough to test.
We enabled some additional logging but were unable to pull any useful information from there unfortunately.
So we copied the site over to legacy staging where we deactivated the theme and all plugins outside of WooCommerce but were still unable to get the checkout page to complete with any swiftness.
From these steps we’re able to determine this is related to WooCommerce, but it’s unclear as to why so you will want to follow up with their team for more info.
You can reach out to WooCommerce Support here.
I’ve generated the WooCommerce system status report for you here.
This response wasn’t as promising as I had hoped. Yesterday, a developer I know took a look at the site and his only advice was to downgrade to PHP 5.x because it didn’t require arguments to be passed. While I guess this could be a temporary solve (maybe?), it’s not something I want to do or know if it is possible to do. I always see people here being advised to upgrade to the latest PHP version so I’d rather not downgrade. WPEngine doesn’t even allow us to downgrade to anything below 7.
Is there anything else I can do? This site is a major improvement from our old site, but I’m afraid this issue makes things a lot worse since orders aren’t going through and taking a long time to process for our users. I don’t want to have to revert it to our previous system but it seems like the only option now ?? I just can’t understand what the issue is. I’ve spent hours researching what this error could be caused by and there isn’t even a commonality of those who have had similar issues in the past, which makes it difficult.
Thank you!
Forum: Plugins
In reply to: [WooCommerce] Checkout taking 2+ minutes, orders automatically cancelledHi Stef and Elvira,
Thanks again for your timely response! I have been on vacation so I apologize that I haven’t given you both an update. Here’s my report from Pingdom.
I keep testing on our dev site with all plugins disabled (except WooCommerce) as well as our theme… The order confirmation page still seems to take 30-60 seconds on the dev site (we do not get the 502 error on it), but obviously this is not ideal.
In my WooCommerce fatal error logs as well as in my error logs in WPEngine, I receive the following on the live site:
2019-06-03T13:52:25+00:00 CRITICAL Uncaught ArgumentCountError: Too few arguments to function wc_deliver_webhook_async(), 0 passed and exactly 2 expected in /nas/content/live/pupfluence/wp-content/plugins/woocommerce/includes/wc-webhook-functions.php:51 Stack trace: #0 [internal function]: wc_deliver_webhook_async() #1 /nas/content/live/pupfluence/wp-includes/class-wp-hook.php(286): call_user_func_array('wc_deliver_webh...', Array) #2 /nas/content/live/pupfluence/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #3 /nas/content/live/pupfluence/wp-includes/plugin.php(531): WP_Hook->do_action(Array) #4 /nas/content/live/pupfluence/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_Action.php(22): do_action_ref_array('woocommerce_del...', Array) #5 /nas/content/live/pupfluence/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_Abstract_QueueRunner.php(59): ActionScheduler_Action->execute() #6 /nas/content/live/pupfluence/wp-content/plugins/woocomme in /nas/content/live/pupfluence/wp-content/plugins/woocommerce/includes/wc-webhook-functions.php on line 51
Here’s my wc-webhook-functions.php file:
<?php /** * WooCommerce Webhook functions * * @package WooCommerce/Functions * @version 3.3.0 */ defined( 'ABSPATH' ) || exit; /** * Process webhook delivery. * * @since 3.3.0 * @param WC_Webhook $webhook Webhook instance. * @param array $arg Delivery arguments. */ function wc_webhook_process_delivery( $webhook, $arg ) { // Webhooks are processed in the background by default // so as to avoid delays or failures in delivery from affecting the // user who triggered it. if ( apply_filters( 'woocommerce_webhook_deliver_async', true, $webhook, $arg ) ) { $queue_args = array( 'webhook_id' => $webhook->get_id(), 'arg' => $arg, ); $next_scheduled_date = WC()->queue()->get_next( 'woocommerce_deliver_webhook_async', $queue_args, 'woocommerce-webhooks' ); // Make webhooks unique - only schedule one webhook every 10 minutes to maintain backward compatibility with WP Cron behaviour seen in WC < 3.5.0. if ( is_null( $next_scheduled_date ) || $next_scheduled_date->getTimestamp() >= ( 600 + gmdate( 'U' ) ) ) { WC()->queue()->add( 'woocommerce_deliver_webhook_async', $queue_args, 'woocommerce-webhooks' ); } } else { // Deliver immediately. $webhook->deliver( $arg ); } } add_action( 'woocommerce_webhook_process_delivery', 'wc_webhook_process_delivery', 10, 2 ); /** * Wrapper function to execute the <code>woocommerce_deliver_webhook_async</code> cron. * hook, see WC_Webhook::process(). * * @since 2.2.0 * @param int $webhook_id Webhook ID to deliver. * @throws Exception If webhook cannot be read/found and $data parameter of WC_Webhook class constructor is set. * @param mixed $arg Hook argument. */ function wc_deliver_webhook_async( $webhook_id, $arg ) { $webhook = new WC_Webhook( $webhook_id ); $webhook->deliver( $arg ); } add_action( 'woocommerce_deliver_webhook_async', 'wc_deliver_webhook_async', 10, 2 ); /** * Check if the given topic is a valid webhook topic, a topic is valid if: * * + starts with <code>action.woocommerce_</code> or <code>action.wc_</code>. * + it has a valid resource & event. * * @since 2.2.0 * @param string $topic Webhook topic. * @return bool */ function wc_is_webhook_valid_topic( $topic ) { $invalid_topics = array( 'action.woocommerce_login_credentials', 'action.woocommerce_product_csv_importer_check_import_file_path', 'action.woocommerce_webhook_should_deliver', ); if ( in_array( $topic, $invalid_topics, true ) ) { return false; } // Custom topics are prefixed with woocommerce_ or wc_ are valid. if ( 0 === strpos( $topic, 'action.woocommerce_' ) || 0 === strpos( $topic, 'action.wc_' ) ) { return true; } $data = explode( '.', $topic ); if ( ! isset( $data[0] ) || ! isset( $data[1] ) ) { return false; } $valid_resources = apply_filters( 'woocommerce_valid_webhook_resources', array( 'coupon', 'customer', 'order', 'product' ) ); $valid_events = apply_filters( 'woocommerce_valid_webhook_events', array( 'created', 'updated', 'deleted', 'restored' ) ); if ( in_array( $data[0], $valid_resources, true ) && in_array( $data[1], $valid_events, true ) ) { return true; } return false; } /** * Check if given status is a valid webhook status. * * @since 3.5.3 * @param string $status Status to check. * @return bool */ function wc_is_webhook_valid_status( $status ) { return in_array( $status, array_keys( wc_get_webhook_statuses() ), true ); } /** * Get Webhook statuses. * * @since 2.3.0 * @return array */ function wc_get_webhook_statuses() { return apply_filters( 'woocommerce_webhook_statuses', array( 'active' => __( 'Active', 'woocommerce' ), 'paused' => __( 'Paused', 'woocommerce' ), 'disabled' => __( 'Disabled', 'woocommerce' ), ) ); } /** * Load webhooks. * * @since 3.3.0 * @throws Exception If webhook cannot be read/found and $data parameter of WC_Webhook class constructor is set. * @param string $status Optional - status to filter results by. Must be a key in return value of @see wc_get_webhook_statuses(). @since 3.5.0. * @param null|int $limit Limit number of webhooks loaded. @since 3.6.0. * @return bool */ function wc_load_webhooks( $status = '', $limit = null ) { $data_store = WC_Data_Store::load( 'webhook' ); $webhooks = $data_store->get_webhooks_ids( $status ); $loaded = 0; foreach ( $webhooks as $webhook_id ) { $webhook = new WC_Webhook( $webhook_id ); $webhook->enqueue(); $loaded ++; if ( ! is_null( $limit ) && $loaded >= $limit ) { break; } } return 0 < $loaded; } /** * Get webhook. * * @param int|WC_Webhook $id Webhook ID or object. * @throws Exception If webhook cannot be read/found and $data parameter of WC_Webhook class constructor is set. * @return WC_Webhook|null */ function wc_get_webhook( $id ) { $webhook = new WC_Webhook( $id ); return 0 !== $webhook->get_id() ? $webhook : null; } /** * Get webhoook REST API versions. * * @since 3.5.1 * @return array */ function wc_get_webhook_rest_api_versions() { return array( 'wp_api_v1', 'wp_api_v2', 'wp_api_v3', ); }
Line 51 starts with:
function wc_deliver_webhook_async( $webhook_id, $arg ) { $webhook = new WC_Webhook( $webhook_id ); $webhook->deliver( $arg ); } add_action( 'woocommerce_deliver_webhook_async', 'wc_deliver_webhook_async', 10, 2 );
Perhaps there is an issue with the file above? I’m not sure how that could be though.
Again, thanks for y’all’s help!
- This reply was modified 5 years, 10 months ago by kaitnicole.
Forum: Plugins
In reply to: [WooCommerce] Checkout taking 2+ minutes, orders automatically cancelledHi Elvira and Stef.
I appreciate both of your responses! I contacted WPEngine again with these findings and suggestions. Before reaching out to them, I had already tested by disabling all plugins and also tested using the twentynineteen theme. Checkout is still taking 60+ seconds after doing both of these things. A senior rep from WPEngine also tried disabling all plugins as well as theme and told me that things started moving more quickly when they disabled my child theme (I use Salient). However, when I tried doing this myself, things took even longer, including while using the twentynineteen theme.
I’m seriously at a loss here. When I test in dev, orders DO go through, but it’s taking a minute or longer each time I place an order. On the live site, orders are only going through a third of the time and we’re seeing the 504 error in the console when they do not go through.
Thanks again,
KaitlynForum: Plugins
In reply to: [WooCommerce] Checkout taking 2+ minutes, orders automatically cancelledHi Stef,
Thanks for this info! I’ve been talking with WPEngine almost every day for the past week (yikes!), but I will reach out again with these findings and make sure they have caching disabled on checkout pages. All payment methods are switched do disabled. Fingers crossed they can solve this for me! The 502 error definitely seems like it’s a server issue.
Kaitlyn
Forum: Plugins
In reply to: [WooCommerce] Checkout taking 2+ minutes, orders automatically cancelledHi again Elvira! I forgot to add the following to my response above:
We actually do not use a payment gateway as all of our products are actually free. Users do not have to enter in any payment information when checking out.
More specifically, we are using WooCommerce as a way for social media influencers to request to work with brands that interest them. Each brand is listed as a “product” and then the information influencers fill out at “checkout” is sent on to the brands and then the brand ships out their products to the influencers they want to work with. So while using our site, users are not prompted to enter in payment information — just contact information (name, email, phone, address). In the meantime though, I have prevented pending (AKA unpaid) orders from cancelling automatically by leaving the field blank (before it was set to 60 minutes).
Hope this helps! Again, I really appreciate your response and thank you for helping us get this figured out.
Forum: Plugins
In reply to: [WooCommerce] Checkout taking 2+ minutes, orders automatically cancelledHi Elvira,
I appreciate your timely response about this matter. I apologize for my delayed one! I am still messing with things on the dev environment on our site and I’ve come to a strange realization. I’m not sure if you’ve experienced anything similar or not, but I wanted to ask in case you or someone else has.
These issues started occurring about a week after we migrated our site to WPEngine. In WPEngine, we have the ability to create development and staging environments, so as I made my first post, I was waiting for the development environment of our site to be created. The development version of our site SHOULD be an exact replica of our live site. However, I am not getting the same errors — or any at all actually — on the development site. This is with all the same plugins and theme activated and without.
When I test the process on the development site, I am able to submit orders and not get an error. The orders actually process and go from “Pending” to “Processing” rather quickly. Also, on the development site, I don’t receive the error like users do on the live site.
Here are the error logs in WooCommerce we receive if an order does not go through on the live site.
2019-05-30T05:32:44+00:00 CRITICAL Uncaught ArgumentCountError: Too few arguments to function wc_deliver_webhook_async(), 0 passed and exactly 2 expected in /nas/content/live/pupfluence/wp-content/plugins/woocommerce/includes/wc-webhook-functions.php:51 Stack trace: #0 [internal function]: wc_deliver_webhook_async() #1 /nas/content/live/pupfluence/wp-includes/class-wp-hook.php(286): call_user_func_array('wc_deliver_webh...', Array) #2 /nas/content/live/pupfluence/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #3 /nas/content/live/pupfluence/wp-includes/plugin.php(531): WP_Hook->do_action(Array) #4 /nas/content/live/pupfluence/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_Action.php(22): do_action_ref_array('woocommerce_del...', Array) #5 /nas/content/live/pupfluence/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_Abstract_QueueRunner.php(59): ActionScheduler_Action->execute() #6 /nas/content/live/pupfluence/wp-content/plugins/woocomme in /nas/content/live/pupfluence/wp-content/plugins/woocommerce/includes/wc-webhook-functions.php on line 51 2019-05-30T11:57:05+00:00 CRITICAL Uncaught ArgumentCountError: Too few arguments to function wc_deliver_webhook_async(), 0 passed and exactly 2 expected in /nas/content/live/pupfluence/wp-content/plugins/woocommerce/includes/wc-webhook-functions.php:51 Stack trace: #0 [internal function]: wc_deliver_webhook_async() #1 /nas/content/live/pupfluence/wp-includes/class-wp-hook.php(286): call_user_func_array('wc_deliver_webh...', Array) #2 /nas/content/live/pupfluence/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #3 /nas/content/live/pupfluence/wp-includes/plugin.php(531): WP_Hook->do_action(Array) #4 /nas/content/live/pupfluence/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_Action.php(22): do_action_ref_array('woocommerce_del...', Array) #5 /nas/content/live/pupfluence/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_Abstract_QueueRunner.php(59): ActionScheduler_Action->execute() #6 /nas/content/live/pupfluence/wp-content/plugins/woocomme in /nas/content/live/pupfluence/wp-content/plugins/woocommerce/includes/wc-webhook-functions.php on line 51
I do not receive errors in WooCommerce on the dev site as orders are going through.
Hi y’all! I’m also not seeing results with Yoast SEO for changing the title of the portfolio page. I’m not using my portfolio page as the homepage and the plugin is still not overriding the “portfolio entries archive” title.
Any tips?
Forum: Plugins
In reply to: [Easy Photography Portfolio] Can’t Configure PluginHi Norris! Thanks so much for getting back to me. Surprisingly, all it took was disabling and reactivating the plugin to get it to work and override the other portfolio. Weird how that works, but I’m glad it’s working how it should now! ??