# Info about renew of the Listing by the Vendor

**URL:** <https://community.hivepress.io/t/info-about-renew-of-the-listing-by-the-vendor/11853>\
**Category:** Search Alerts\
**Tags:** search-alerts\
**Created:** [August 19, 2024, 8:55am UTC](https://community.hivepress.io/t/info-about-renew-of-the-listing-by-the-vendor/11853 "2024-08-19T08:55:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomanija](https://community.hivepress.io/letter_avatar_proxy/v4/letter/t/a5b964/32.png) [@Tomanija](https://community.hivepress.io/u/Tomanija)\
**Post date:** [August 19, 2024, 8:55am UTC](https://community.hivepress.io/t/info-about-renew-of-the-listing-by-the-vendor/11853/1 "2024-08-19T08:55:07Z")

</div>

Is there any way to see which listing has been renewed by the vendors? I have activated search alerts for everything without any filters, so I am receiving information that a listing was reactivated, but I don’t know which one.

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [August 20, 2024, 1:03pm UTC](https://community.hivepress.io/t/info-about-renew-of-the-listing-by-the-vendor/11853/4 "2024-08-20T13:03:20Z")

</div>

Hi,

Unfortunately, there is no way to see which listings are there, only a link to the search results page in the email will be displayed, and there you can simply view new listings.

​I hope this is helpful to you.

---

<div class="post-metadata">

**Author:** ![Tomanija](https://community.hivepress.io/letter_avatar_proxy/v4/letter/t/a5b964/32.png) [@Tomanija](https://community.hivepress.io/u/Tomanija)\
**Post date:** [August 20, 2024, 2:09pm UTC](https://community.hivepress.io/t/info-about-renew-of-the-listing-by-the-vendor/11853/5 "2024-08-20T14:09:38Z")

</div>

Thank you for the prompt reply.  
With the link, I can see all the listings. Vendors have a yearly subscription, but after 30 days, when a listing expires, they can reactivate it. I need a way to identify which listings were reactivated.

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [August 21, 2024, 1:08pm UTC](https://community.hivepress.io/t/info-about-renew-of-the-listing-by-the-vendor/11853/8 "2024-08-21T13:08:17Z")

</div>

Hi,

Unfortunately, this is not possible because Search Alerts does not differ between renewed listings and new ones, and will send emails if there is at least one new listing.

As a workaround, we can provide a PHP snippet that will send an email to the administrator if the listing has been renewed.

---

<div class="post-metadata">

**Author:** ![Tomanija](https://community.hivepress.io/letter_avatar_proxy/v4/letter/t/a5b964/32.png) [@Tomanija](https://community.hivepress.io/u/Tomanija)\
**Post date:** [August 21, 2024, 2:23pm UTC](https://community.hivepress.io/t/info-about-renew-of-the-listing-by-the-vendor/11853/9 "2024-08-21T14:23:29Z")

</div>

Hi Andrii,  
Please provide the snippet.

---

<div class="post-metadata">

**Author:** ![ihor](https://community.hivepress.io/user_avatar/community.hivepress.io/ihor/32/5_2.png) [@ihor](https://community.hivepress.io/u/ihor)\
**Post date:** [August 22, 2024, 11:58am UTC](https://community.hivepress.io/t/info-about-renew-of-the-listing-by-the-vendor/11853/11 "2024-08-22T11:58:03Z")

</div>

Please try this one:

```auto
add_action(
	'hivepress/v1/models/listing/update_status',
	function( $listing_id, $new_status, $old_status, $listing ) {
		if ( 'draft' === $old_status && 'publish' === $new_status && strtotime( $listing->get_created_date() ) === time() ) {
			wp_mail( get_option( 'admin_email' ), 'Listing Renewed', get_permalink( $listing_id ) );
		}
	},
	10,
	4
);

```

It sends the listing URL to the site admin when the listing is renewed.

---

<div class="post-metadata">

**Author:** ![Tomanija](https://community.hivepress.io/letter_avatar_proxy/v4/letter/t/a5b964/32.png) [@Tomanija](https://community.hivepress.io/u/Tomanija)\
**Post date:** [August 22, 2024, 1:07pm UTC](https://community.hivepress.io/t/info-about-renew-of-the-listing-by-the-vendor/11853/12 "2024-08-22T13:07:48Z")

</div>

Thank you, will try it.

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [September 21, 2024, 1:14pm UTC](https://community.hivepress.io/t/info-about-renew-of-the-listing-by-the-vendor/11853/14 "2024-09-21T13:14:41Z")

</div>

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