Fix CI errors

This commit is contained in:
dinamiko 2022-01-03 15:26:07 +01:00
parent d33ca00ac7
commit f1ae75a07e
2 changed files with 3 additions and 3 deletions

View file

@ -103,7 +103,7 @@ class IdentityToken {
WC()->session->set( 'ppcp_guest_customer_id', $customer_id );
}
$args['body'] = wp_json_encode( array( 'customer_id' => $this->prefix . $customer_id ) );
$args['body'] = wp_json_encode( array( 'customer_id' => $this->prefix . (string) $customer_id ) );
}
$response = $this->request( $url, $args );

View file

@ -101,10 +101,10 @@ class VaultingModule implements ModuleInterface {
$subscription_helper = $container->get( 'subscription.helper' );
add_action(
'woocommerce_created_customer',
function( $customer_id ) use ( $subscription_helper ) {
function( int $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' ) );
update_user_meta( $customer_id, 'ppcp_guest_customer_id', $guest_customer_id );
}
}
);