• Resolved borkenkaefer

    (@borkenkaefer)


    Hello

    I have a custom user meta field with comma separated values. Now I can’t use those values as string, but I need them as an array. I need to change them to an array after the import … Now I do that with a custom action hook in importer.php.

    Could you please add useful filters and hooks to your plugin for theme developers?

    Like do_action( 'after_acui_import_users' ) in importer.php at the end of the import? Or maybe a filter for core_fields in acui_modify_user_edit_admin?

    This would be very nice …

    BTW: Is there a github repo of your plugin?

    https://wordpress.org/plugins/import-users-from-csv-with-meta/

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

    (@carazo)

    borkenkaefer,

    We have no a GitHub repo of this plugin, sorry.

    What are you asking seems to be very reasonable. I have to add some hooks.

    Other times we use to ask for support for new features, I think this one is good for everyone and easy to implement so I will do it for free but yes, any donation would be really appreciated 😉 and also some good review.

    You will see update soon with hooks.

    Thread Starter borkenkaefer

    (@borkenkaefer)

    Another thought: Maybe importer.php could check, if $data[$i] value (around line 243) contains a comma separated string, then split it up and turn it into an array … Just a thought.

    Yet another thought: It would be nice, as a developer, to have a action hook just after checking if there is any data to manipulate data before saving/updating it. For example for preparing a given CSV file with correct column titles.

    And BTW: I just donated a small amount. 🙂

    Plugin Author Javier Carazo

    (@carazo)

    borkenkaefer,

    Yes we can do it something like maybe_unserialize, I have to see it and yes, we could do it.

    I don’t understand good the second question.

    Thanks for the donation! It helps! If everyuser would donate a bit we could do it much bigger.

    Thread Starter borkenkaefer

    (@borkenkaefer)

    Hey,

    I added two hooks for my purpose.

    First, there is do_action('pre_acui_import_single_user', $headers, $data ); around line 120 in importer.php. I have a column named “categories” of which I create new terms of a certain category.

    Second, there is do_action( ‘after_acui_import_users’ ); around line 365 in importer.php. I need this to create an array out of a string with multiple comma separated values.

    You’ll find the adaptions in my github repo. I added an example hooks.php file, too. See https://github.com/brknkfr/import-users-from-csv-with-meta

    Plugin Author Javier Carazo

    (@carazo)

    Next version is prepared with this and more features.

    I have prepared it but I am out, I will arrive on Monday and I will release new version.

    Thanks.

    Plugin Author Javier Carazo

    (@carazo)

    borkenkaefer,

    Please don’t believe I have forgotten all this. I have had two very busy weeks and now I will be offline for a week.

    When I return, I will do it and release 1.9 with new features 🙂

    Plugin Author Javier Carazo

    (@carazo)

    Update done! Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Feature request: Add filters and hooks?’ is closed to new replies.