woocommerce_current_user_can_edit_customer_meta_fields

woocommerce_current_user_can_edit_customer_meta_fields

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_current_user_can_edit_customer_meta_fields') is found 2 times:

  • /includes/admin/class-wc-admin-profile.php line 162
    		 *
    		 * @param WP_User $user
    		 */
    		public function add_customer_meta_fields( $user ) {
    			if ( ! apply_filters( 'woocommerce_current_user_can_edit_customer_meta_fields', current_user_can( 'manage_woocommerce' ), $user->ID ) ) {
    				return;
    			}
    
    			$show_fields = $this->get_customer_meta_fields();
    
    			foreach ( $show_fields as $fieldset_key => $fieldset ) :
    
  • /includes/admin/class-wc-admin-profile.php line 209
    		 *
    		 * @param int $user_id User ID of the user being saved
    		 */
    		public function save_customer_meta_fields( $user_id ) {
    			if ( ! apply_filters( 'woocommerce_current_user_can_edit_customer_meta_fields', current_user_can( 'manage_woocommerce' ), $user_id ) ) {
    				return;
    			}
    
    			$save_fields = $this->get_customer_meta_fields();
    
    			foreach ( $save_fields as $fieldset_type => $fieldset ) {