Support

Account

Home Forums Backend Issues (wp-admin) Conditional Logic not working? Reply To: Conditional Logic not working?

  • I hacked api-field.php with the following snippet to stop the stack trace and allow me to access the back end again until the update with the fix is released.

    It just checks to see if $groups in an array, in this case the value for conditional_logic was an int. The error happened because the code was trying to do a foreach() on the non array.

    
    		if ( is_array ( $groups) ) {
    
      			// remove empty rules
    			foreach( $groups as $group ) {
    			
    				if( !empty($group) ) {
    				
    					$field['conditional_logic'][] = $group;
    				
    				}
    			}
    
    		} else {
    
    			$field['conditional_logic'][] = $group;
    
    		}
    

    I am sure this is not a fix, rather just a band-aid to stop the bleeding. It does give me access to wp-admin again 🙂