Automattic\WooCommerce\Blocks\BlockTypes
Checkout::hydrate_customer_payment_methods
Get saved customer payment methods for use in checkout.
Method of the class: Checkout{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->hydrate_customer_payment_methods();
Checkout::hydrate_customer_payment_methods() Checkout::hydrate customer payment methods code WC 10.3.3
protected function hydrate_customer_payment_methods() {
$payment_methods = PaymentUtils::get_saved_payment_methods();
if ( ! $payment_methods || $this->asset_data_registry->exists( 'customerPaymentMethods' ) ) {
return;
}
$this->asset_data_registry->add(
'customerPaymentMethods',
is_array( $payment_methods ) ? $payment_methods['enabled'] : null
);
}