ccsve_generate_query_callback filter
-
Hi, I’m trying to use ccsve_generate_query filter. I’ve a date custom field (added with Toolset) that is exported as a timestamp. So I’m trying to use the filter to convert it to a different format. This is my code:
function ccsve_generate_query_callback($query_arr) { if (isset($_REQUEST['wpcf-time-entry-date']) && $_REQUEST['wpcf-time-entry-date']) { $timestamp = $_REQUEST['wpcf-time-entry-date']; $date = date('Y/m/d', $timestamp); $query_arr['meta_key'] = 'wpcf-time-entry-date'; $query_arr['meta_value'] = $date; } return $query_arr; } add_filter('ccsve_generate_query', 'ccsve_generate_query_callback');
It is not working, in the debug log I don’t see anything.
Any idea?
thanks
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘ccsve_generate_query_callback filter’ is closed to new replies.