Changeset 3233906
- Timestamp:
- 02/03/2025 11:50:00 AM (14 months ago)
- Location:
- axima-payment-gateway/trunk
- Files:
-
- 2 added
- 2 edited
-
assets/pays.js (added)
-
axima-payment-gateway.php (modified) (1 diff)
-
src/PaymentMethodType.php (added)
-
src/Plugin.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
axima-payment-gateway/trunk/axima-payment-gateway.php
r3123182 r3233906 16 16 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 17 17 * Text Domain: axima-payment-gateway 18 * WC requires at least: 6.0 19 * WC tested up to: 9.6 18 20 */ 19 21 -
axima-payment-gateway/trunk/src/Plugin.php
r3216527 r3233906 7 7 8 8 use DateTime; 9 use Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry; 10 use Automattic\WooCommerce\Utilities\FeaturesUtil; 11 use Pays\PaymentGate\PaymentMethodType; 12 9 13 10 14 class Plugin … … 256 260 } 257 261 262 add_action('before_woocommerce_init', function() use ($file) { 263 if (class_exists('\Automattic\WooCommerce\Utilities\FeaturesUtil')) { 264 // declare checkout blocks compatibility 265 FeaturesUtil::declare_compatibility('cart_checkout_blocks', $file, true); 266 // declare HPOS compatibility 267 FeaturesUtil::declare_compatibility('custom_order_tables', $file, true); 268 } 269 }); 270 271 add_action('woocommerce_blocks_loaded', function() use($file) { 272 if (class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType')) { 273 add_action( 274 'woocommerce_blocks_payment_method_type_registration', function (PaymentMethodRegistry $payment_method_registry) { 275 $payment_method_registry->register(new PaymentMethodType()); 276 }); 277 } 278 }); 279 258 280 add_action('plugins_loaded', function () use ($that) { 259 281 $handlerConfirm = array($that, 'confirmPayment'); … … 272 294 call_user_func(function () { 273 295 require_once __DIR__ . '/Gateway.php'; 296 if (class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType')) { 297 require_once __DIR__ . '/PaymentMethodType.php'; 298 } 274 299 }); 275 300
Note: See TracChangeset
for help on using the changeset viewer.