-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Add option to Change the created_via field. #609
base: develop
Are you sure you want to change the base?
Conversation
Code Climate has analyzed commit 352ebb9 and detected 4 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 75.0% (0.0% change). View more on Code Climate. |
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.
Can this also be added to the checkout mutation? Since the checkout creates an order, the checkout input should accept |
@scottyzen Get this rebased and we can merge it if it passes CI. |
Can be useful when WooCommerce is being used from multiply sources. For example, with plugins like Point of Sale for WooCommerce.
nodes { | ||
url | ||
accessExpires | ||
downloadId | ||
downloadsRemaining | ||
name | ||
product { | ||
databaseId | ||
} | ||
download { | ||
downloadId | ||
} | ||
} | ||
} | ||
needsPayment | ||
needsProcessing | ||
metaData { | ||
key | ||
value | ||
} | ||
couponLines { | ||
nodes { | ||
databaseId | ||
orderId | ||
code | ||
discount | ||
discountTax | ||
coupon { | ||
id | ||
} | ||
} | ||
} | ||
feeLines { | ||
nodes { | ||
databaseId | ||
orderId | ||
amount | ||
name | ||
taxStatus | ||
total | ||
totalTax | ||
taxClass | ||
} | ||
} | ||
shippingLines { | ||
nodes { | ||
databaseId | ||
orderId | ||
methodTitle | ||
total | ||
totalTax | ||
taxClass | ||
} | ||
} | ||
taxLines { | ||
nodes { | ||
rateCode | ||
label | ||
taxTotal | ||
shippingTaxTotal | ||
isCompound | ||
taxRate { | ||
databaseId | ||
} | ||
} | ||
} | ||
lineItems { | ||
nodes { | ||
productId | ||
variationId | ||
quantity | ||
taxClass | ||
subtotal | ||
subtotalTax | ||
total | ||
totalTax | ||
taxStatus | ||
product { | ||
... on SimpleProduct { | ||
id | ||
} | ||
... on VariableProduct { | ||
id | ||
} | ||
} | ||
variation { | ||
id | ||
} | ||
} | ||
} | ||
} | ||
customer { | ||
id | ||
} | ||
result | ||
redirect | ||
} | ||
} | ||
'; | ||
} |
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.
@scottyzen What's the purpose of this change? Also you didn't change the checkout
mutation but the createOrder
mutation. You should update the OrderMutationsTest
instead.
@@ -483,7 +484,7 @@ public function testUpdateOrderMutation() { | |||
], | |||
'paymentMethod' => 'bacs', | |||
'paymentMethodTitle' => 'Direct Bank Transfer', | |||
'billing' => [ | |||
'billing' => array( |
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.
Please revert WooGraphQL uses short array syntax [ ]
@@ -808,7 +809,7 @@ public function testDeleteOrderMutation() { | |||
], | |||
'paymentMethod' => 'bacs', | |||
'paymentMethodTitle' => 'Direct Bank Transfer', | |||
'billing' => [ | |||
'billing' => array( |
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.
Please revert WooGraphQL uses short array syntax [ ]
@@ -959,7 +960,7 @@ public function testDeleteOrderItemsMutation() { | |||
], | |||
'paymentMethod' => 'bacs', | |||
'paymentMethodTitle' => 'Direct Bank Transfer', | |||
'billing' => [ | |||
'billing' => array( |
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.
Please revert WooGraphQL uses short array syntax [ ]
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.
@scottyzen Your current changes only effect the createOrder
mutation, you might want to use this functionality in the checkout
mutation as well. Also, these changes need to be tested in the CheckoutMutationTest
and OrderMutationsTest
Can be useful when WooCommerce is being used from multiply sources. For example, with plugins like Point of Sale for WooCommerce.
Your checklist for this pull request
Thanks for sending a pull request! Please make sure you click the link above to view the contribution guidelines, then fill out the blanks below.
🚨Please review the guidelines for contributing to this repository.
What does this implement/fix? Explain your changes.
…
Does this close any currently open issues?
…
Any relevant logs, error output, GraphiQL screenshots, etc?
(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)
Any other comments?
…
Where has this been tested?