Skip to content

Commit

Permalink
Merge branch 'trunk' into modularity-full-migration
Browse files Browse the repository at this point in the history
# Conflicts:
#	modules/ppcp-blocks/src/BlocksModule.php
  • Loading branch information
pedrosilva-pt committed Dec 19, 2023
2 parents e540484 + 4f75762 commit 5837d65
Show file tree
Hide file tree
Showing 150 changed files with 8,572 additions and 3,098 deletions.
6 changes: 6 additions & 0 deletions .psalm/stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
if (!defined('PAYPAL_INTEGRATION_DATE')) {
define('PAYPAL_INTEGRATION_DATE', '2023-06-02');
}
if (!defined('PAYPAL_URL')) {
define( 'PAYPAL_URL', 'https://www.paypal.com' );
}
if (!defined('PAYPAL_SANDBOX_URL')) {
define( 'PAYPAL_SANDBOX_URL', 'https://www.sandbox.paypal.com' );
}
if (!defined('EP_PAGES')) {
define('EP_PAGES', 4096);
}
Expand Down
14 changes: 14 additions & 0 deletions api/order-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
use WooCommerce\PayPalCommerce\WcGateway\Helper\RefundFeesUpdater;
use WooCommerce\PayPalCommerce\WcGateway\Processor\AuthorizedPaymentsProcessor;
use WooCommerce\PayPalCommerce\WcGateway\Processor\OrderProcessor;
use WooCommerce\PayPalCommerce\WcGateway\Processor\RefundProcessor;

/**
Expand All @@ -47,6 +48,19 @@ function ppcp_get_paypal_order( $paypal_id_or_wc_order ): Order {
return $order_endpoint->order( $paypal_id_or_wc_order );
}

/**
* Creates a PayPal order for the given WC order.
*
* @param WC_Order $wc_order The WC order.
* @throws Exception When the operation fails.
*/
function ppcp_create_paypal_order_for_wc_order( WC_Order $wc_order ): Order {
$order_processor = PPCP::container()->get( 'wcgateway.order-processor' );
assert( $order_processor instanceof OrderProcessor );

return $order_processor->create_order( $wc_order );
}

/**
* Captures the PayPal order.
*
Expand Down
32 changes: 32 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
*** Changelog ***

= 2.4.3 - xxxx-xx-xx =
* Fix - PayPal Subscription initiated without a WooCommerce order #1907
* Fix - Block Checkout reloads when submitting order with empty fields #1904
* Fix - "Send checkout billing and shipping data to Apple Pay" displayed when Apple Pay is disabled #1883
* Fix - "Order does not contain intent" error for ACDC renewals when triggering 3D Secure #1888
* Enhancement - Add button to reload feature eligibility status from Connection tab #1902
* Enhancement - Apple Pay validation message improvements #1901
* Enhancement - Improve support for Classic Cart & Classic Checkout blocks #1894
* Enhancement - Ensure uniform button appearance for PayPal, Google Pay, and Apple Pay buttons #1900
* Enhancement - remove string translations for package tracking carriers from repository #1885
* Enhancement - Incorrect margins when PayPal buttons are rendered as separate gateways. #1908
* Feature preview - Save payment methods (Vault v3) integration #1779

= 2.4.2 - 2023-12-04 =
* Fix - Action callback arguments count in ShipStation tracking integration #1841
* Fix - Google Pay scripts loading on unrelated admin pages #1834
* Fix - Do not ignore disabled APMs list in blocks #1865
* Fix - Display Package Tracking metabox below Order actions when HPOS is active #1850
* Fix - ApplePay use checkout form data to update shipping and billing #1832
* Fix - Fix Apple Pay CSS #1872
* Enhancement - Allow redirect to PayPal with "Place order" button if smart buttons failed to load #1840 #1870
* Enhancement - Extend list of supported countries for Package Tracking v2 integration #1848
* Enhancement - Improve Block Theme support for Pay Later messaging #1855
* Enhancement - Render block buttons separately and add block style settings #1858
* Enhancement - Enable Block Cart and Block Express Checkout button locations by default #1852
* Enhancement - Improve single product page button placement with Block themes #1847
* Enhancement - Remove the Home location from default enabled Pay Later messaging locations #1856
* Enhancement - Chrome browser detected as eligible for Apple Pay on settings page #1828
* Enhancement - Hide Apple Pay & Google Pay for subscription type products #1835
* Enhancement - Add Standard Card Button gateway styling settings & preview #1827
* Feature preview - Upgrade to new Hosted Card Fields for Advanced Card Processing #1843

= 2.4.1 - 2023-11-14 =
* Fix - Error "PayPal order ID not found in meta" prevents automations from triggering when buying subscription via third-party payment gateway #1822
* Fix - Card button subscription support declaration #1796
Expand Down
11 changes: 10 additions & 1 deletion modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
( require "$modules_dir/ppcp-onboarding/module.php" )(),
( require "$modules_dir/ppcp-session/module.php" )(),
( require "$modules_dir/ppcp-status-report/module.php" )(),
( require "$modules_dir/ppcp-subscription/module.php" )(),
( require "$modules_dir/ppcp-wc-subscriptions/module.php" )(),
( require "$modules_dir/ppcp-wc-gateway/module.php" )(),
( require "$modules_dir/ppcp-webhooks/module.php" )(),
( require "$modules_dir/ppcp-vaulting/module.php" )(),
( require "$modules_dir/ppcp-order-tracking/module.php" )(),
( require "$modules_dir/ppcp-uninstall/module.php" )(),
( require "$modules_dir/ppcp-blocks/module.php" )(),
( require "$modules_dir/ppcp-paypal-subscriptions/module.php" )(),
);
if ( apply_filters(
// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
Expand Down Expand Up @@ -60,5 +61,13 @@
$modules[] = ( require "$modules_dir/ppcp-card-fields/module.php" )();
}

if ( apply_filters(
//phpcs:disable WordPress.NamingConventions.ValidHookName.UseUnderscores
'woocommerce.feature-flags.woocommerce_paypal_payments.save_payment_methods_enabled',
getenv( 'PCP_SAVE_PAYMENT_METHODS' ) === '1'
) ) {
$modules[] = ( require "$modules_dir/ppcp-save-payment-methods/module.php" )();
}

return $modules;
};
Loading

0 comments on commit 5837d65

Please sign in to comment.