Changing “Add Gift Wrap Message”
-
Hello,
This is really more of a feature request.
I’ve used this is my child theme functions PHP….
function my_change_wrap_prompt( $prompt ) {
// your newly worded prompt below, after $prompt =, between ” apostrophes
// cannot contain ‘ as punctuation unless escaped with a \,
$prompt = ‘Is this a gift?’;
return $prompt;
}
function my_add_wcwgp_filter() {
add_filter( ‘wcgwp_add_wrap_prompt’, ‘my_change_wrap_prompt’, 11, 1 );
}
add_action( ‘after_setup_theme’, ‘my_add_wcwgp_filter’ );function my_change_wrap_button( $prompt ) {
// your newly worded prompt below, after $prompt =, between ” apostrophes
// cannot contain ‘ as punctuation unless escaped with a \,
$prompt = ‘Submit Gift Options’;
return $prompt;
}
function my_add_wcwgp_button_filter() {
add_filter( ‘wcgwp_add_wrap_button_text’, ‘my_change_wrap_button’, 11, 1 );
}
add_action( ‘after_setup_theme’, ‘my_add_wcwgp_button_filter’ );Could the plugin be modified to enable me to change the “Add Gift Wrap Message”?
I know I can copy the appropriate .php file to my child theme and modify it there, but then I have to keep track of things and check release notes. It would be so much cleaner to use a filter as above.
Thank you in advance for your consideration. I appreciate the plugin, we are using it on my wife’s store.
The page I need help with: [log in to see the link]
- The topic ‘Changing “Add Gift Wrap Message”’ is closed to new replies.