Fix CI errors

This commit is contained in:
dinamiko 2022-01-03 15:15:33 +01:00
parent 2c0a7596e5
commit d33ca00ac7
6 changed files with 33 additions and 15 deletions

View file

@ -98,9 +98,16 @@ class VaultingModule implements ModuleInterface {
}
);
add_action('woocommerce_created_customer', function($customer_id) {
update_user_meta($customer_id, 'ppcp_guest_customer_id', WC()->session->get('ppcp_guest_customer_id'));
});
$subscription_helper = $container->get( 'subscription.helper' );
add_action(
'woocommerce_created_customer',
function( $customer_id ) use ( $subscription_helper ) {
$guest_customer_id = WC()->session->get( 'ppcp_guest_customer_id' );
if ( $guest_customer_id && $subscription_helper->cart_contains_subscription() ) {
update_user_meta( $customer_id, 'ppcp_guest_customer_id', WC()->session->get( 'ppcp_guest_customer_id' ) );
}
}
);
$asset_loader = $container->get( 'vaulting.assets.myaccount-payments' );
add_action(