Commit graph

8733 commits

Author SHA1 Message Date
Mészáros Róbert
3f8b3ba85c Pass the color and shape option from the settings to the button style 2020-04-09 19:23:10 +03:00
Mészáros Róbert
18bf5497a4 Pass default styles to the button config
This way we can overwrite it with user selected options
2020-04-09 19:15:28 +03:00
Mészáros Róbert
6f5f8b5f41 Switch the hook for the cart wrapper to play more nicely with the default theme
By switching we remove the double margin between the default and PP buttons
2020-04-09 18:59:55 +03:00
Mészáros Róbert
52052ad919 Create a renderer method and fix the mini cart bootstrap init logic 2020-04-09 18:46:41 +03:00
Mészáros Róbert
7e8511732e Code Beautifier and Fixer 2020-04-09 18:15:57 +03:00
Mészáros Róbert
ab55b2dfc9 Only render the button wrapper if it's enabled from settings 2020-04-09 18:15:44 +03:00
Mészáros Róbert
3f81faa045 Add title, description and button context enabler settings 2020-04-09 18:14:27 +03:00
David Remer
bd8e69129f
Merge pull request #2 from inpsyde/feature-separate-context-bootstappers
Separate bootstrap logic based on the button context
2020-04-09 15:10:10 +03:00
David Remer
4f20d31f66 resolve merge conflict 2020-04-09 15:08:20 +03:00
Mészáros Róbert
36ca26d27d Make the shouldRender return type more explicit 2020-04-09 15:00:51 +03:00
Mészáros Róbert
a01866549c Group the mini-cart context bootstrapper 2020-04-09 14:55:04 +03:00
Mészáros Róbert
f6051f56f2 Disable PHPCS rules as it implements an interface 2020-04-09 14:48:25 +03:00
Mészáros Róbert
8ff6ef7bd5 Run Code Beautifier and Fixer 2020-04-09 14:36:52 +03:00
Mészáros Róbert
984b0a23e9 Implement Container interface for the Settings 2020-04-09 14:35:19 +03:00
Mészáros Róbert
bc3234647c Don't render the button of the gateway is temporarily disabled 2020-04-09 14:34:45 +03:00
Mészáros Róbert
d7f2e33e60 Add settings and settings field class 2020-04-09 14:06:22 +03:00
David Remer
8a16329c29 add more params to the js-sdk-url 2020-04-09 13:06:02 +03:00
Mészáros Róbert
9fcc70f837 Add compiled assets file 2020-04-09 12:57:39 +03:00
Mészáros Róbert
fe2d7d170f Check if the buttons are there before rendering it
In some cases WC replaces the checkout form only partially leaving the buttons there
2020-04-09 12:57:21 +03:00
Mészáros Róbert
d31987ed46 Pass PayPalCommerceGateway as a dependency 2020-04-09 12:56:05 +03:00
David Remer
af7a67c30a localize paypal smartbuttons 2020-04-09 12:50:10 +03:00
David Remer
d554fafab9 use transient to store auth token 2020-04-09 12:27:08 +03:00
Mészáros Róbert
493ae20d91 Trigger the toggle function just in case
Sometimes the button gets disabled before the observer is registered
2020-04-09 12:25:45 +03:00
Mészáros Róbert
e3041ed5e6 Pass the Renderer as a dependency 2020-04-09 12:25:41 +03:00
David Remer
38e105b00c add shipping when creating purchase units from cart 2020-04-09 12:14:19 +03:00
Mészáros Róbert
986cec7fef Wrapper the button toggle functionality and use that instead of relying of events 2020-04-09 11:54:19 +03:00
Mészáros Róbert
88e723bda5 Use the available method to toggle the buttons 2020-04-09 11:49:24 +03:00
David Remer
1b04e79f78 return an already captured order, when trying to capture it. 2020-04-09 11:24:14 +03:00
David Remer
9b3b58b766 remove unused use statement 2020-04-09 11:12:57 +03:00
David Remer
b0acc20435 simplyfy session factory 2020-04-09 11:10:38 +03:00
David Remer
0ef75351cc Merge branch 'master' of github.com:inpsyde/woocommerce-paypal-commerce-gateway 2020-04-09 11:07:15 +03:00
David Remer
4be9753887 repare smartButton factory 2020-04-09 11:06:18 +03:00
Mészáros Róbert
5990d9766b Add shouldRender method for the context bootstrappers 2020-04-09 10:49:37 +03:00
Mészáros Róbert
40d23710c6 Return the SessionHandler if WC session is null
Without this REST API request on the admin side return 500 as the is_admin check is not enough
2020-04-09 10:15:10 +03:00
David Remer
4a5e805534 fix context for checkout. do not assign checkout context when already in a paypal session 2020-04-09 09:33:57 +03:00
David Remer
74129c5914 checkout immediately after going through paypal on the checkout page 2020-04-09 09:33:18 +03:00
David Remer
a6eb731590 fix buttons on checkout 2020-04-09 09:11:45 +03:00
David Remer
8ff6ba320e add commit=false to script when not in checkout 2020-04-09 09:10:25 +03:00
David Remer
1725335e0b add discounts when creating orders 2020-04-09 09:10:24 +03:00
David Remer
20f7adc9bf fix address mapping 2020-04-09 09:10:24 +03:00
Mészáros Róbert
9f1a633ad9 Add compiled assets file 2020-04-08 19:44:23 +03:00
Mészáros Róbert
353deb1313 Don't render the button if the user approved the payment 2020-04-08 19:44:11 +03:00
Mészáros Róbert
d500691730 Add compiled assets file 2020-04-08 18:55:11 +03:00
Mészáros Róbert
e44b7c26d4 Remove redundant comment 2020-04-08 18:55:02 +03:00
Mészáros Róbert
b139bb44e8 Add compiled assets file 2020-04-08 18:52:25 +03:00
Mészáros Róbert
01e88daf0a Split to bootstrap logic based on the button context 2020-04-08 18:52:19 +03:00
Mészáros Róbert
4b9147fce4 Use the default button wrapper on the checkout 2020-04-08 17:50:10 +03:00
David Remer
774ae69762
Merge pull request #1 from inpsyde/feature-paypal-button-on-checkout
PayPal button on checkout
2020-04-08 17:17:52 +03:00
Mészáros Róbert
7e88360436 Add compiled assets file 2020-04-08 17:02:06 +03:00
Mészáros Róbert
561fac7bfc Use the exposed cancel selector instead of hardcoded one 2020-04-08 17:01:57 +03:00