Title: Avoid setting expiry date
Last modified: January 20, 2022

---

# Avoid setting expiry date

 *  Resolved [lens2016](https://wordpress.org/support/users/lens2016/)
 * (@lens2016)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/avoid-setting-expiry-date/)
 * I have been using the Jobify import addon so far, but as it does not support 
   WP-CLI I had to switch to this addon. One problem I have is that, this addon 
   sets automatically an expiry date when it is left empty on purpose. The Jobify
   addon did not do this.
 * How can I avoid it? I tried to play around with the addon code, but did not quite
   get it to work as I want. Is there a workaround? The jobs I currently import 
   should not expire until they are no longer in the xml feed, when they are deleted
   anyway.
 * Thanks for your help

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/avoid-setting-expiry-date/#post-15306483)
 * Hi [@lens2016](https://wordpress.org/support/users/lens2016/),
 * If you go to _Jobs › Settings › Job Submission_ (see [https://wpjobmanager.com/document/setting-up-wp-job-manager/#section-2](https://wpjobmanager.com/document/setting-up-wp-job-manager/#section-2))
   in WP Job Manager and set the “Listing Duration” field to blank/nothing, then
   WP All Import won’t set an expiry date if you import jobs without one.
 * Let me know how it goes.
 *  Thread Starter [lens2016](https://wordpress.org/support/users/lens2016/)
 * (@lens2016)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/avoid-setting-expiry-date/#post-15306770)
 * Thanks for your feedback. The problem is that I need the expiry date on jobs 
   that are created manually. For jobs I import via feeds I do not want to set an
   expiry date as they expire once they are no longer in the feed. Means that some
   jobs from the feeds may not expire within a year while the manual entered job
   offers need to expire after 30 days.
 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/avoid-setting-expiry-date/#post-15356102)
 * Hey [@lens2016](https://wordpress.org/support/users/lens2016/),
 * In that case, you could set the expiry date to something in the future, like “
   2099-01-01” (just type that into the expiration date field). Or, you could use
   custom code and our API ( [http://www.wpallimport.com/documentation/developers/action-reference/](http://www.wpallimport.com/documentation/developers/action-reference/))
   to delete the expiration date as the listings are imported, e.g.:
 *     ```
       add_action( 'pmxi_saved_post', 'my_delete_expiry', 10, 3 );
   
       function my_delete_expiry( $id, $xml, $update ) {
       	delete_post_meta( $id, '_job_expires' );	
       }
       ```
   
 *  Thread Starter [lens2016](https://wordpress.org/support/users/lens2016/)
 * (@lens2016)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/avoid-setting-expiry-date/#post-15496322)
 * Thanks :).
    -  This reply was modified 4 years, 2 months ago by [lens2016](https://wordpress.org/support/users/lens2016/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Avoid setting expiry date’ is closed to new replies.

 * ![](https://ps.w.org/wp-job-manager-xml-csv-listings-import/assets/icon-256x256.
   png?rev=2570153)
 * [WP All Import – Job Listing Import for WP Job Manager](https://wordpress.org/plugins/wp-job-manager-xml-csv-listings-import/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-job-manager-xml-csv-listings-import/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-job-manager-xml-csv-listings-import/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-job-manager-xml-csv-listings-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-job-manager-xml-csv-listings-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-job-manager-xml-csv-listings-import/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [lens2016](https://wordpress.org/support/users/lens2016/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/avoid-setting-expiry-date/#post-15496322)
 * Status: resolved