Nag site admin to reconfigure a Gravity Forms Feed [RESOLVED]

I have a feed whose stored configuration must change by end of July. This is a forced change to my API endpoint’s POST headers to transmit an API key. With or without an update, many users will wake up one day and the plugin will no longer work.
In one situation, the plugin doesn’t update and one day stops working.
In another situation, the plugin updates, isn’t reconfigured in a timely fashion and stops working post-update. There will be no service interruption if the plugin is reconfigured in a timely fashion after the update.
There isn’t much I can do about this situation.
AFAICT, the best I can do is write some nagware filters/actions to run during an admin login.

  1. I don’t have a lot of time to research writing nagware. Is there a code sample I can have that demonstrates nagware in the GF environment?
  2. Is there a way to reprocess entries that should’ve successfully been run through the feed?

Here’s a quick way to render a non-dismissable notice above the form list for administrators of the site. You can, of course, adjust where or to whom the notice should be displayed:

add_action( 'admin_notices', function() {
	
    if( ! current_user_can( 'administrator' ) || get_current_screen()->id != 'toplevel_page_gf_edit_forms' ) {
        return;
    }

    ?>
    <div class="gf-notice notice notice-warning">
        <p><?php _e( 'This is a persistent Gravity Forms admin notice!', 'text-domain' ); ?></p>
    </div>
    <?php
	
} );

For reprocessing of feeds manually, check out the plugin Gravity Forms Feed Forge.

1 Like

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