WP All Import has a lot of undocumented features in the various hooks, actions and filters implemented in the code. The easiest way to do such a mapping is to add a filter to the pmxi_options_options
and add custom rules. These rules will show up under the Custom Fields accordion during the import configuration step.
<?php
add_filter( 'pmxi_options_options', function( $options ) {
// Match the desired custom post type
if ( $options['custom_type'] != 'product' ) {
return $options;
}
// Configure the custom fields
$options['custom_name']['custom_field_name'] = '_custom_field_name';
$options['custom_value']['custom_field_name'] = '{csv_column[1]}';
$options['custom_mapping_rules']['custom_field_name'] = json_encode( [
'value_from_csv' => 'value_to_custom_field',
'en' => 'English',
] );
return $options;
} );
Related Posts:
- Importing data for advanced custom fields plugin?
- With WordPress Importer, why can’t I import post meta containing a multi-dimensional array, in which value(s) of that array contain line breaks?
- Remove old custom field after import
- importing data from non-wordpress mysql db
- Create Posts using Import>RSS/WXR/XML and pass values to Custom Fields
- Importing users to Buddypress with custom fields
- Importing from XML is ignoring serialized custom field
- Import data from arbitrary CSV to WPAlchemy meta fields
- Problem with serialized arrays in custom meta
- explode array within shortcode
- Can I count the number of users matching a value in a multiple value key?
- WP doesn’t show Array Custom Fields?
- How to delete custom field “suggestions” from dropdown list
- How to save custom fields for attachments
- How to get a meta value from all post
- Adding existing user custom field value to a woocommerce product [closed]
- How to save values of a custom input field on the Network > Site Info screen
- How to load php file for specific page in admin?
- How to set default metaboxes on user creation?
- Exclude custom post type from search by custom field value?
- ajax jquery update custom field meta value front end
- Add input field to ‘Pages > Edit Page’ through functions.php
- Displaying additional User Contact Information
- get_post_meta in sitewide tags plugin fails to return value for custom fields
- Making custom field’s ‘Name’ available in the dropdown list by default in a theme?
- Transition from (classical) serialized custom meta field to (gutenberg) rest enabled meta
- Unable to show ACF’s Image Custom Field properly in Genesis Framework [closed]
- WooCommerce conditional required checkout fields [closed]
- Using more than one meta_key in pre_posts_query
- Delete all custom fields at once?
- Orderby custom field meta value ASC and then by date DESC
- Sorting posts ordered by custom field value
- Odd PHP Code To Display HTML Of Meta Box [closed]
- strtotime and custom field value
- query usermeta from custom field
- Creating author profiles with extra fields and exporting that data?
- WP 3.1 meta_query for multiple custom field values
- Better way to save image in custom field
- Removing link ” from ” on meta_value in custom feilds
- Jetpack post types Portfolio or Testimonials support for custom fields?
- Merge Multiple Custom Fields into one New Custom Field for Searching
- Is there a better way to list all database terms alphabetically?
- How to add a custom field in the advanced menu properties?
- Meta query with multiple custom fields for archives page ordering problem
- filter custom field values $min $max
- Select multiple images from custom field
- Custom Fields – How to create a list from multi-line entries of a single value
- Unique meta_key with array value vs repeated meta_key with single values
- custom field (video/audio url) and embed functionality
- Allow only one post with specific meta value
- Querying posts by latitude and longitude to build a Google Maps with several markers
- How to display childrens custom fields?
- Attach images to posts using custom fields (just paths to images already uploaded)
- how to display custom fields of post on a web page
- Changed PHP handler to DSO – weird custom fields problem [closed]
- How to fill custom fields with brackets in their key with add_post_meta()?
- How to use pre_get_posts to alter posts_per_page of category pages, where ‘posts_per_page’ will be dynamic
- Front-End User Profile
- Displaying pages with a specific custom meta
- How to update user profile custom fields
- How to validation for sanitize_URL?
- How can I output the custom fields wrapping with HTML
- put saved metabox values back into fields and then display on the front end
- How to get custom image field of specific post id
- Custom field to array?
- How to sort by custom field value?
- wp_get_attachment_image_src() with advanced custom fields returning empty
- How to update custom field of a posts in a particular category
- How to query posts by month based on date custom field?
- Change word in woocommerce product category custom field
- get posts based on non-single metadata
- Problem with revisions only returning four results
- Woocommerce products search with custom fields
- Convert author metadata to a custom field
- How to save multiple values with same meta_key, each value linked to another tag id
- Add forms dynamically in admin pages?
- Custom pages or Custom Posts
- get_avatar filter is not working as per requirement
- What WordPress “technology” would I use if I wanted subscribers to be able to mark pages with characteristics and notes?
- WordPress Admin – Automatically Sort Custom Posts by Custom Field Date Value in d-m-Y Fomat
- how can i show WordPress custom field data to my short code?
- how to execute custom field for structured data?
- searching by keywords in post’s metas or pagination links problem
- Permanently show Custom Fields in Editor
- open modal window
- a lot of custom fields
- Hide custom fields by user’s role
- select user with all meta field and field value. I am use Below Query for this ,So any of know another way to fast query instead of below query?
- Retrieve Google API JSON data and store as WordPress Custom Fields
- update meta field value after
- meta_query ‘compare’ => ‘!=’ not working
- If metabox fields has content display content
- Show comon custom field results?
- Display Data From This Custom Media Upload Meta Box?
- Custom fields and auto save
- Save values generated via API as custom meta fields
- Display Child Page with custom fields within Parent Page
- Load code for custom fields only on admin pages?
- Pagination not displaying correct number of pages
- Show/Hide Featured Image or replace it with custom field [closed]