Skip to content

Release testing instructions for WC Payments 3.2.0

Oleksandr Aratovskyi edited this page Oct 7, 2021 · 14 revisions

Prevent currency switcher to show when enabled currencies list is empty

Expected outcome

The currency switcher widget should be shown when WCPay is not set up or there is only one store currency enabled.

Testing instructions

  1. Create a new JN site.
  2. Install the WooCommerce plugin from the branch.
  3. Set the development mode with the Code Snippets plugin https://docs.woocommerce.com/document/payments/testing/dev-mode/#section-2.
  4. Install the Organic Goodness theme p1632844372035200/1631896155.144900-slack-C01B8KNUYSW.
  5. Add the following code to the theme template part organic-goodness/template-parts/header/menu-secondary.php
<?php if ( function_exists('wc_get_currency_switcher_markup') ) { ?>
    <li id="woocommerce-multi-currency-switcher" class="menu-item">
        <?php
            $instance = [
                'symbol' => true,
                'flag'   => false,
            ];
            echo wc_get_currency_switcher_markup( $instance, [] );
        ?>
    </li>
<?php } ?>
  1. Observe that no currency switcher widget is added (before WC Payments onboarding is passed and MC is set up).
  2. Pass WC Payments onboarding and enable Multi-Currency (add at least one currency except store currency).
  3. Observe that currency switcher widget is now added.
  4. Remove all the currencies except store currency. Switcher widget should not be added to the theme header.
Clone this wiki locally