Last active
July 31, 2023 13:21
-
-
Save matty0501/474b811cbbaf8c27e34ec92272e4e359 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Perks // GP Google Sheets // Admin Columns Pro Inline Edit Compatability | |
* | |
* Allow the Google Sheet to be updated after the entry is edited by Admin Columns Pro Inline Edit | |
* | |
* Installation: | |
* 1. Install per https://gravitywiz.com/documentation/how-do-i-install-a-snippet/ | |
*/ | |
add_action( 'acp/editing/saved', function ( AC\Column $column, $id ) { | |
$entry = GFAPI::get_entry( $id ); | |
$form_id = rgar( $entry, 'form_id' ); | |
gp_google_sheets()->handle_after_update_entry( GFAPI::get_form( $form_id ), $entry ); | |
}, 10, 2 ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment