Skip to content
This repository was archived by the owner on Oct 4, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions hotfixes/wc-api-dev-email-site-title.php
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' );
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This section describes how to install the plugin and get it working.

= 0.8.0 =
* Update orders endpoint to accept multiple statuses
* Fix - Email subject and footers becoming out of sync

= 0.7.1 =
* Fix - add another URI to watch for when disabling sync during API requests
Expand Down
1 change: 1 addition & 0 deletions wc-api-dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public function includes() {

// Things that aren't related to a specific endpoint but to things like cross-plugin compatibility
include_once( dirname( __FILE__ ) . '/hotfixes/wc-api-dev-jetpack-hotfixes.php' );
include_once( dirname( __FILE__ ) . '/hotfixes/wc-api-dev-email-site-title.php' );
}

/**
Expand Down