-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use immutable WC order ID for KOMOJU sessions #81
Open
FTLam11
wants to merge
8
commits into
master
Choose a base branch
from
use-wc-immutable-order-id-for-komoju-session
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WC_Order::get_order_number by default uses the order ID, but seems that it can be changed. * https://wp-kama.com/plugin/woocommerce/function/WC_Data::get_id
FTLam11
force-pushed
the
use-wc-immutable-order-id-for-komoju-session
branch
from
December 6, 2022 03:39
4a80fba
to
26452b3
Compare
NPX ignores our pinned cypress version, so we should be running: npm run cypress:open
Installing woocommerce 4.0.1 is janky, cypress tests were not passing because the woocommerce installation failed to complete because of: woocommerce/woocommerce#27707 Will manually re-test the plugin later
Bumped woocommerce to get pass the PHP warning, seems the UI changed so this commit updates the installation and checkout steps. Maybe the default woocommerce theme changed?
build Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/checkout@v2
FTLam11
commented
Dec 7, 2022
@@ -17,7 +17,7 @@ jobs: | |||
run: | | |||
cd tests | |||
npm install | |||
npx cypress run | |||
npm run cypress:run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NPX ignores our pinned version of cypress, I found it was installing cypress version 11. Using the NPM script will use our pinned version.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Fixes #80
This PR changes the woocommerce order ID to use the database ID instead of an editable display ID. WC_Order::get_order_number by default uses the order ID, but seems that it can be changed.
I had minor issues activating woocommerce, related to a PHP warning. The version we are using (4.0.1) is quite behind the latest (7.1). We are using the latest wordpress image so maybe some compatability error. I'd get a blank screen with the PHP warning, go back to the wordpress dashboard and see the woocommerce plugin activated. Between updating the cypress test setup and seeing if we could bump woocommerce to get past that warning, I decided to try bumping woocommerce. Sadly some of the woocommerce UI settings changed, so some of the test setup was updated to reflect that.
Refs:
How to test
woocommerce_order_id
matches the one on the woocommerce orders dashboard:KOMOJU:
WooCommerce order details:
Note: I looked around the woocommerce order details and dashboard settings, but couldn't find a way to change the order display ID. Maybe this is supported in a newer woocommerce version?