• Resolved Jax2

    (@jax2)


    After 2 days of adding products to my shop, I’ve noticed there are quite a few bottlenecks in woocommerce. One of my major issues is just how long it’s taking to switch pages in the backend, such as clicking on “back to categories” after editing a category and pretty much every other page.

    One thing that is really slowing me down however is that when I add a new product, I am automatically redirected to an edit product page for the product I just published. I’d REALLY like to skip this step and go directly to the add new product page again to continue.

    Any suggestions? I have tried a few different codes in functions.php that chatGPT suggested but with no luck. Perhaps my google search skills aren’t great, but I couldn’t find a plugin to achieve this either.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey there, @jax2! Thanks for contacting us. I’m happy to help you.

    After 2 days of adding products to my shop, I’ve noticed there are quite a few bottlenecks in woocommerce. One of my major issues is just how long it’s taking to switch pages in the backend, such as clicking on “back to categories” after editing a category and pretty much every other page.

    This is not expected behavior. Can you please take a look at this guide to see some possible solutions for a slow site?

    Let us know how it goes ??

    One thing that is really slowing me down however is that when I add a new product, I am automatically redirected to an edit product page for the product I just published. I’d REALLY like to skip this step and go directly to the add new product page again to continue.

    Do you mind clarifying this issue for us?

    The default behavior after publishing a product is to stay on the edit page of that product. Are you being redirected elsewhere?

    And do you mind sharing more details regarding your goal? Do you want to publish a product and automatically open a new product edit page?

    If so, you would need some complex custom code for that.

    While we can’t provide support for code customization as per our support policy, we do our best to offer advice and direct you to appropriate resources.

    You can visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there too.

    You can also check with Codeable, WooExperts or a local developer.

    Please let us know if there’s anything else we can do to help or if you have any questions.

    Have a wonderful day!

    Thread Starter Jax2

    (@jax2)

    Thank you for the reply – Yes, my ultimate goal is to have the add new product page redirect to another add new product page once I publish, without going to the edit page – will save me a LOT of time.

    As per the slowness, I am hosted on Dreamhost, and yes, it is a shared VPS and only has 1gb of ram. I have had another shop hosted there in the past and that was also slow using the basic storefront theme, so it could be them – I figured it was just one of the things that came with using the site. I may eventually look into a better host once I can afford to.

    Other than that, I will definitely check out the different options you provided to see if anyone could help me out with this. Thanks again.

    Hey, @jax2!

    I am hosted on Dreamhost, and yes, it is a shared VPS and only has 1gb of ram. I have had another shop hosted there in the past and that was also slow using the basic storefront theme, so it could be them – I figured it was just one of the things that came with using the site. I may eventually look into a better host once I can afford to.

    I understand. The guide has a few optimization options that can help with that while you are still with this host ??

    Please let us know if you have any questions about it or if we can help with anything else ??

    Have a wonderful day!

    Hi, @jax2!

    I ran a test with this code, and it works on my end. I added it as a snippet using a plugin.

    add_action( 'post_updated', 'redirect_to_add_new_product', 10, 3 );

    function redirect_to_add_new_product( $post_ID, $post_after, $post_before ) {
    // Check if the post type is 'product' and it's not an auto-save
    if ( $post_after->post_type === 'product' && $post_after->post_status === 'publish' && $post_before->post_status !== 'publish' ) {
    // Redirect to the Add New Product page
    wp_redirect( admin_url( 'post-new.php?post_type=product' ) );
    exit;
    }
    }

    If the product has not been published and you hit publish, it will take you to add a new one.

    Regarding the server’s speed, have you tried adding indexes to improve the database’s speed? A plugin like Index WP MySQL For Speed has worked for me. Docket cache can also help.

    Another option would be to upgrade your VPS.

    Please don’t hesitate to contact DreamHost with any questions to help you further.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.