From bf52b48ae8d31dbb1bb8872f5da2e3a71b5f0c66 Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Mon, 21 Oct 2024 11:05:12 +0200 Subject: [PATCH] Axo: Remove the submit button when Fastlane is disabled --- modules/ppcp-axo/src/AxoModule.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ppcp-axo/src/AxoModule.php b/modules/ppcp-axo/src/AxoModule.php index a0470aeac..512f61cb2 100644 --- a/modules/ppcp-axo/src/AxoModule.php +++ b/modules/ppcp-axo/src/AxoModule.php @@ -222,8 +222,10 @@ class AxoModule implements ServiceModule, ExtendingModule, ExecutableModule { // Render submit button. add_action( $manager->checkout_button_renderer_hook(), - static function () use ( $c, $manager ) { - $manager->render_checkout_button(); + static function () use ( $c, $manager, $module ) { + if ( $module->should_render_fastlane( $c ) ) { + $manager->render_checkout_button(); + } } );