mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
check if axo is enabled or not for buttons
This commit is contained in:
parent
d5f0ada0ce
commit
947f20a2a5
3 changed files with 11 additions and 3 deletions
|
@ -92,7 +92,10 @@ class AxoBlockModule implements ServiceModule, ExtendingModule, ExecutableModule
|
|||
*/
|
||||
add_filter(
|
||||
'woocommerce_paypal_payments_sdk_components_hook',
|
||||
function( $components ) {
|
||||
function( $components ) use ( $c ) {
|
||||
if ( ! $c->has( 'axo.available' ) || ! $c->get( 'axo.available' ) ) {
|
||||
return $components;
|
||||
}
|
||||
$components[] = 'fastlane';
|
||||
return $components;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue