Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spivurno/3dbf8bf204b46031f7ec to your computer and use it in GitHub Desktop.
Save spivurno/3dbf8bf204b46031f7ec to your computer and use it in GitHub Desktop.
GP Limit Choices // Gravity Perks // Modify the "Out of Stock" Message
<?php
/**
* GP Limit Choices // Gravity Perks // Modify the "Out of Stock" Message
*/
add_filter( 'gplc_out_of_stock_message', function( $not_enough_stock_message, $form, $field, $inventory_data ) {
return 'Sorry, friends. This item is no longer avialable.';
}, 10, 4 );
// only apply to form ID 1
add_filter( 'gplc_out_of_stock_message_1', function( ) { /* custom code */ }, 10, 4 );
// only apply to field ID 2 on form ID 1
add_filter( 'gplc_out_of_stock_message_1_2', function( ) { /* custom code */ }, 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment