Support » Plugin: Import and export users and customers » Export filter by registration date by site time zone

  • Resolved yumsun

    (@yumsun)


    Hi,

    I want to filter the export by registration date.
    However, when I specify a date, no one user is exported.

    The user_registered is stored in UTC.
    I can’t filter by local time JST.

    I would like to use pre_get_posts or this plugin’s hook to change the time of narrowing by registration date with wp_date, is it possible?

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

    (@carazo)

    @yumsun,

    You cannot use pre_get_posts because those are users, not posts.

    Anyway, I do not understand you really well, could you try to explain a bit more?

    Thread Starter yumsun

    (@yumsun)

    @carazo

    I was wrong… pre_get_posts has nothing to do with the user list.

    Anyway, filtering by registration date is not working correctly.
    The WordPress admin panel runs on local time, but the user’s registration date is stored in UTC. So in our country there is a 9 hour difference, so when I specify the registration date in your plugin, the Export data is empty.

    I wish there was a hook where I could edit the query to get the list…

    Best regards,
    yumsun

    Plugin Author Javier Carazo

    (@carazo)

    @yumsun,

    Yes, I can add hook, where would you need it?

    Thread Starter yumsun

    (@yumsun)

    @carazo

    I wanted to convert the values of the ‘from’ and ‘to’ fields of
    ‘User created’ export condition to UTC, so I thought it would be possible if I could hook
    the query condition of get_user_id_list().

    Thanks and regards,
    yumsun

    Plugin Author Javier Carazo

    (@carazo)

    OK something like this will work?

    
    $from = apply_filters( 'acui_export_from_date', $from );
    $to = apply_filters( 'acui_export_from_date', $to );
    $users = $this->get_user_id_list( $role, $from, $to );
    
    Thread Starter yumsun

    (@yumsun)

    @carazo
    Yes, it is possible with the from and to filters.
    Does it matter if the filter names for from and to are the same?

    Plugin Author Javier Carazo

    (@carazo)

    @yumsun,

    No, it will be different, but you will be able to use it with same callback.

    It will appear in next version.

    Thread Starter yumsun

    (@yumsun)

    @carazo

    OK! Thanks, When will the next version be updated?

    Plugin Author Javier Carazo

    (@carazo)

    This is already done.

    Thread Starter yumsun

    (@yumsun)

    @carazo

    Thank you for your quick support and feature additions.
    I used the added filters to narrow down the export users by registration date from / to.

    The names of the filters were as follows.

    
    $from = apply_filters( 'acui_export_user_registered_from_date', $from );
    $to = apply_filters( 'acui_export_user_registered_to_date', $to );
    

    From my country, I can’t send money using the PayPal donation button, so can I use the following account name as the direct recipient?
    arbimportusers@gmail.com

    Thanks,
    yumsun

    Plugin Author Javier Carazo

    (@carazo)

    Yes, this is the PayPal donation address of this plugin: arbimportusers@gmail.com

    Thanks in advance, any other thing you think is needed, tell us to improve the plugin.

    Thread Starter yumsun

    (@yumsun)

    @carazo

    Thanks for letting me know about the PayPal account.
    I used it only for exporting this time, but your plugin is full of hooks and very customizable for a great experience. I will use it again for the next project.

    Thanks and Stay safe,
    yumsun

    Plugin Author Javier Carazo

    (@carazo)

    Any other hook or feature you think it is interesting, let me know!

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