wc_get_customer_total_spent بدست آوردن تمامی هزینه های پرداخت شده مشتری

تابع ووکامرسی wc_get_customer_total_spent – بدست آوردن تمامی ( کل ) هزینه های پرداخت شده مشتری
Syntax – سینتکس
(string) wc_get_customer_total_spent( (int) $user_id );
Parameters – پارامتر ها (1)
- 1- $user_id (int)
Usage – نحوه استفاده
if ( !function_exists( 'wc_get_customer_total_spent' ) ) { require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-user-functions.php'; } // The user id. $user_id = -1; // NOTICE! Understand what this does before running. $result = wc_get_customer_total_spent($user_id);
Defined – محل تعریف
/includes/wc-user-functions.php
function wc_get_customer_total_spent( $user_id ) { $customer = new WC_Customer( $user_id ); return $customer->get_total_spent(); }
versions – نسخه ها
از نسخه : 3.0.2
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر