Keep up to date with Gravity PDF

  • This field is for validation purposes and should be left unchanged.
This is the documentation for version 4 of Gravity PDF. See version 3 docs here.

Jump To Section

Description #description

We save the Gravity PDF version number in the database and when the plugin is updated (and the version number changes) this action is triggered.

Parameters #parameters

$old_version | string
The version Gravity PDF was at before the update took place
$new_version | string
The version of Gravity PDF now being run on the website.

Usage #usage

This snippet will show you how to run your own upgrade code right after a Gravity PDF update:

add_action( 'gfpdf_version_changed', function( $old_version, $new_version ) {
    /* Run any upgrade checks you need to */    
}, 10, 2 );

Source Code #source-code

This action is located in the Controller_Install::get_install_status() method of /src/controller/Controller_Install.php.

Signup for the latest Gravity PDF news, tips and updates

  • This field is for validation purposes and should be left unchanged.
Scroll To Top