Created
July 30, 2015 12:43
-
-
Save spivurno/3dbf8bf204b46031f7ec to your computer and use it in GitHub Desktop.
GP Limit Choices // Gravity Perks // Modify the "Out of Stock" Message
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 | |
/** | |
* 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