wc_get_account_saved_payment_methods_list_item_echeck کنترل چک

تابع ووکامرسی wc_get_account_saved_payment_methods_list_item_echeck – کنترل روش پرداخت با چک
Syntax – سینتکس
(array) wc_get_account_saved_payment_methods_list_item_echeck( (array) $item, (WC_Payment_Token) $payment_token );
Parameters – پارامتر ها (2)
- 1- $item (array)
- 2- $payment_token (WC_Payment_Token)
Returns – مقادیر بازگشتی (array)
Filtered item
Usage – نحوه استفاده
if ( !function_exists( 'wc_get_account_saved_payment_methods_list_item_echeck' ) ) {
require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-account-functions.php';
}
// Individual list item from woocommerce_saved_payment_methods_list
$item = array();
// The payment token associated with this method entry
$payment_token = null;
// NOTICE! Understand what this does before running.
$result = wc_get_account_saved_payment_methods_list_item_echeck($item, $payment_token);
Defined – محل تعریف
/includes/wc-account-functions.php
function wc_get_account_saved_payment_methods_list_item_echeck( $item, $payment_token ) {
if ( 'echeck' !== strtolower( $payment_token->get_type() ) ) {
return $item;
}
$item['method']['last4'] = $payment_token->get_last4();
$item['method']['brand'] = esc_html__( 'eCheck', woocommerce );
return $item;
}
versions – نسخه ها
از نسخه : 2.6
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر