Forum Replies Created

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter simplevendor

    (@simplevendor)

    Our host has also been looking into the performance issue and said that the database interactions appear in the slow log, not sure if there’s a way to optimize the table or re-build it with the correct keys if any are missing?

    Here is what they said:

    The above slow log indicates that the time-consuming operations are primarily related to database interactions and bulk processing of posts. Optimizing database performance and reviewing the efficiency of these functions could help improve speed.

    You may consider involving a developer to look into the database optimization & the woocommerce functions involved.

    Here are the entries in the log:

    script_filename = /wp-admin/edit.php
    mysqli_query() /wp-includes/class-wpdb.php:2344
    _do_query() /wp-includes/class-wpdb.php:2258
    query() /wp-includes/class-wpdb.php:3026
    get_var() /wp-content/plugins/woocommerce/includes/wc-term-functions.php:490
    _wc_term_recount() /wp-includes/taxonomy.php:3566
    wp_update_term_count_now() /wp-includes/taxonomy.php:3549
    wp_update_term_count() /wp-includes/post.php:7910
    _update_term_count_on_transition_post_status() /wp-includes/class-wp-hook.php:324
    apply_filters() /wp-includes/class-wp-hook.php:348
    do_action() /wp-includes/plugin.php:517
    do_action() /wp-includes/post.php:5521
    wp_transition_post_status() /wp-includes/post.php:4781
    wp_insert_post() /wp-includes/post.php:4993
    wp_update_post() /wp-admin/includes/post.php:703
    bulk_edit_posts() /wp-admin/edit.php:194
    Thread Starter simplevendor

    (@simplevendor)

    Here is the Gist link: https://gist.github.com/phpdevop/a1fb0da3c9a8f02e91e11414a72647ba

    I manually selected 20 products and then went to Bulk Actions > Edit and set the sales price. It took about 45 seconds to complete the process.

    Thread Starter simplevendor

    (@simplevendor)

    Thanks for the feedback, here’s some more details:

    1. Our server was currently set to use 4032M for memory_limit and 1000 for max_execution_time. This seems like a good amount over default. Our server has 8G of Ram and we never really max out the CPU.
    2. Why would a plugin work more efficiently than the default bulk edit built into WordPress? I can look into that third-party plugin.
    3. We currently use the default databaes tables and indexes for wordpress and woocommerce and have also use the Index WP MySQL for Speed plugin that adds in high performance indexing. In either case the response time is pretty slow while doing bulk edits.
    4. On the staging site we only have WordPress and Woocommerce enabled. The theme is also the standard 2024 theme.

    As a temporary fix, I was able to get the error to go away by commenting out the alert[‘is_silent’] array and returning false instead. Hopefully a real fix is made soon, here is what I replaced in the file “/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php” on line 735:

    function ( $alert ) {
    // We don’t want to show silent alerts
    // return ! $alert[‘is_silent’];
    return false;
    }

    Doesn’t look like there is a fix for this yet since we are receiving these notices also. We are using PHP 8.2, I was able to get the messages to go away by declaring all the variables above the __construct in the file “/woocommerce-gateway-affirm/includes/class-wc-gateway-affirm.php“. Like this:

    public $public_key;
    public $private_key;
    public $public_key_ca;
    public $private_key_ca;
    public $region;
    public $debug;
    public $testmode;
    public $auth_only_mode;
    public $checkout_mode;
    public $cancel_url;
    public $custom_cancel_url;
    public $promo_id;
    public $affirm_color;
    public $show_learnmore;
    public $enhanced_analytics;
    public $show_fee;
    public $category_ala;
    public $product_ala;
    public $product_ala_options;
    public $cart_ala;
    public $min;
    public $max;
    public $inline;
    public $partial_capture;
    public $use_site_language;
    
    public function __construct() {
    Thread Starter simplevendor

    (@simplevendor)

    We do not have a nexus in Colorado, only Florida. We also never setup a TaxJar account directly, we just installed the Woocommerce Tax plugin and connected it to our WordPress.com account.

    Thread Starter simplevendor

    (@simplevendor)

    Here is how its set currently

    Thread Starter simplevendor

    (@simplevendor)

    I just ran two tests, one with the Priority set to 0 and again with the Priority set to 1. In both cases the checkout rate that is returned overwrites the 0% that I enter into the admin area and the tax is calculated in the cart.

    Thread Starter simplevendor

    (@simplevendor)

    1. The checkout url is here: https://www.geosreef.com/checkout/ You will need to add a product to the cart first.
    2. The main site url is https://www.geosreef.com
    Thread Starter simplevendor

    (@simplevendor)

    The only thing I can guess is the shop address isn’t completely entered under WooCommerce > Settings > General, only the state and zip code are entered. Does WooCommerce Tax need the full address or is just state and zip code work? It has worked fine in the past, but just now seems to be calculating Colorado rates.

    Thread Starter simplevendor

    (@simplevendor)

    Yes I also deleted all the rows under “Standard” tax rate and created a single row. That row had US – CO – all zips and all cities – 0% for the tax rate – and a priority of 100. When I go to checkout and enter a Colorado shipping address, the logs show that the rate was zero, then it updates the row with the returned tax rate, and charges tax in the cart. Going back into the “Standard” tax rate table, that 0% now shows the returned tax rate.

    Thread Starter simplevendor

    (@simplevendor)

    I removed all rates under “Standard” tax rates like the guide suggested. When I then go to checkout and enter in a Colorado shipping address, it calculates a tax amount and saves a tax percent to the “Standard” tax rate area.

    Where does WooCommerce get the data for if a store sells over $100,000 in revenue? Looking at our orders, we are nowhere near the $100k limit.

    Thread Starter simplevendor

    (@simplevendor)

    Yes it does work, I just noticed the error in the log. Trying to get errors fixed to help with site performance.

    Thread Starter simplevendor

    (@simplevendor)

    Thanks I had the first option selected, I deactivated it and it did improve the speed.

    Thread Starter simplevendor

    (@simplevendor)

    Can both plugins be used at the same time also?

Viewing 15 replies - 1 through 15 (of 17 total)