Posts not expiring

This topic contains 10 replies, has 4 voices, and was last updated by  Kiran 6 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #454181

    emendesign
    Full Member
    Post count: 74

    Hello,
    We have CPT posts that were imported in and the expiration dates have since past and their post didn’t expire.

    Can you help out?

    Thanks.

    #454182

    emendesign
    Full Member
    Post count: 74

    Here are the settings we have.

    #454220

    Paolo
    Site Admin
    Post count: 31206

    Please provide a link, admin credentials and the name of a listing that should be expired and we will check.

    Thanks

    #454321

    emendesign
    Full Member
    Post count: 74
    This reply has been marked as private.
    #454330

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #454335

    emendesign
    Full Member
    Post count: 74
    This reply has been marked as private.
    #454350

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #454381

    emendesign
    Full Member
    Post count: 74
    This reply has been marked as private.
    #454383

    Alex Rollin
    Moderator
    Post count: 27815

    Yes

    #454612

    emendesign
    Full Member
    Post count: 74
    This reply has been marked as private.
    #454954

    Kiran
    Moderator
    Post count: 7069

    Hello,

    Add following code snippet in your child theme functions.php file or via any snippet plugin. This will add new custom option at GeoDirectory > Prices & Payments > General > “Enable expiry process?” > “Select the listing status after the place listing expires.”. Choose custom status from here to assigned it to expired listing.

    
    
    /*
     * Add custom expire status
     */
    function _gd_snippet_custom_expire_status( $settings ) {
    	$custom_status_id = 'custom_status'; // Change custom status id of your registered custom status
    	$custom_status_name = __( 'Custom Status' ); // Change custom status name of your registered custom status
    
    	foreach ( $settings as $key => $setting ) {
    		if ( ! empty( $setting['id'] ) && $setting['id'] == 'geodir_listing_ex_status' && ! empty( $setting['options'] ) ) {
    			$settings[ $key ]['options'][ $custom_status_id ] = $custom_status_name;
    		}
    	}
    	return $settings;
    }
    add_filter( 'payment_invoice_options', '_gd_snippet_custom_expire_status', 20, 1 );

    Kiran

Viewing 11 posts - 1 through 11 (of 11 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount