• Resolved lens2016

    (@lens2016)


    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

    (@wpallimport)

    Hi @lens2016,

    If you go to Jobs ? Settings ? Job Submission (see 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

    (@lens2016)

    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

    (@wpallimport)

    Hey @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 ( https://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

    (@lens2016)

    Thanks :).

    • This reply was modified 2 years, 8 months ago by lens2016.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Avoid setting expiry date’ is closed to new replies.