* add you don’t need lodash eslint plugin
* handle lodash.omit eslint errors
- storybook and webpack config implementations were just ignored.
- shared/validation/index.js was converted to use ES6 destructuring to eliminate usage.
* remove lodash assign usage
* convert lodash isNan to Number.isNan
* ignore lodash.flatten lint error for now
* remove usage of lodash.isNil
* add exclusions for lodash rules in main eslintrc file rather than per file.
* Add status badges for linting and PHP Code quality
* Add PHP, JavaScript, and E2E Testing badge
* Reorder badges
* Remove travis badge
* Break PHP Unit tests on purpose
This is for testing the GitHub actions badges
* Revert "Break PHP Unit tests on purpose"
This reverts commit 3af4d83d151f59ca8a13d12ba48d69565e8c26c5.
* Break JS/CSS/PHP Linting
* Revert "Break JS/CSS/PHP Linting"
This reverts commit 6b105535933c36f340a364ead57bf3cbc9947dbf.
* Specify trunk branch name on badges
* Allow integers in payment_data values
* Revert "Allow integers in payment_data values"
This reverts commit b7f2ca4a5b696091afe796f47e84f584a0b27d9e.
* Enforce payment tokens to be strings
* Create end-to-end-tests.yml for E2E testing action
* Change actions to run on push instead of PR
* Install libstdc++-4.9-dev on E2E tests action
* Add correct apt repository for libstc++
* Reconfigure apt-get commands for installing libstdc++
* Remove accidental inclusion of Travis config from E2E tests action
* Install libkrb5-dev as part of e2e test action
* Run apt commands as sudo
* Install gutenberg plugin and e2e testutils
* Add environment variables to E2E tests
* Rename action and add further config for composer and wp-env
* Rename workflow
* Add jobs for WP 5.6, 5.5, and 5.4
* Fix YML indentation
* Apply 767 permissions to wp-env directory
* Run chmod as sudo
* Comment 5.6 and 5.6 with GB out to test 5.4 more easily
* Remove WP install job, since it should run on each step
* Change order of wp-env start and chmod
* Reorder commands for 5.4 job
* Try running 5.4 tests in isolation
* Reenable tests for all WP versions
* Move commands out of bash script into a series of commands
* Fix indentation on 5.5 job
* Re-enable libkrb5-dev install
* Clean wp-env before each run & upgrade wp-env to 3.0.0
* Update lock file for wp-env@3.0.0
* Reorder wp-env start and clean commands
* Reorder wp-env permissions commands
* Reorder wp-env permissions setup for all jobs
* Reorder wp-env permissions setup for 5.5 and 5.4
* Ensure correct order for env setup and flush permalinks twice
* Update jest snapshots
* Remove rewrite flush command from yml
* Remove npm build from every step and try it just at the start
* Set correct e2e build script
* Add jobs for PHP 8
* Specify PHP 8 minor version
* Run PHP 8 jobs first
* Remove PHP 8 jobs
* Add JS Unit tests job
* Remove js-unit-tests.js workflow
* Remove composer install from every step, add it to its own step
* Cache composer files
* Bust npm cache to test nodegit
* Rename npm cache
* Renove npm cache entirely
* Revert "Renove npm cache entirely"
This reverts commit d6fac6a6ebd9162e48f64daaa8c971320756579e.
* Rename npm cache back to how it was
* Fix yml indentation
* Remove echo from composer cache step
* Revert back to composer example
* Add PHP Unit tests to workflow
* Add PHP Unit tests to workflow
* Rename E2E tests workflow and file
* deliberately break e2e and unit tests to test workflow 👺
* fix php test, should see e2e fail
* revert broken e2e test
* Change steps into jobs, rename workflow
* Remove Travis workflow file
* Add all necessary setup steps to each job
* Rename Setup job and remove dependency
* Add individual jobs for each E2E test environment
* Add npm install and build to setup job
* YML syntax fix
* Remove error-causing chmod
* Rename blocks.ini setup step
Fixes a typographical error.
* Get the latest stable version of WooCommerce for PHPUnit testing
* Add PHP8.0 and PHP5.6 Unit tests
* Run composer update for PHP 5.6 and PHP 8.0
* Revert "Run composer update for PHP 5.6 and PHP 8.0"
This reverts commit 4f90522d0b52b7a8b9e896e9c783795be9dc5399.
* Revert "Add PHP8.0 and PHP5.6 Unit tests"
This reverts commit 66e317dec4af6e3a2ac6f78b6efd050e7fc5aa8e.
Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
* update readme
* add testing notes
* fix typo
* update readme
* add zip
* fix title version
* Bumping version strings to new version.
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* use consistent product name `WooCommerce Blocks:
- readme.md title
+ update product vision paragraph
- update references in readme.txt preamble
- update in tests bootstrap message
* add WCCOM/docs links front & centre in readme for convenience
* Revert "Add 'hidden' class name when using the 'hidden' attribute"
This reverts commit 0332e33a60a516506718e8ed4659e45d32dc80a4.
* Add styles for hidden panel content
* Add docs about account for the hidden attribute in styles
* Update docs/theming/README.md
Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
* For gateways with disabled saved payment metods, don't show saved items in context.
* Fix style.
* Update name.
* Simplify and fix.
* Whitespace.
* Revert for another PR.
* Formatting fix.
* add fallback screen reader styles
* use shared blocks screen-reader styles from mixin:
- tweak mixin to align with focus-reveal style
- add new mixin for focus-reveal style, since it is coupled to
visually-hidden mixin
* Trim input values before validation on Checkout
* Fixes required field checking at schema level
* Require country during checkout and ensure values are formatted
* Add handling for rest_invalid_param messages
* Remove prepare_address_fields - handled by schema
* Add address validation to OrderController
* Implement address validation
* Error errors from all endpoints more gracefully
* update non-true description
* required prop
* Update tests
* Fix equalityFn so updates are triggered when address changes
* Remove debounce so fields update if context changes
* Update src/StoreApi/Schemas/AbstractAddressSchema.php
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Add missing wp_unslash
* Validate allowed countries should block checkout if no countries are allowed
* Type in locale variable
* Update assets/js/base/utils/errors.js
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Fix validator calls
* Remove refererence
* Restore onChange order
* eslint fix
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Add CSS rules for dark mode theme setting in Twenty Twenty-One
This is required because the theme may be set to dark mode independently of the browser. The reason we need two rules for this is because the checkout block can be set to have dark mode inputs too, so this rule doesn't need to apply then.
* Add theme-specific class for Twenty Twenty-One
* Tweak message for stale activity and bump close boundary
Temporarily, bump the close boundary to 20 days to cover the holiday period.
* revert bump to 90 days
* Use the @wordpress/server-side-render package
* Add @wordpress/server-side-render dependency
* Update requiredPackagesInWPLegacy for 5.4 support
* Update package lock
* Add stories to Cart & Checkout totals components
* Create @woocommerce/knobs alias
* Update TotalsFooterItem default values so they are in line with other stories
* Remove no longer used __experimentalPersistItemToCollection function
* Add __experimentalDeRegisterPaymentMethod and __experimentalDeRegisterExpressPaymentMethod to feature flags doc
* generating changeset for pull request
* generating changeset for pull request
* Update readme changelog
* Update requirements
* Testing instructions
* Update zip file
* Update nonce outside of json parse
* Set logged in cookie on store api requests
* Update zip
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Update @wordpress/components and @wordpress/base-styles
* Fix JS warning in Select/downshift
* Remove color definitions that are now imported from @wordpress/base-styles. Fixeswoocommerce/woocommerce-blocks#3311
* Use -unit values from @wordpress/base-styles. Fixeswoocommerce/woocommerce-blocks#3313
* Update snapshots
* Fix payment methods test
* Don't extract dependencies that are not available in WP 5.3
* Avoid extracting @wordpress/compose since last version doesn't have resize observer
* Remove unnecessary uses of @wordpress/compose in a frontend scripts
* Add missing spaces
* Remove Blocks version of ReserveStock Class
* When a cart item is removed, remove holds on stock
* Move maybe_release_stock to abstract
* Update ReserveStockException usage
* refactor and reorder checkout processing
* improve handling of checkout POST with mixed success:
- return coupon errors in a property
- don't throw from coupon validation:
- return info about errors to route handler
- tweak logic in route handler to prevent subsequent processing
- default payment result to fail to avoid accidental successful checkout
- in client, catch errors and new customer id:
- render any errors as notices - i.e. coupon error
- if a customer ID is included, push into store (so UI updates)
* fix linter whitespace issue from rebase merge
* fix MIA order validation/errors (due to rebase):
- reinstate thrown exception when validating order
- return exception was an experiment, now solved in woocommerce/woocommerce-blocks#3454
* hide "Create account" checkbox if account is created during an error response:
- update store with new user id
- remove stale response.errors handling;
- current approach (https://github.com/woocommerce/woocommerce-blocks/pull/3454) is to add data to error response
* show a notice informing user that they have signed up
* white space
* Handle header and update typedef
* Remove "errors" schema
* remove errors
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* refactor and reorder checkout processing
* move experimental order_processed hook as last step before payment:
+ flesh out docs - intention/purpose, introduced version, link to PR,
relationship to legacy hook
* return current user_id with checkout error responses, so UI can update
* clarify user id comment
* Add store API nonce to all responses
* catch new nonce & update store for POST /checkout errors
* ensure $order hook param and database are in sync
* fetchResponse->errorResponse
* Move payment method ID validation to schema
* Add the nonce inline
* Simplify error method
* Add todo for injection
* Hook docs
* Return user ID as a header instead of in error response
* Default to private methods
* Tidied processing logic/order save placement
* White space removal
* Remove duplicate comment
* Remove root slash
* Remove unused created variable
* Remove woocommerce_registration_error_email_exists filter in error message from API
* Move payment validation
* Moved comments
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* generating changeset for pull request
* generating changeset for pull request
* add changelog for version 3.9
* clear vendor folder before doing deploy script
* start testing docs
* more build script improvements
* Finish testing notes
* update testing docs
* Prevent exclude drafts filter being tree shaken (https://github.com/woocommerce/woocommerce-blocks/pull/3463)
* Reverse logic for hiding product name in checkout sidebar (https://github.com/woocommerce/woocommerce-blocks/pull/3464)
The hasLink prop was removed from ProductName and disabled is used instead, this change makes the variable name more descriptive, and uses disabled to signal if the ProductName should link or not.
* update zip file
* tweak changelog
* add link to release post in changelog
* fix release date in readme.txt
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: opr <5656702+opr@users.noreply.github.com>
The hasLink prop was removed from ProductName and disabled is used instead, this change makes the variable name more descriptive, and uses disabled to signal if the ProductName should link or not.
* Reset product list padding
* Adjust placeholder color if css variable exists
This is 2021 specific but may become more prominant.
* FIx editor button styles in 2021
* Adjust button sizes based on columns
* Adjust padding
* Fix price slider styling in Twenty Twenty One
* Fix price slider styling in Twenty Twenty One
* Fix radio control styling in Twenty Twenty One and remove usage of mixin
* Force 0 padding on active filters list
* Hide spinner on cart's "proceed to checkout" button when page unloads
This is required because of a feature of Safari where the page state is saved, including all class names, when a transition occurs. Navigating using the back button restores the page to that cached state, so the spinner class remains on the button. Resetting the state just before the page gets cached stops this from happening.
* Change comment case to sentence case.
* Add catalog_visibility to CartItemSchema.php
This is used to get whether the product is visible in the catalogue, visible in the shop only, visible in search results only, or visible everywhere. We need to know this so we can pass it to the ProductImage and ProductName components.
* Remove links from CartLineItemRow if not visible in catalogue
Added catalog_visibility to lineItems prop, and when the product is not visible in the catalogue do not wrap product image in a link. Also pass down the hasLink prop to ProductName.
* Add hasLink prop to ProductName
When this prop is false we should not output the link around the product name. This is for when the product is hidden from the catalogue but we still want to show its name somewhere.
* Add tests and storybook for ProductName
* Add catalog_visibility check to OrderSummaryItem
When the catalogue visibility of a product is set to hidden or search, then the product name in the checkout sidebar should not be hyperlinked.
* Reverse logic for hiding link on product image & disabling link on name
Following a point from @budzanowski we do not need the hasLink prop, making use of disabled is probably a better idea.
* Remove tabindex from a in ProductName & output span if name is disabled
This change removes the need to pass a tabindex to the a in ProductName. This is because a disabled ProductName will now never output an a tag. When the ProductName is disabled a span is output instead, which has no tabindex by default.
This change also reverses the logic to decide whether the a or span should be output so as to make the code more readable and flow better.
* Update storybook and tests/snapshots for ProductName
* Correct docblock description
* Sync shipping address changes with billing data
* Update inline documentation
* Revert address sync because it fails when shipping is disabled explicitely
* Avoid loading shipping address from customer is shipping is disabled
* Rather than update order from the wc/store/checkout request, update the customer object
This is turn is synced to order, but also allows the cart calcultions to use the posted data. This means that taxes will be updated based on address data even if not displayed on the checkout.
* Add action that combines billing and shipping updates
* Add route for updating billing and shipping address
* Sync billing data to server on change
* Shared constants for billing data
* Skip address update if missing country
* Allow null values to skip formatting
* Add billing to cart schema
* Removed unwanted hooks from previous commit
* Decoding is handled in useStoreCart
* Remove hook
* Make shipping context hold state
* Make billing context hold state
* Add address processors
* Cart does not have billing
* Update tests, remove some unrelated changes affecting the diff
* Revert "Update inline documentation"
This reverts commit 0393f49316de3152c6dcf6fda1192c06a74f1b55.
* Make shippingRatesAreResolving conditonal based on API request
* Shared address processor in cart and checkout
* Rename REST endpoint
* CustomerDataProvider and hook
* Update shipping address type defs
* Rename customer address endpoint, and remove update-shipping
* Update tests
* Fix tests by restoring country validation
* typo
* Update assets/js/base/hooks/cart/use-store-cart.js
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Simplify debounce and request handling
* Remove state from address sync
This will mean billing is "forgotten" if using the checbox, but this greatly simplifies logic.
* Rename shipping rates loading to customer data loading
* Sync based on useStoreCart data
* Made cart API less strict on addresses
* Fix useCheckoutAddress sync
* Add note on currentShippingAsBilling
* Use incoming isCart
* Add more detailed inline comment for shippingAsBilling toggle event
* Combine customer billing and shipping ref
* Update address docblock
* Error handling in pluckAddress
* Fix cart response after rebase
* Update customer tests
* Update src/StoreApi/Routes/CartUpdateCustomer.php
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Pass disabled prop to FormStep in order-notes-step.js
This way we can add the disabled class to the div or fieldset rendered by FormStep.
* Add disabled class & style for disabled FormStep components
Allows us to style disabled elements that cannot have the disabled attribute (divs) the same way as disabled fieldsets are.
* Update test snapshot for FormStep
This is because we added a class to the div/fieldset element when it is disabled.
* Remove redundant selector from form-step styles
Because we now add the --disabled modifier to the class, we no longer need the disabled selector. The new class-name based selector covers both fieldsets and divs.
* Change style rules for checkout step headings
This is required because when the checkout heading text is too long it collided and overlapped the heading content due to its absolute position. In this commit we add a grey line to the left of the checkout step heading to ensure consistency with the checkout step container's styling.
* Remove position rule from checkout-step heading content
This was no longer needed as it nothing relied on the position of this element.
* Check price >= 30
* Force payment methods to react to order totals change
* Fix express payments reducer so it overwrites
* Fallback to 0 if undefined
* handle plain options passed to registerPaymentMethod:
- no need for a callback dance
- support the previous API: if a function is passed, call it as before
* update Stripe for new registerPaymentMethod interface
* update docs & all built-in payment methods to simpler API
* handle plain options arg to registerExpressPaymentMethod:
- add legacy fallback if passed a function
- update stripe express payment method
- update docs
- remove unused `assertValidPaymentMethodCreator` util
* use correct case for `JavaScript`
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* typedefs for payment registration options + tidies for regular methods
* typedef express payment options arg & tidy stripe/payment-request:
- use camelCase for config instance (not a constructor/type)
* mention typedefs in payment method dev docs
* use @wordpress/deprecated to warn if callback passed to payment register
* update unit tests for new payment method API
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Exclude checkout-draft orders from WC Admin reports
* Hook into order query args
* Add comments before applying filters
* Revert "Add comments before applying filters"
This reverts commit 83b695665c05a3a9e7669e8777080c6ff10d8421.
* Revert "Hook into order query args"
This reverts commit 94cec6c83cf5b5ce05cd106daf217c0b08f13a03.
* Hide draft orders from My Account > Orders
* Move filter to its own file
* Use custom plugin namespace for filter
* Remove custom fieldconfig for shipping calculator so required fields for shipping are collected
* If the store config requires an address before shipping, do not return rates or totals
Totals, calculated by the cart, would be set to 0 in this scenario which could lead to customer confusion (why is the rate $10 but shipping shown as $0?)
* The shipping total row is missing a border
* Revert "If the store config requires an address before shipping, do not return rates or totals"
This reverts commit f3a4f24f5785392eb43bfc69a5548d398c47d8bb.
* Add hasCalculatedShipping to schema and hooks
* Show shipping notices with updated wording based on if shipping has calculated yet or not
* Refactor shipping row display to use new API props
* Remove block level isShippingCostHidden
* fix test
* Correct the math in the shipping preview in cart
* Document null
* Remove test—this option no longer exists
* Remove unused settings/constants
* Strip tags from stripe error notices
* Revise abortPayment - this does not need to provide or handle responses
* Decode entities in responseData
* Correctly handle checkoutResponse props
* Show one error at a time from express methods
* Set ID to context to avoid need to manually define it
* Move feature flag PHP logic to a service class
* Add legacy methods
* Inject a FeatureGating class instance into Package
* Make is_experimental_build and is_feature_plugin_build methods non static
* initial prototype for ExtendRestApi
* return before assign
* fix phplint errors
* declare Throwable
* remove empty init
* return initial data if shape is not correct
* Add IDENTIFIER to schema classes
* refactor ExtendRestApi to not use filters
* remove extra check
* implement ExtendRestAPI injected into StoreAPI schemas
* use $extend instead of $extend_schema
* fix phpcs issues
* update schema
* fix data type
* address review
* fix object cast
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* add `discount_type` to store api coupons endpoints
* add `discount_type` field to coupon API docs
* add comment documenting when discount_type appeared in API response
* fix unsupported types with operators warning for PHP 8 with cart item conditional checks
* verify draft order object instance before using
* ensure per_page value is cast to integer
* correctly account for categories value and type in conditional
* add more instanceof checks
* Correct variable name in array check
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Add missing context docs for shouldCreateAccount
* shouldCreateAccount context docs
* No need to handle showOrderNotes in component—just don't render it
* Only render notes if needed
* Create PhoneNumber component to insert when needed
Currently our repository doesn't support node 14.x and this branch of node recently became LTS so GitHub actions now default to that version. This is an attempt to force a specific version of node for the action.
* account for registration enabled setting when creating accounts
* default to false instead of global setting for initial allowCreateAccount attribute
* consider global allows signup value for whether account creation checkbox shows
* include existing hook when determining if checkout signup is available:
- woocommerce_checkout_registration_enabled hook
* use public api for registration settings (via WC_Checkout)
* initial round of test fixes
* fix logic flaw exposed by tests and align tests with actual values in real use
* return early if WC_Checkout is not available
* remove temporary test group and uncomment new test.
* improve test method name
* fix comment to match new routine name
* ensure block shows login prompt when store disables checkout signup
* fix incorrect conditional order and cover with tests
Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
* Add woocommerce_blocks_checkout_order_processed action
* pass order object as well
* remove empty post data
* add prefix and docs
* pass order object
* add doc for feature flag and experimental interfaces
* add new doc to TOC
* update pull request template to include checklist item for experimental/feature flag items
* tweak wording for experimental prefix
* fix bad formatting of bold for lines
* fix double slash in url
* add missing sentence case
* remove account signup as that is not included in Cart and Checkout block logic.
* Fix typo
* generating changeset for pull request
* generating changeset for pull request
* tweak wording - testing instructions are focused on new features
* testing instructions (tbc) for 3.7.0
* link in 3.7.0
* add instructions for checkout signup
* 3.7.0 changelog
* Add missing doc links to TOC for release testing notes.
* fix typo in "replace"
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* add testing instructions for various issues fixed in 3.7
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* expose checkout signup feature to release build (feature plugin):
- remove isExperimental from block/editor js (the block is already gated
to plugin only)
- gate entire service class to feature plugin && Woo >= 4.7
- this ensures our custom email and set password flow are only active
for supported woo version, if blocks plugin is active
- also refactored the gating logic so the woo version check is used to
gate all code
* eslint action told me to delete comment `.` ... ?
* remove experimental feature flag for checkout signup front-end:
- "Create Account?" checkbox in address/contact component
- logged-out prompt logic - handle case when signup is enabled and guest
checkout is not enabled, i.e. checkout requires automatic signup
* fix formatting issues
* add allowCreateAccount to proptypes for CheckoutForm and AddressStep
* fix php 8 error when $data is not invocable
`is_callable` is the preferred way for checking whether a variable value is invocable or not.
* use is_callable in AbstractDependencyType
* Add errors to UI in onCheckoutAfterProcessingWithError
* Fix missing useEffect dependency
* Typo
* Reset source id if Stripe intent fails
* Remove default error on onCheckoutAfterProcessingWithError
* Add missing useEffect dependency
* Only add default error message if there is no errors in any other context
* Fix useEffect running too many times
* Add type-defs and minor improvements
* Only count error notices
* Add workflow for linting js and css
* try alternative action to see if we get annotations
* add deliberate linting errors to validate new workflow behaviour
* try to fix annotations?
* maybe invalid check-name?
* try a different eslint action
* fix eslint fails
* remove js/css linting from travis
* remove unnecessary build execution
* Create ZIP before writing testing steps
* Add a note to restore the release branch
* Add a link to the milestones page
* Revert "Add a note to restore the release branch"
This reverts commit 362bf8779be2023c8015bb71a1328eca9bab4997.
* use my-account/lost-password endpoint url for set password (tbd):
- companion for working on https://github.com/woocommerce/woocommerce/issues/27754
* use more appropriate (new) set-password endpoint
* add version check - use new woo core endpoint if woo version is new enough
* use my-account/lost-password for setting password in checkout signup:
- this has been available forever - no need for a version check
- page will show `Lost password`; looking at options for overriding that
* use more explicit `newaccount` action for set password url if available
* tweak feature gating for checkout signup:
- only available in dev builds (will change soon)
- only available if Woo core 4.7 or newer
- checkout signup relies on fixes in 4.7+ (tbc) to
my-account/lost-password endpoint for setting initial password
- standardise feature gate logic so is consistent, ensure feature is
disabled in API/backend, hide editor option, and disable front end
- add new setting `wcVersion` to allow feature gating on woo version
* fix woo-version feature gate of checkout signup:
- fixed version logic, explicit 4.7.0 reference version
- refactor version compare routine so can be used for woo or WP version
* revamp Woo 4.7+ logic so PHPunit tests aren't dependent on Woo version:
- Woo-version feature gating is implemented at integration layer:
- checkout REST API
- register/override new account email handler