Posts are not filtered
-
WP 4.1
jQuery 1.11.1After setting for example last 7 days and submitting filters, the url looks like this:
wp-admin/edit.php?orderby=date&order=asc&s&post_status=all&post_type=shop_order&action=-1&m=0&date_predefined=last-7-days&date_from&date_to=2015%2F02%2F05&method_id&payment_method_id&_customer_user&filter_action=Filtrovat&paged=1&mode=list&action2=-1
no date_from is set that means that in the function
filter_main_query
defined in date-range-filter.php, the condition fails and no date range of the query is set.by debugging in admin.js, the code
console.log({ key: $wrapper.find( 'select.field-predefined' ).find( ':selected' ).val(), start: $wrapper.find( '.date-inputs .field-from' ).val(), end: $wrapper.find( '.date-inputs .field-to' ).val() });
that is put in
predefined.on({
(line 61)gives me this console output:
Object { key="last-7-days", end="2015/02/05", start=""}
no start date set, also whatever set, end date stays the same.
Do you have any idea what may be wrong?
values ofto_val
andfrom_val
are correct, and outputting to console is called after setting values to input fields, just seems to me that they are not set properly..Thank you.
- The topic ‘Posts are not filtered’ is closed to new replies.