Advertisement
verygoodplugins

Untitled

Aug 11th, 2022 (edited)
785
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. function custom_format_multiselect( $value, $field_type, $field ) {
  2.  
  3.     if ( 'multiselect' === $field_type && 'GDPR_Consent__c' === $field ) {
  4.  
  5.         if ( ! empty( $value ) ) {
  6.             $value = true;
  7.         } else {
  8.             $value = false;
  9.         }
  10.     }
  11.  
  12.     return $value;
  13.  
  14. }
  15.  
  16. add_filter( 'wpf_format_field_value', 'custom_format_multiselect', 20, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement