From b295c64c7fb39a22e5489efeb484e806b5e1bc45 Mon Sep 17 00:00:00 2001 From: John Clause Date: Tue, 17 Feb 2015 15:59:14 -0700 Subject: [PATCH 1/2] more arguments to woocommerce_email_get_option filter --- includes/emails/class-wc-email.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/emails/class-wc-email.php b/includes/emails/class-wc-email.php index fe883537517..e1cd70f78ba 100644 --- a/includes/emails/class-wc-email.php +++ b/includes/emails/class-wc-email.php @@ -335,7 +335,7 @@ class WC_Email extends WC_Settings_API { * @return string */ public function get_option( $key, $empty_value = null ) { - return apply_filters( 'woocommerce_email_get_option', __( parent::get_option( $key, $empty_value ) ), $this ); + return apply_filters( 'woocommerce_email_get_option', __( parent::get_option( $key, $empty_value ) ), $this, $key, $empty_value ); } /** From 6c9f863c0476e0a8bcd4473cd6ed7983e0688f40 Mon Sep 17 00:00:00 2001 From: John Clause Date: Tue, 17 Feb 2015 20:56:18 -0700 Subject: [PATCH 2/2] replaced get_bloginfo('name') with get_bloginfo('name','display') --- includes/admin/settings/class-wc-settings-emails.php | 4 ++-- .../class-wc-addons-gateway-simplify-commerce.php | 4 ++-- .../simplify-commerce/class-wc-gateway-simplify-commerce.php | 4 ++-- templates/emails/customer-invoice.php | 2 +- templates/emails/email-header.php | 4 ++-- templates/emails/plain/customer-invoice.php | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/includes/admin/settings/class-wc-settings-emails.php b/includes/admin/settings/class-wc-settings-emails.php index 486a94423f1..d2f2a173c3f 100644 --- a/includes/admin/settings/class-wc-settings-emails.php +++ b/includes/admin/settings/class-wc-settings-emails.php @@ -75,7 +75,7 @@ class WC_Settings_Emails extends WC_Settings_Page { 'id' => 'woocommerce_email_from_name', 'type' => 'text', 'css' => 'min-width:300px;', - 'default' => esc_attr(get_bloginfo('title')), + 'default' => esc_attr(get_bloginfo('title', 'display')), 'autoload' => false ), @@ -112,7 +112,7 @@ class WC_Settings_Emails extends WC_Settings_Page { 'id' => 'woocommerce_email_footer_text', 'css' => 'width:100%; height: 75px;', 'type' => 'textarea', - 'default' => get_bloginfo('title') . ' - ' . __( 'Powered by WooCommerce', 'woocommerce' ), + 'default' => get_bloginfo('title', 'display') . ' - ' . __( 'Powered by WooCommerce', 'woocommerce' ), 'autoload' => false ), diff --git a/includes/gateways/simplify-commerce/class-wc-addons-gateway-simplify-commerce.php b/includes/gateways/simplify-commerce/class-wc-addons-gateway-simplify-commerce.php index 0f07dce26aa..279f20b7b63 100644 --- a/includes/gateways/simplify-commerce/class-wc-addons-gateway-simplify-commerce.php +++ b/includes/gateways/simplify-commerce/class-wc-addons-gateway-simplify-commerce.php @@ -268,7 +268,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce { public function process_subscription_payment( $order = '', $amount = 0 ) { $order_items = $order->get_items(); $order_item = array_shift( $order_items ); - $subscription_name = sprintf( __( '%s - Subscription for "%s"', 'woocommerce' ), esc_html( get_bloginfo( 'name' ) ), $order_item['name'] ) . ' ' . sprintf( __( '(Order #%s)', 'woocommerce' ), $order->get_order_number() ); + $subscription_name = sprintf( __( '%s - Subscription for "%s"', 'woocommerce' ), esc_html( get_bloginfo( 'name', 'display' ) ), $order_item['name'] ) . ' ' . sprintf( __( '(Order #%s)', 'woocommerce' ), $order->get_order_number() ); if ( $amount * 100 < 50 ) { return new WP_Error( 'simplify_error', __( 'Sorry, the minimum allowed order total is 0.50 to use this payment method.', 'woocommerce' ) ); @@ -371,7 +371,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce { try { $order_items = $order->get_items(); $order_item = array_shift( $order_items ); - $pre_order_name = sprintf( __( '%s - Pre-order for "%s"', 'woocommerce' ), esc_html( get_bloginfo( 'name' ) ), $order_item['name'] ) . ' ' . sprintf( __( '(Order #%s)', 'woocommerce' ), $order->get_order_number() ); + $pre_order_name = sprintf( __( '%s - Pre-order for "%s"', 'woocommerce' ), esc_html( get_bloginfo( 'name', 'display' ) ), $order_item['name'] ) . ' ' . sprintf( __( '(Order #%s)', 'woocommerce' ), $order->get_order_number() ); $customer_id = get_post_meta( $order->id, '_simplify_customer_id', true ); diff --git a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php index 2f66f100c6a..7a062e587aa 100644 --- a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php +++ b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php @@ -326,7 +326,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { $payment = Simplify_Payment::createPayment( array( 'amount' => $order->order_total * 100, // In cents 'token' => $cart_token, - 'description' => sprintf( __( '%s - Order #%s', 'woocommerce' ), esc_html( get_bloginfo( 'name' ) ), $order->get_order_number() ), + 'description' => sprintf( __( '%s - Order #%s', 'woocommerce' ), esc_html( get_bloginfo( 'name', 'display' ) ), $order->get_order_number() ), 'currency' => strtoupper( get_woocommerce_currency() ), 'reference' => $order->id, 'card.addressCity' => $order->billing_city, @@ -408,7 +408,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { 'sc-key' => $this->public_key, 'amount' => $order->order_total * 100, 'reference' => $order->id, - 'name' => esc_html( get_bloginfo( 'name' ) ), + 'name' => esc_html( get_bloginfo( 'name', 'display' ) ), 'description' => sprintf( __( 'Order #%s', 'woocommerce' ), $order->get_order_number() ), 'receipt' => 'false', 'color' => $this->modal_color, diff --git a/templates/emails/customer-invoice.php b/templates/emails/customer-invoice.php index 94ea94e849b..59edc24f9dd 100644 --- a/templates/emails/customer-invoice.php +++ b/templates/emails/customer-invoice.php @@ -17,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) { has_status( 'pending' ) ) : ?> -

get_checkout_payment_url() ) . '">' . __( 'pay', 'woocommerce' ) . '' ); ?>

+

get_checkout_payment_url() ) . '">' . __( 'pay', 'woocommerce' ) . '' ); ?>

diff --git a/templates/emails/email-header.php b/templates/emails/email-header.php index 433cc9a1662..a56dc6af75b 100644 --- a/templates/emails/email-header.php +++ b/templates/emails/email-header.php @@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) { - <?php echo get_bloginfo( 'name' ); ?> + <?php echo get_bloginfo( 'name', 'display' ); ?> ="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
@@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) {
' . get_bloginfo( 'name' ) . '

'; + echo '

' . get_bloginfo( 'name', 'display' ) . '

'; } ?>
diff --git a/templates/emails/plain/customer-invoice.php b/templates/emails/plain/customer-invoice.php index fe92a998e58..c5767715595 100644 --- a/templates/emails/plain/customer-invoice.php +++ b/templates/emails/plain/customer-invoice.php @@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) { echo $email_heading . "\n\n"; if ( $order->has_status( 'pending' ) ) - echo sprintf( __( 'An order has been created for you on %s. To pay for this order please use the following link: %s', 'woocommerce' ), get_bloginfo( 'name' ), $order->get_checkout_payment_url() ) . "\n\n"; + echo sprintf( __( 'An order has been created for you on %s. To pay for this order please use the following link: %s', 'woocommerce' ), get_bloginfo( 'name', 'display' ), $order->get_checkout_payment_url() ) . "\n\n"; echo "****************************************************\n\n";