• Resolved devdjny

    (@devdjny)


    Is there a way to specify meta/column to be excluded from timestamp conversion?? The plugin is converting U.S. Zip Codes ( eg. 10017 ) to dates (e g. 1970-01-01 ).

    I do realize that you provide a notice in the Export settings, “If you have problems and you get some value exported as a date that should not be converted to a date, please deactivate this option…”

    Looking for a way to exclude the Zip Code values from the conversion, either by adding a few lines in the plugin code, or by adding a snippet in functions.php

    Great plugin. Thank you for providing it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Javier Carazo

    (@carazo)

    @devdjny,

    You have this filter to avoid this issues: acui_export_non_date_keys

    You can include this key in the array that manage this filter or you can disable the date conversion.

    Thread Starter devdjny

    (@devdjny)

    Thank you. Happy to hear this is available. Can you provide a quick example of how to write the array for the keys to exclude using the example below provided in your documentation? Eg. does below simply a list of comma separated keys where you have “// Code” , or is additional code required? If this request requires premium support, please let me know. Thanks, again!

    Declaration:

    $non_date_keys = apply_filters( ‘acui_export_non_date_keys’, array() );

    Code exemple:

    add_filter( ‘acui_export_non_date_keys’, ‘prefix_acui_export_non_date_keys’ );

    function prefix_acui_export_non_date_keys( $array ) { 

    // Code

    return $array;

    }

    Plugin Author Javier Carazo

    (@carazo)

    Yes, as you would include a new element in an array.

    function prefix_acui_export_non_date_keys( $array ) { 

    $array[] = 'new_element';
    return $array;

    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.