This repository has been archived by the owner on Oct 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a hotfix for keeping the site title and email footer in sync. (#32)
- Loading branch information
1 parent
ee519cd
commit d4eab10
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
/** | ||
* WooCommerce has settings for email subject and footer, which defaults to the 'site title'. | ||
* However, this can easily become out of sync. This uses the provided filters to always | ||
* return the current site title. | ||
* | ||
* @since 0.8.0 | ||
*/ | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; | ||
} | ||
|
||
function wc_api_dev_email_from_name( $name ) { | ||
return get_bloginfo( 'name', 'display' ); | ||
} | ||
add_filter( 'woocommerce_email_from_name', 'wc_api_dev_email_from_name' ); | ||
|
||
function wc_api_dev_email_footer_text( $text ) { | ||
return sprintf( __( '%s - Powered by WooCommerce', 'woocommerce' ), get_bloginfo( 'name', 'display' ) ); | ||
} | ||
add_filter( 'woocommerce_email_footer_text', 'wc_api_dev_email_footer_text' ); |
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
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