Code
- wc-user-functions.php ➔ wc_disable_admin_bar()
- wc-user-functions.php ➔ wc_create_new_customer()
- wc-user-functions.php ➔ wc_set_customer_auth_cookie()
- wc-user-functions.php ➔ wc_update_new_customer_past_orders()
- wc-user-functions.php ➔ wc_paying_customer()
- wc-user-functions.php ➔ wc_customer_bought_product()
- wc-user-functions.php ➔ wc_current_user_has_role()
- wc-user-functions.php ➔ wc_user_has_role()
- wc-user-functions.php ➔ wc_customer_has_capability()
- wc-user-functions.php ➔ wc_shop_manager_has_capability()
- wc-user-functions.php ➔ wc_modify_editable_roles()
- wc-user-functions.php ➔ wc_modify_map_meta_cap()
- wc-user-functions.php ➔ wc_get_customer_download_permissions()
- wc-user-functions.php ➔ wc_get_customer_available_downloads()
- wc-user-functions.php ➔ wc_get_customer_total_spent()
- wc-user-functions.php ➔ wc_get_customer_order_count()
- wc-user-functions.php ➔ wc_reset_order_customer_id_on_deleted_user()
- wc-user-functions.php ➔ wc_review_is_from_verified_owner()
- wc-user-functions.php ➔ wc_disable_author_archives_for_customers()
- wc-user-functions.php ➔ wc_update_profile_last_update_time()
- wc-user-functions.php ➔ wc_meta_update_last_update_time()
- wc-user-functions.php ➔ wc_set_user_last_update_time()
- wc-user-functions.php ➔ wc_get_customer_saved_methods_list()
- wc-user-functions.php ➔ wc_get_customer_last_order()
- wc-user-functions.php ➔ wc_user_search_columns()
- wc-user-functions.php ➔ wc_delete_user_data()
- wc-user-functions.php ➔ wc_maybe_store_user_agent()
- wc-user-functions.php ➔ wc_user_logged_in()
- wc-user-functions.php ➔ wc_current_user_is_active()
- wc-user-functions.php ➔ wc_update_user_last_active()
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: