PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0
GiveWP – Donation Plugin and Fundraising Platform v4.18.0
4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 All 257 releases
← All changes | src/PaymentGateways/Gateways/ServiceProvider.php +6 -2 4.16.7.2 → 4.18.0 View file →
@@ -57,8 +57,9 @@
57 57 }
58 58 }
59 59
60 60 /**
61 + * @since 4.16.8 register TestOffsiteGateway when GIVEWP_ENABLE_TEST_OFFSITE_GATEWAY is set
61 62 * @since 3.0.0
62 63 *
63 64 * @throws Exception
64 65 * @throws OverflowException
@@ -65,10 +66,13 @@
65 66 */
66 67 private function registerGateways()
67 68 {
68 69 add_action('givewp_register_payment_gateway', static function (PaymentGatewayRegister $registrar) {
69 - // Enable as needed for testing but do not push to production
70 - // $registrar->registerGateway(TestOffsiteGateway::class);
70 + // Not for production: it completes donations without charging anyone. The e2e suite turns it
71 + // on through .wp-env.json to walk an offsite redirect end to end.
72 + if (defined('GIVEWP_ENABLE_TEST_OFFSITE_GATEWAY') && GIVEWP_ENABLE_TEST_OFFSITE_GATEWAY) {
73 + $registrar->registerGateway(TestOffsiteGateway::class);
74 + }
71 75
72 76 $registrar->registerGateway(StripePaymentElementGateway::class);
73 77
74 78 $registrar->registerGateway(PayPalCommerceGateway::class);