Merge branch 'master' into packages/env/clean-up-console
This commit is contained in:
commit
694aff70cb
|
@ -1871,6 +1871,10 @@ a.reset_variations {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
tfoot {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.woocommerce-order-received {
|
||||
|
|
|
@ -698,11 +698,11 @@ final class WC_Cart_Totals {
|
|||
/**
|
||||
* Subtotals are costs before discounts.
|
||||
*
|
||||
* To prevent rounding issues we need to work with the inclusive price where possible.
|
||||
* otherwise we'll see errors such as when working with a 9.99 inc price, 20% VAT which would.
|
||||
* To prevent rounding issues we need to work with the inclusive price where possible
|
||||
* otherwise we'll see errors such as when working with a 9.99 inc price, 20% VAT which would
|
||||
* be 8.325 leading to totals being 1p off.
|
||||
*
|
||||
* Pre tax coupons come off the price the customer thinks they are paying - tax is calculated.
|
||||
* Pre tax coupons come off the price the customer thinks they are paying - tax is calculated
|
||||
* afterwards.
|
||||
*
|
||||
* e.g. $100 bike with $10 coupon = customer pays $90 and tax worked backwards from that.
|
||||
|
|
|
@ -210,7 +210,7 @@ class WC_Cart extends WC_Legacy_Cart {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get subtotal.
|
||||
* Get subtotal_tax.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @return float
|
||||
|
|
|
@ -20,7 +20,7 @@ class WC_Payment_Tokens {
|
|||
* Gets valid tokens from the database based on user defined criteria.
|
||||
*
|
||||
* @since 2.6.0
|
||||
* @param array $args Query argyments {
|
||||
* @param array $args Query arguments {
|
||||
* Array of query parameters.
|
||||
*
|
||||
* @type string $token_id Token ID.
|
||||
|
|
|
@ -23,7 +23,7 @@ final class WooCommerce {
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
public $version = '5.0.0';
|
||||
public $version = '5.1.0';
|
||||
|
||||
/**
|
||||
* WooCommerce Schema version.
|
||||
|
|
|
@ -906,7 +906,14 @@ class WC_Order_Data_Store_CPT extends Abstract_WC_Order_Data_Store_CPT implement
|
|||
$this->prime_order_item_caches_for_orders( $order_ids, $query_vars );
|
||||
|
||||
foreach ( $query->posts as $post ) {
|
||||
$orders[] = wc_get_order( $post );
|
||||
$order = wc_get_order( $post );
|
||||
|
||||
// If the order returns false, don't add it to the list.
|
||||
if ( false === $order ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$orders[] = $order;
|
||||
}
|
||||
|
||||
return $orders;
|
||||
|
|
|
@ -651,7 +651,7 @@ function wc_get_product_id_by_sku( $sku ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get attibutes/data for an individual variation from the database and maintain it's integrity.
|
||||
* Get attributes/data for an individual variation from the database and maintain it's integrity.
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @param int $variation_id Variation ID.
|
||||
|
|
|
@ -3568,7 +3568,12 @@ function wc_empty_cart_message() {
|
|||
*/
|
||||
function wc_page_noindex() {
|
||||
if ( is_page( wc_get_page_id( 'cart' ) ) || is_page( wc_get_page_id( 'checkout' ) ) || is_page( wc_get_page_id( 'myaccount' ) ) ) {
|
||||
wp_no_robots();
|
||||
// Adds support for WP 5.7.
|
||||
if ( function_exists( 'wp_robots_no_robots' ) ) {
|
||||
wp_robots_no_robots();
|
||||
} else {
|
||||
wp_no_robots();
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action( 'wp_head', 'wc_page_noindex' );
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "woocommerce",
|
||||
"title": "WooCommerce",
|
||||
"version": "5.0.0",
|
||||
"version": "5.1.0",
|
||||
"homepage": "https://woocommerce.com/",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -160,13 +160,6 @@ WooCommerce comes with some sample data you can use to see how products look; im
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= 4.9.2 2021-01-25 =
|
||||
|
||||
* Tweak - Disable untested plugin's notice from System Status and Plugin's page. #28840
|
||||
= 5.1.0 2021-03-xx =
|
||||
|
||||
[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce/master/changelog.txt).
|
||||
|
||||
== Upgrade Notice ==
|
||||
|
||||
= 4.0 =
|
||||
4.0 is a major update. Make a full site backup, update your theme and extensions, and [review update best practices](https://docs.woocommerce.com/document/how-to-update-your-site) before upgrading.
|
||||
|
|
|
@ -30,7 +30,7 @@ $wrapper_classes = apply_filters(
|
|||
'woocommerce_single_product_image_gallery_classes',
|
||||
array(
|
||||
'woocommerce-product-gallery',
|
||||
'woocommerce-product-gallery--' . ( $product->get_image_id() ? 'with-images' : 'without-images' ),
|
||||
'woocommerce-product-gallery--' . ( $post_thumbnail_id ? 'with-images' : 'without-images' ),
|
||||
'woocommerce-product-gallery--columns-' . absint( $columns ),
|
||||
'images',
|
||||
)
|
||||
|
@ -39,7 +39,7 @@ $wrapper_classes = apply_filters(
|
|||
<div class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?>" data-columns="<?php echo esc_attr( $columns ); ?>" style="opacity: 0; transition: opacity .25s ease-in-out;">
|
||||
<figure class="woocommerce-product-gallery__wrapper">
|
||||
<?php
|
||||
if ( $product->get_image_id() ) {
|
||||
if ( $post_thumbnail_id ) {
|
||||
$html = wc_get_gallery_image_html( $post_thumbnail_id, true );
|
||||
} else {
|
||||
$html = '<div class="woocommerce-product-gallery__image--placeholder">';
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
# 0.2.0
|
||||
|
||||
## Fixed
|
||||
|
||||
- Return jest exit code from `npx wc-e2e test:e2e*`
|
||||
|
||||
## Added
|
||||
|
||||
- support for custom container name
|
||||
|
|
|
@ -25,6 +25,9 @@ fi
|
|||
# Store original path
|
||||
OLDPATH=$(pwd)
|
||||
|
||||
# Return value for CI test runs
|
||||
TESTRESULT=0
|
||||
|
||||
# Use the script symlink to find and change directory to the root of the package
|
||||
SCRIPTPATH=$(dirname "$0")
|
||||
REALPATH=$(readlink $0)
|
||||
|
@ -46,12 +49,15 @@ case $1 in
|
|||
;;
|
||||
'test:e2e')
|
||||
./bin/wait-for-build.sh && ./bin/e2e-test-integration.js $2
|
||||
TESTRESULT=$?
|
||||
;;
|
||||
'test:e2e-dev')
|
||||
./bin/wait-for-build.sh && ./bin/e2e-test-integration.js --dev $2
|
||||
TESTRESULT=$?
|
||||
;;
|
||||
'test:e2e-debug')
|
||||
./bin/wait-for-build.sh && ./bin/e2e-test-integration.js --dev --debug $2
|
||||
TESTRESULT=$?
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
|
@ -60,3 +66,5 @@ esac
|
|||
|
||||
# Restore working path
|
||||
cd $OLDPATH
|
||||
|
||||
exit $TESTRESULT
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Internal dependencies
|
||||
*/
|
||||
import { merchant } from './flows';
|
||||
import { clickTab, uiUnblocked, verifyCheckboxIsUnset } from './page-utils';
|
||||
import { clickTab, uiUnblocked, verifyCheckboxIsUnset, evalAndClick } from './page-utils';
|
||||
import factories from './factories';
|
||||
|
||||
const config = require( 'config' );
|
||||
|
@ -25,6 +25,20 @@ const verifyAndPublish = async () => {
|
|||
await expect( page ).toMatchElement( '.updated.notice', { text: 'Product published.' } );
|
||||
};
|
||||
|
||||
/**
|
||||
* Wait for primary button to be enabled and click.
|
||||
*
|
||||
* @param waitForNetworkIdle - Wait for network idle after click
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
const waitAndClickPrimary = async ( waitForNetworkIdle = true ) => {
|
||||
// Wait for "Continue" button to become active
|
||||
await page.waitForSelector( 'button.is-primary:not(:disabled)' );
|
||||
await page.click( 'button.is-primary' );
|
||||
if ( waitForNetworkIdle ) {
|
||||
await page.waitForNavigation( { waitUntil: 'networkidle0' } );
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Complete onboarding wizard.
|
||||
*/
|
||||
|
@ -88,15 +102,7 @@ const completeOnboardingWizard = async () => {
|
|||
await expect( page ).toFill( '.components-text-control__input', config.get( 'onboardingwizard.industry' ) );
|
||||
|
||||
// Wait for "Continue" button to become active
|
||||
await page.waitForSelector( 'button.is-primary:not(:disabled)' );
|
||||
|
||||
await Promise.all( [
|
||||
// Click on "Continue" button to move to the next step
|
||||
page.click( 'button.is-primary' ),
|
||||
|
||||
// Wait for "What type of products will be listed?" section to load
|
||||
page.waitForNavigation( { waitUntil: 'networkidle0' } ),
|
||||
] );
|
||||
await waitAndClickPrimary();
|
||||
|
||||
// Product types section
|
||||
|
||||
|
@ -110,15 +116,7 @@ const completeOnboardingWizard = async () => {
|
|||
}
|
||||
|
||||
// Wait for "Continue" button to become active
|
||||
await page.waitForSelector( 'button.is-primary:not(:disabled)' );
|
||||
|
||||
await Promise.all( [
|
||||
// Click on "Continue" button to move to the next step
|
||||
page.click( 'button.is-primary' ),
|
||||
|
||||
// Wait for "Tell us about your business" section to load
|
||||
page.waitForNavigation( { waitUntil: 'networkidle0' } ),
|
||||
] );
|
||||
await waitAndClickPrimary();
|
||||
|
||||
// Business Details section
|
||||
|
||||
|
@ -136,48 +134,15 @@ const completeOnboardingWizard = async () => {
|
|||
await page.waitForSelector( '.woocommerce-select-control__control' );
|
||||
await expect( page ).toClick( '.woocommerce-select-control__option', { text: config.get( 'onboardingwizard.sellingelsewhere' ) } );
|
||||
|
||||
// Query for the extensions toggles
|
||||
const extensionsToggles = await page.$$( '.components-form-toggle__input' );
|
||||
expect( extensionsToggles ).toHaveLength( 4 );
|
||||
|
||||
// Disable download of the onboarding suggested extensions
|
||||
for ( let i = 0; i < extensionsToggles.length; i++ ) {
|
||||
await extensionsToggles[i].click();
|
||||
}
|
||||
|
||||
// Wait for "Continue" button to become active
|
||||
await page.waitForSelector( 'button.is-primary:not(:disabled)' );
|
||||
await waitAndClickPrimary( false );
|
||||
|
||||
await Promise.all( [
|
||||
// Click on "Continue" button to move to the next step
|
||||
page.click( 'button.is-primary' ),
|
||||
|
||||
// Wait for "Theme" section to load
|
||||
page.waitForNavigation( { waitUntil: 'networkidle0' } ),
|
||||
] );
|
||||
// Skip installing extensions
|
||||
await evalAndClick( '.components-checkbox-control__input' );
|
||||
await waitAndClickPrimary();
|
||||
|
||||
// Theme section
|
||||
|
||||
// Wait for "Continue with my active theme" button to become active
|
||||
await page.waitForSelector( 'button.is-primary:not(:disabled)' );
|
||||
|
||||
await Promise.all( [
|
||||
// Click on "Continue with my active theme" button to move to the next step
|
||||
page.click( 'button.is-primary' ),
|
||||
|
||||
// Wait for "Enhance your store with WooCommerce Services" section to load
|
||||
page.waitForNavigation( { waitUntil: 'networkidle0' } ),
|
||||
] );
|
||||
|
||||
// Benefits section
|
||||
|
||||
// Wait for Benefits section to appear
|
||||
await page.waitForSelector( '.woocommerce-profile-wizard__benefits' );
|
||||
|
||||
// Wait for "No thanks" button to become active
|
||||
await page.waitForSelector( 'button.is-secondary:not(:disabled)' );
|
||||
// Click on "No thanks" button to move to the next step
|
||||
await page.click( 'button.is-secondary' );
|
||||
await waitAndClickPrimary();
|
||||
|
||||
// End of onboarding wizard
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Plugin Name: WooCommerce
|
||||
* Plugin URI: https://woocommerce.com/
|
||||
* Description: An eCommerce toolkit that helps you sell anything. Beautifully.
|
||||
* Version: 5.0.0-dev
|
||||
* Version: 5.1.0-dev
|
||||
* Author: Automattic
|
||||
* Author URI: https://woocommerce.com
|
||||
* Text Domain: woocommerce
|
||||
|
|
Loading…
Reference in New Issue