Support » Plugin: Import any XML or CSV File to WordPress » Bug with can_update_meta()

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @aberdov

    You should add the $article argument to your import function:

    function my_addon_import_function( $post_id, $data, $import_options, $article ) {

    Then check to see if the ‘ID’ key is empty:

    if ( empty( $article['ID'] ) || $my_addon->can_update_meta( $field_name, $import_options ) ) {
        // update the data
    }

    This will allow you to import the data to newly created posts as well.

    Thank you. It seems to work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug with can_update_meta()’ is closed to new replies.