Commit graph

1198 commits

Author SHA1 Message Date
Alex P
af15246a96 Fix order fees total 2022-06-17 09:41:05 +03:00
Alex P
02c84e43e0 Improve item total/price retrieval
Less calculations, also fee was not included in item price for subs with fee
2022-06-15 21:33:25 +03:00
Alex P
24586d0910 Send shipping/discount taxes as tax 2022-06-15 16:28:44 +03:00
Alex P
c59683b5ea Fix phpcs
I guess the @since comments are not very critical for our hooks,
and anyway it should not be an error, finding the first version for every hook would take lots of time now.
not sure if there is a better way to suppress it in phpcs
2022-06-15 16:20:43 +03:00
Alex P
770f8e558b Do not send tax in each item
Looks like it is not displayed anyway, and it causes mismatch + cannot send shipping/discount taxes as tax
2022-06-15 10:14:42 +03:00
Alex P
0e82a5f6c9 Fix rounding when checking total mismatch 2022-06-15 09:58:57 +03:00
Alex P
4f91e78591 Do not fail if no WC_Product in order item
It is possible for an order item to not have product, such as if created by a plugin.
2022-06-13 18:52:52 +03:00
Alex P
a220396fcc Use filter_var for REQUEST_URI
In some cases filter_input returns NULL for server variables even though they are present.
Such as this bug https://bugs.php.net/bug.php?id=49184, though not only in CLI.
At least in our DDEV it happens here.
2022-05-23 10:30:13 +03:00
dinamiko
4ca2e637ed Merge trunk and fix conflicts 2022-05-17 17:05:00 +02:00
Emili Castells
79db7cfbfc
Merge pull request #375 from woocommerce/issue-174-vaulting-pay-later-ux
Enhance the UX of the Pay Later and Vaulting features
2022-05-17 16:25:33 +02:00
Emili Castells
b7c4f23b62
Merge pull request #641 from woocommerce/PCP-580-manual-orders-return-an-error-for-guest-users
Store order info in wc order meta to get if there is no session.
2022-05-17 13:55:35 +02:00
Emili Castells
cff92d54ec
Merge pull request #642 from woocommerce/pcp-357-negative-fees
Do not send negative price items, add to discount
2022-05-17 13:54:22 +02:00
Emili Castells
f37c9d41a1
Merge pull request #648 from woocommerce/pcp-347-fix-emoji
Fix item description with emoji
2022-05-17 12:55:34 +02:00
Emili Castells
4b4be4ff1b
Merge pull request #647 from woocommerce/pcp-478-fix-vaulting-redirect
Remove redirect after vaulting settings check
2022-05-17 12:53:54 +02:00
Emili Castells
5cd439fa20
Merge pull request #633 from woocommerce/pcp-615-invalid-address
Retry without shipping field when got invalid address error
2022-05-17 12:53:00 +02:00
dinamiko
f20b539df9 Merge trunk and fix conflicts 2022-05-17 10:59:39 +02:00
Emili Castells
486fe96a3e
Merge pull request #617 from woocommerce/PCP-647-fraud-prevention-function
Add Fraud Processor Response as an order note.
2022-05-17 10:46:20 +02:00
Emili Castells
63c8cb8851
Merge pull request #609 from woocommerce/PCP-608-add-the-paypal-fee-to-the-custom-fields
Add "PayPal Transaction Key" into order custom fields.
2022-05-17 10:45:42 +02:00
Emili Castells
fc31202305
Merge pull request #607 from woocommerce/PCP-632-smart-buttons-not-loading
Fix the button render logic when free product is in cart.
2022-05-17 10:45:09 +02:00
Emili Castells
125150ac58
Merge pull request #578 from woocommerce/PCP-616-disabling-paypal-checkout-on-removes-buttons-from-cart
Unset the gateway only on checkout page
2022-05-17 10:44:27 +02:00
Emili Castells
4ec36a8547
Merge pull request #621 from woocommerce/pcp-440-fix-partial-refunds
Fix duplicated partial refunds
2022-05-17 10:43:39 +02:00
Alex P
88220aa3c6 Do not send negative price items, add to discount 2022-05-16 15:15:42 +03:00
Alex P
d63f89a4a2 Retry without shipping field when got invalid address error 2022-05-16 15:12:40 +03:00
Alex P
a8c1f386aa Fix item description with emoji 2022-05-13 17:12:56 +03:00
Alex P
c933c595d8 Remove redirect after vaulting settings check
does not seem to be needed
2022-05-12 17:39:54 +03:00
Alex P
d4dcc10ef6 Remove outdated comment 2022-05-12 17:39:49 +03:00
Alex P
65007a7bae Do not handle vaulting settings change when not onboarded
Otherwise vaulting gets disabled after disconnect and re-onboarding
2022-05-12 17:39:49 +03:00
Alex P
fc3ba70d4b Extract filter to a function 2022-05-11 18:16:50 +03:00
Narek Zakarian
ab0e90dab0 Store order info in wc order meta to get if there is no session. 2022-05-10 18:46:40 +04:00
leonardo lopes de albuquerque
e6775ce3fe
Merge pull request #353 from helgatheviking/issues/234-supports 2022-05-10 10:05:59 -03:00
helgatheviking
0052aacbbc Rename new filter to woocommerce_paypal_payments_product_supports_payment_request_button to avoid abbreviates 2022-05-09 13:19:32 -06:00
Narek Zakarian
199b18c7f3 Fix the psalm error about no return type. 2022-05-06 18:22:58 +04:00
Narek Zakarian
5965cc4bde Enable the "pay later" on card page when card page is updated. 2022-05-06 18:22:11 +04:00
Narek Zakarian
6ac84bc801 Merge branch 'PCP-632-smart-buttons-not-loading' into PCP-163-pay-later-message-bug 2022-05-06 17:34:13 +04:00
Narek Zakarian
d3b8e04135
Update CartBootstap.js 2022-05-04 15:34:19 +04:00
Alex P
dd4b39971f Remove duplicated variable 2022-05-03 16:14:22 +03:00
Narek Zakarian
c4f5d7a139 Move the subscription cart check into the callbacks.
The subscription product in cart existence and the vaulting enabled check should be called inside the button renderer hook callback so that the mini-cart ajax refresh will take it into the consideration.
2022-05-02 17:48:14 +04:00
Alex P
93ef548b65 Fix psalm errors 2022-04-28 16:20:30 +03:00
Alex P
35f058870a Skip already handled refunds in webhook
When we add a refund from WC, we still receive a webhook with it. And for some partial refunds the duplicated refund can be added in WC.
2022-04-28 16:20:05 +03:00
Alex P
13e04b009c Fix const name 2022-04-27 23:50:23 +03:00
Alex P
e72b80ae72 Show error if PayPal already vaulted for another WC customer 2022-04-27 10:45:05 +03:00
Alex P
b2e5a80f3f Show error message when vaulting approval fails 2022-04-27 10:39:54 +03:00
Narek Zakarian
d148a1bf9a Adjust API client services to support fraud response. 2022-04-25 19:17:13 +04:00
Narek Zakarian
fd77690d46 Include fraud response in order capture. 2022-04-25 19:16:09 +04:00
Narek Zakarian
4c1695788f Create Fraud processor response and it's factory. 2022-04-25 19:14:21 +04:00
Alex P
4a4f131325 Handle card smart button for free trial (1$ auth + void)
Disabling this funding source also disables DCC
2022-04-25 15:24:37 +03:00
Alex P
a5191b04ff Do not disable card funding source for free trial if DCC enabled
Otherwise DCC gateway gets disabled (paypal.HostedFields.isEligible() becomes false)
2022-04-25 15:13:46 +03:00
dinamiko
36151c8296 Do not set PayPal gateway enabled on credit card gateway 2022-04-21 15:19:08 +02:00
dinamiko
ca0aa6145c Revert change 2022-04-21 11:20:47 +02:00
Narek Zakarian
de855042a0 Add "PayPal Transaction Key" into order custom fields. 2022-04-20 19:51:26 +04:00