wc_get_customer_saved_methods_list

Get customer saved payment methods list.

Description

(array) wc_get_customer_saved_methods_list( (int) $customer_id ); 

Returns (array)

Parameters (1)

0. $customer_id (int)
The customer id.

Usage

  1. if ( !function_exists( 'wc_get_customer_saved_methods_list' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-user-functions.php'; 
  3.  
  4. // The customer id. 
  5. $customer_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wc_get_customer_saved_methods_list($customer_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-user-functions.php  
  1. function wc_get_customer_saved_methods_list( $customer_id ) { 
  2. return apply_filters( 'woocommerce_saved_payment_methods_list', array(), $customer_id );