Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zackkatz/0286f63a3133be95a8aecef70117775e to your computer and use it in GitHub Desktop.
Save zackkatz/0286f63a3133be95a8aecef70117775e to your computer and use it in GitHub Desktop.
GravityView - Change default entry approval status
<?php
/**
* When a new entry is created in Gravity Forms, set the default status to Approved
*
* Note: Requires GravityView 2.0.14 or newer
*
* @return int The value for "Approved" status is 3
*/
add_filter( 'gravityview/approve_entries/after_submission/default_status', function( $default_status ) {
return GravityView_Entry_Approval_Status::APPROVED;
} );
@jasimp
Copy link

jasimp commented Jun 29, 2022

is there any way to change the text like UNAPPROVED => Pending

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment