Support

Account

Home Forums Backend Issues (wp-admin) Disable ACF upgrade for clients Reply To: Disable ACF upgrade for clients

  • Hmm…no dice. I don’t get an error, I just keep getting the update nag in the dashboard. Here’s my code:

    
    // Hide ACF from admin menu outside of development
    if ( WP_ENV !== 'development' ) {
      add_filter( 'acf/settings/show_admin', '__return_false' );
      add_filter( 'site_transient_update_plugins', 'ext_core_acf_remove_update_notification' );
    }
    // Disable ACF update notifications
    // http://support.advancedcustomfields.com/forums/topic/disable-acf-upgrade-for-clients/
    function ext_core_acf_remove_update_notification( $value ) {
      unset( $value->response[ plugin_basename( __FILE__ ) . 'acf/acf.php' ] );
      return $value;
    }
    

    (That other filter removes ACF from the dashboard. Both apply only outside the development environment.)

    I should mention that I’m including ACF Pro in a private plugin for a client, so it’s being included according to the official instructions.