| CARVIEW |
Select Language
HTTP/2 301
date: Mon, 29 Dec 2025 16:11:40 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_pre_delete_feed/
server: cloudflare
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
x-redirect-by: WordPress
fastcgi-cache: MISS
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=Rzmw%2BZ4wvvidVQVGUF3vzr5qLUFpUSJ2f2UQ%2B%2F9JmUQapb1DNxKTkRndCEuOEYZcprUKOBk6A2LJ1bbHI6ji5UACbJ0wwsR38Qb2q6M%2BtbgD5xXt"}]}
cf-ray: 9b5a9311bfedb277-BLR
HTTP/2 200
date: Mon, 29 Dec 2025 16:11:40 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
fastcgi-cache: HIT
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=FNyzE6e5jZVV3w5RCwTd1VuAAQu8djWqGjDulT8tZ4dHtjsa5L7oIJxuSi3oYxa7A%2F%2BklnuwiZYqX%2FrzQHGpWv1i4fahmJuChyYy1StCmFWmQikS"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b5a9318dd50b277-BLR
gform_pre_delete_feed - Gravity Forms Documentation
gform_pre_delete_feed
Description
The gform_pre_delete_feed hook can be used to perform a custom action just before a feed is deleted from the database.
Usage
The hook which would run for all add-ons would be used like so:
add_action( 'gform_pre_delete_feed', 'your_function_name', 10, 2 );
You can target a specific add-on with the following variation of this hook:
add_action( 'gform_{SHORT_SLUG}_pre_delete_feed', 'your_function_name', 10, 2 );
See the Gravity Forms Add-On Slugs article for a list of possible short slugs.
Parameters
- $id int
The ID of the feed being deleted.
-
$addon object
The current instance of the add-on object which extends GFFeedAddOn or GFPaymentAddOn (i.e. GFCoupons, GF_User_Registration, GFStripe).
Examples
1. Get feed before it is deleted
add_action( 'gform_pre_delete_feed', 'pre_delete_feed', 10, 2 );
function pre_delete_feed( $id, $addon ) {
$feed = $addon->get_feed( $id );
// Do something with the $feed.
}
Source Code
This action hook is located in GFFeedAddOn::delete_feed() in /includes/addons/class-gf-feed-addon.php.
Since
This hook was added in Gravity Forms 2.4.20.4