JReviews logo Docs
Menu
Version

import:listing.data_before_save

Filters listing data during CSV import before saving to database. Custom fields are in $data['fields'] as arrays (converted from asterisk format). Standard fields are at root level. Must return data with same structure.

Filter
Other
Since 6.0.0

You need to have a working knowledge of Hooks before you get started.

Fires during CSV import after data transformation but before saving listing

Parameters

Name Type Description
$data array Data array with standard fields at root and custom fields in 'fields' key as arrays
$listing \JReviews\App\Models\Listing|null The listing being updated (null for new listings)

Boilerplate Code

Use the boilerplate code to start using the filter, and add your own logic to modify the first argument and return it.

fwd_add_filter('import:listing.data_before_save', function($data, $listing)
{
    // Your code here
    
    return $data;
});
Development & Support
Customizations are not included with support. We provide this information to make it easier for developers to extend the functionality. From time to time we may have some availability for custom work. Get in touch to see if there's an opportunity to work together.

Source Files

  • app/Actions/HandleListingImportJobAction.php