mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Check if wc session is not null
This commit is contained in:
parent
b5ca63308a
commit
9bf71c2edf
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ class UserIdToken {
|
|||
*/
|
||||
public function id_token( string $target_customer_id = '' ): string {
|
||||
$session_customer_id = '';
|
||||
if ( method_exists( WC()->session, 'get_customer_id' ) ) {
|
||||
if ( ! is_null( WC()->session ) && method_exists( WC()->session, 'get_customer_id' ) ) {
|
||||
$session_customer_id = WC()->session->get_customer_id();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue