-
Notifications
You must be signed in to change notification settings - Fork 69
Release testing instructions for WC Payments 7.2.0
Dat Hoang edited this page Feb 2, 2024
·
3 revisions
Add the following snippet to the bottom of woocommerce-payments.php. Or you can use https://wordpress.org/plugins/code-snippets/ and add this snippet. This simulates another plugin making a request, with the session cookies, during login.
function do_api_call_w_cookies_on_wp_login() {
$url = rest_url();
$args = array(
'cookies' => $_COOKIE,
'blocking' => false,
'timeout' => 0.01,
'sslverify' => apply_filters( 'https_local_ssl_verify', false ),
);
$result = wp_remote_get( $url, $args );
}
add_action( 'wp_login', 'do_api_call_w_cookies_on_wp_login' );
- Ensure "Allow customers to log into an existing account during checkout" is enabled at WooCommerce > Settings > Accounts & Privacy
- Ensure you're not logged into the store (or use a private browser session)
- Add an item to your cart and go to the checkout page
- Use the
Returning customer? Click here to login
option and login - Expectation: the cart is NOT empty.
- Expectation: if this user has already had other active products in the cart before log-in, the final cart after log-in should merge these products and the product you've added in.
- Enable account creation during checkout in the WooCommerce settings
- Without logging in, add a product to cart and go to the checkout page
- Fill out the checkout form and use a test card that requires authentication (such as
4000002500003155
or4000 0027 6000 3184
), don't forget to check the account creation checkbox - Submit the order and authorize it
- Expectation: The order should be paid successfully.