Import expiry date

Is it possible to import the listing’s expiry date using your CSV import plugin?

Thank you

Probably :
You should try matching with hp_expired_time or expired_time.

Hi,

Unfortunately, there is no such feature, it will require a custom implementation. As a temporary solution, we can provide a PHP snippet. Let me know if it works for you.

Yes, please, a PHP snippet would be great.

Thank you

Hi! Thank you for answering! I’m using their own csv import plugin and I’m not even getting the option to do it. Apparently it doesn’t currently exist.

Thank you for your help though!!

Please try this code snippet:

add_filter(
	'hivepress/v1/models/listing/attributes',
	function ( $attributes ) {
		$attributes['expired_time'] = [
			'editable'   => true,

			'edit_field' => [
				'label'        => 'Expiration Time',
				'type'         => 'date',
				'display_type' => 'hidden',
				'format'       => 'U',
				'readonly'     => true,
				'_order'       => 2,
			],
		];

		return $attributes;
	},
	1000
);

It adds a new field for mapping Awesome Screenshot Please note that it accepts dates in timestamp format.

Hope this helps

Thank you, that worked!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.