حذف فیلدهای ووکامرس از شناسه کاربران

  • نویسنده موضوع sir1
  • تاریخ شروع

sir1

کاربر عضو
سلام
یکسری فیلد اضافی ووکامرس به بخش شناسه کاربران اضافه شده است که میخام کلیه این فیلدها را حذف کنم و رکورد آنها در دیتابیس هم پاک شود.
 

پیوست‌ها

  • shenase.png
    shenase.png
    23.5 کیلوبایت · بازدیدها: 6

Mohammad

مدیر انجمن
پرسنل مدیریت
وقتی ووکامرس نصب می کنید هیچ کس به پیشخوان دسترسی نداره مگر ویرایشگرها (منظور مشتریان دسترسی ندارند)
برای اینکه در صفحه تسویه حساب نبینه
از افزونه woocommerce checkout manager استفاده کنید.
 
  • Like
واکنش‌ها[ی پسندها]: sir1

sir1

کاربر عضو
وقتی ووکامرس نصب می کنید هیچ کس به پیشخوان دسترسی نداره مگر ویرایشگرها (منظور مشتریان دسترسی ندارند)
برای اینکه در صفحه تسویه حساب نبینه
از افزونه woocommerce checkout manager استفاده کنید.
سلام مهندس
این افزونه برای حذف فیلدها در صفحه تسویه حساب است در حالی که من کاری به بخش تسویه حساب ندارم.
الان برای همه کاربران یکسری فیلد در بخش شناسنامه در پیشخوان ایجاد شده که در واقع اضافی هستند و رکودهای زیادی را در جدول USERMETA دیتابیس ایجاد کرده که میخوام حداقل با حذف این بخش های ووکامرس از شناسنامه یه خورده سبکش کنم.
چون در حالت عادی این جداول نباید به بخش شناسنامه کاربران اضافه بشه.

آدرس ارسال صورت‌حساب مشتری
آدرس حمل و نقل مشتری

این دوتا به شناسه کاربران اضافه شدن که هر کدومش شامل نام و نام خانوادگی, شرکت, ادامه آدرس, کد پستی, کشور, استان, تلفن و آدرس ایمیل است.
 

Mohammad

مدیر انجمن
پرسنل مدیریت
با CSS و جاوا اسکریپت مثلا میتونی مخفی کنی.
PHP:
function remove_personal_options(){
    echo '<script type="text/javascript">jQuery(document).ready(function($) {
 
$(\'form#your-profile > h2:first\').remove(); // remove the "Personal Options" title
 
$(\'form#your-profile tr.user-rich-editing-wrap\').remove(); // remove the "Visual Editor" field
 
$(\'form#your-profile tr.user-admin-color-wrap\').remove(); // remove the "Admin Color Scheme" field
 
$(\'form#your-profile tr.user-comment-shortcuts-wrap\').remove(); // remove the "Keyboard Shortcuts" field
 
$(\'form#your-profile tr.user-admin-bar-front-wrap\').remove(); // remove the "Toolbar" field
 
$(\'form#your-profile tr.user-language-wrap\').remove(); // remove the "Language" field
 
$(\'form#your-profile tr.user-first-name-wrap\').remove(); // remove the "First Name" field
 
$(\'form#your-profile tr.user-last-name-wrap\').remove(); // remove the "Last Name" field
 
$(\'form#your-profile tr.user-nickname-wrap\').hide(); // Hide the "nickname" field
 
$(\'table.form-table tr.user-display-name-wrap\').remove(); // remove the “Display name publicly as” field
 
$(\'table.form-table tr.user-url-wrap\').remove();// remove the "Website" field in the "Contact Info" section
 
$(\'h2:contains("About Yourself"), h2:contains("About the user")\').remove(); // remove the "About Yourself" and "About the user" titles
 
$(\'form#your-profile tr.user-description-wrap\').remove(); // remove the "Biographical Info" field
 
$(\'form#your-profile tr.user-profile-picture\').remove(); // remove the "Profile Picture" field
 
$(\'table.form-table tr.user-aim-wrap\').remove();// remove the "AIM" field in the "Contact Info" section
 
$(\'table.form-table tr.user-yim-wrap\').remove();// remove the "Yahoo IM" field in the "Contact Info" section
 
$(\'table.form-table tr.user-jabber-wrap\').remove();// remove the "Jabber / Google Talk" field in the "Contact Info" section
 
});</script>';
 
}
 
add_action('admin_head','remove_personal_options');
 
  • Like
واکنش‌ها[ی پسندها]: sir1

sir1

کاربر عضو
با CSS و جاوا اسکریپت مثلا میتونی مخفی کنی.
PHP:
function remove_personal_options(){
    echo '<script type="text/javascript">jQuery(document).ready(function($) {

$(\'form#your-profile > h2:first\').remove(); // remove the "Personal Options" title

$(\'form#your-profile tr.user-rich-editing-wrap\').remove(); // remove the "Visual Editor" field

$(\'form#your-profile tr.user-admin-color-wrap\').remove(); // remove the "Admin Color Scheme" field

$(\'form#your-profile tr.user-comment-shortcuts-wrap\').remove(); // remove the "Keyboard Shortcuts" field

$(\'form#your-profile tr.user-admin-bar-front-wrap\').remove(); // remove the "Toolbar" field

$(\'form#your-profile tr.user-language-wrap\').remove(); // remove the "Language" field

$(\'form#your-profile tr.user-first-name-wrap\').remove(); // remove the "First Name" field

$(\'form#your-profile tr.user-last-name-wrap\').remove(); // remove the "Last Name" field

$(\'form#your-profile tr.user-nickname-wrap\').hide(); // Hide the "nickname" field

$(\'table.form-table tr.user-display-name-wrap\').remove(); // remove the “Display name publicly as” field

$(\'table.form-table tr.user-url-wrap\').remove();// remove the "Website" field in the "Contact Info" section

$(\'h2:contains("About Yourself"), h2:contains("About the user")\').remove(); // remove the "About Yourself" and "About the user" titles

$(\'form#your-profile tr.user-description-wrap\').remove(); // remove the "Biographical Info" field

$(\'form#your-profile tr.user-profile-picture\').remove(); // remove the "Profile Picture" field

$(\'table.form-table tr.user-aim-wrap\').remove();// remove the "AIM" field in the "Contact Info" section

$(\'table.form-table tr.user-yim-wrap\').remove();// remove the "Yahoo IM" field in the "Contact Info" section

$(\'table.form-table tr.user-jabber-wrap\').remove();// remove the "Jabber / Google Talk" field in the "Contact Info" section

});</script>';

}

add_action('admin_head','remove_personal_options');
این کد فقط مخفی میکنه؟؟ با محفی کردن مشکل حل نمیشه فقط صورت مسئله پاک میشه
کدوم جدول ووکامرس در دیتابیس اصلی هستن؟
میخام یک بار بک اپ بگیریم و جداول ساخته شده را حذف و سپس ووکامرس را نصب کنم
 

Mohammad

مدیر انجمن
پرسنل مدیریت
درون جدول USER META قرار داره دیتای مربوط به کاربران.
 

sir1

کاربر عضو
درون جدول USER META قرار داره دیتای مربوط به کاربران.
این موردو میدونم
رکوردهای اضافی داخل usermeta رو چجوری پاک کنم. مثلا برای هر کاربر رکوردهای زیر ثبت میشه:
  1. user_login
  2. user_email
  3. last_update
  4. no_captcha
  5. upme-terms-agreement
  6. upme-register-form-name
  7. upme-register-form
  8. display_name
  9. upme_approval_status
  10. upme_user_profile_status
  11. upme_activation_status
  12. upme_activation_code
  13. _upme_search_cache
  14. session_tokens
  15. upme_last_login_time
  16. first_name
  17. last_name
  18. description
  19. rich_editing
  20. syntax_highlighting
  21. comment_shortcuts
  22. admin_color
  23. use_ssl
  24. show_admin_bar_front
  25. locale
  26. wp_capabilities
  27. wp_user_level
  28. _yoast_wpseo_profile_updated
  29. upme_featured_member_level
  30. 1_woocommerce_persistent_cart_
  31. wc_last_active
  32. exp_vip
 
بالا