wc_reset_order_customer_id_on_deleted_user بازگردانی آیدی کاربر در زمان حذف
تابع ووکامرسی wc_reset_order_customer_id_on_deleted_user – بازگردانی آیدی کاربر در زمان حذف آن
Syntax – سینتکس
wc_reset_order_customer_id_on_deleted_user( (int) $user_id );
Parameters – پارامتر ها (1)
- 1- $user_id (int)
Usage – نحوه استفاده
if ( !function_exists( 'wc_reset_order_customer_id_on_deleted_user' ) ) { 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_reset_order_customer_id_on_deleted_user($user_id);
Defined – محل تعریف
/includes/wc-user-functions.php
function wc_reset_order_customer_id_on_deleted_user( $user_id ) { global $wpdb; $wpdb->update( $wpdb->postmeta, array( 'meta_value' => 0 ), array( 'meta_key' => '_customer_user', 'meta_value' => $user_id ) ); }
versions – نسخه ها
از نسخه : 3.0.2
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر