Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Last active November 11, 2016 00:09
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 Pebblo/010d826ff5562c017cc962496c26614d to your computer and use it in GitHub Desktop.
Save Pebblo/010d826ff5562c017cc962496c26614d to your computer and use it in GitHub Desktop.
This is an example of a custom functions plugin that sets the 'Submit Promotion Code' button text regardless of the promotions settings.
<?php
/*
Plugin Name: Custom EE Functions Plugin
Description: You can add custom functions to this plugin.
Author: Tony Warwick
Version: 1.0
*/
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */
//Filter the Promotion code cubmit button text.
function my_example_promotions_button_text( $text ) {
return 'Submit Promotion Code';
}
add_filter( 'FHEE__EED_Promotions___add_promotions_form_inputs__ee_promotion_code_submit__default', 'my_example_promotions_button_text' );
//Filter the promotion code input field label.
function my_example_promotions_html_label( $text ) {
return 'Enter your promotion code:';
}
add_filter( 'FHEE__EED_Promotions___add_promotions_form_inputs__ee_promotion_code_input__html_label_text', 'my_example_promotions_html_label' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment