• Resolved Dan

    (@dangoodman)


    After updating an existing installation to 8.0, the checkout page did not change. However, after installing WP + WC 8.0 (no other plugins) from scratch, I noticed the checkout page now uses WooCommerce Blocks. Both installations use the Twenty Twenty-Three theme.

    I could not find any mentions about switching to the blocks for checkout in the changelog, GitHub, and this support forum.

    Is that expected for new installations to use the blocks by default?

    What is the trigger of the switch: WC 8.0, WP 6.3, Twenty Twenty-Three 1.2, WooCommerce Blocks 10.8, or something else?

    What settings in the db control if blocks should become the default for a particular installation?

    Where I can find more information on what and when changed?

Viewing 7 replies - 1 through 7 (of 7 total)
  • For info, see my experience with related issue:

    https://www.ads-software.com/support/topic/woocommerce-unable-to-change-checkout-cart/#post-16963694

    I think trigger was WC 8.0, but like you I also upgraded to WP 6.3.

    Hi there @dangoodman ??

    Thank you for contacting Woo support, and for your patience! We are experiencing an unusually high volume of support requests at the moment, and that has affected our response times.

    WooCommerce blocks checkout by default after updating to 8.0

    What is the trigger of the switch: WC 8.0, WP 6.3, Twenty Twenty-Three 1.2, WooCommerce Blocks 10.8, or something else?

    From what I gather, you are reporting that on creating a fresh site, with only WordPress and WooCommerce installed, you are seeing WooCommerce Blocks being utilized in the Checkout page, instead of a shortcode.

    Just to be sure, I just spun up a fresh installation of WC v8.0.1 on LocalWP and by default the checkout page still used the shortcode and not a block. Here is a screenshot, for reference: https://d.pr/i/ce02D7

    I also updated an older site to v8.0.1 and the existing checkout shortcode the site was using remained in place.

    I also couldn’t seem to find any changes in the changelog related to the block checkout being set as default?

    https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/changelog.txt

    My recommendation would be that you can edit the Checkout page at your site, remove the block and instead add a shortcode block with the short code of?[woocommerce_checkout]within it.

    I hope this is helpful! Please let us know if you have any further questions or concerns.

    • This reply was modified 1 year, 3 months ago by anastas10s. Reason: provided an alternative
    Plugin Contributor Paulo Arromba

    (@pauloarromba)

    Hi @dangoodman I’m currently investigating this issue, and currently everything points to be an issue installing WP+WC at the same time, introducing templates for Cart and Checkout, but not having the initial shortcode pages to migrate the content into the templates (default templates are block based).

    Can you please provide steps you used for this, so I can test against a possible fix?

    However, after installing WP + WC 8.0 (no other plugins) from scratch

    Thread Starter Dan

    (@dangoodman)

    Ok, after fiddling around for a few hours, I have crafted a somewhat minimal reproducer.

    1. Create file docker-compose.yml:

    
    services:
        wp:
            container_name: wp
            image: wordpress:6.3.0-apache
            ports:
                - 80:80
            volumes:
                - ./setup:/setup
            entrypoint: /setup
    
        mysql:
            container_name: mysql
            image: mariadb
            environment:
                MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes
                MARIADB_DATABASE: WordPress
    

    2. Create file setup:

    
    #!/usr/bin/env bash
    set -Eeuo pipefail
    
    apt update
    apt install -y mariadb-client less
    
    curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
    chmod +x wp-cli.phar
    mv wp-cli.phar /usr/local/bin/wp
    
    wp() {
        command wp --allow-root "$@"
    }
    
    cd /var/www/html
    rm -rf -- *
    wp core download
    wp config create --dbname=wordpress --dbuser=root --dbpass= --dbhost=mysql
    wp core install --url=https://localhost --title='WP Staging' --admin_user=admin --admin_password=pass [email protected]
    wp option set blog_public 0
    wp plugin delete --all
    wp plugin install woocommerce
    wp plugin activate --all
    wp plugin install wordpress-importer --activate
    wp import ./wp-content/plugins/woocommerce/sample-data/sample_products.xml --authors=skip
    
    exec apache2-foreground
    

    3. Spell docker compose up in the folder with these two files. Wait for the setup to complete.

    4. Open https://localhost in a browser and add an item to the cart.

    5. Notice the cart and checkout pages are made of blocks.
    frontend: https://imgur.com/oS3dDnV https://imgur.com/VKwEpnt
    backend: https://imgur.com/gJ7zkge https://imgur.com/MltcfG1

    Thread Starter Dan

    (@dangoodman)

    It looks like WooCommerce relies on a particular order of events (e.g., post-install/post-activate hooks) to bootstrap correctly. But it fails to configure itself when those events are triggered in a different order or some of them are skipped, for example.

    Plugin Contributor Paulo Arromba

    (@pauloarromba)

    Thank you so much for the steps @dangoodman, I was able to reproduce the bug and a fix was released on the latest update (10.9.2)

    Thread Starter Dan

    (@dangoodman)

    @pauloarromba, great news! Thank you for the update.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WooCommerce blocks checkout by default after updating to 8.0’ is closed to new replies.