diff --git a/includes/class-wc-gateway-payfast.php b/includes/class-wc-gateway-payfast.php index 0db4bc6..c555eab 100644 --- a/includes/class-wc-gateway-payfast.php +++ b/includes/class-wc-gateway-payfast.php @@ -394,7 +394,8 @@ public function admin_options() { * @return void */ public function generate_payfast_form( $order_id ) { - $order = wc_get_order( $order_id ); + $order = wc_get_order( $order_id ); + $site_name = html_entity_decode( get_bloginfo( 'name' ), ENT_QUOTES, get_bloginfo( 'charset' ) ); // Construct variables for post. $this->data_to_send = array( // Merchant details. @@ -412,9 +413,9 @@ public function generate_payfast_form( $order_id ) { // Item details. 'm_payment_id' => ltrim( $order->get_order_number(), _x( '#', 'hash before order number', 'woocommerce-gateway-payfast' ) ), 'amount' => $order->get_total(), - 'item_name' => get_bloginfo( 'name' ) . ' - ' . $order->get_order_number(), + 'item_name' => $site_name . ' - ' . $order->get_order_number(), /* translators: 1: blog info name */ - 'item_description' => sprintf( esc_html__( 'New order from %s', 'woocommerce-gateway-payfast' ), get_bloginfo( 'name' ) ), + 'item_description' => sprintf( esc_html__( 'New order from %s', 'woocommerce-gateway-payfast' ), $site_name ), // Custom strings. 'custom_str1' => self::get_order_prop( $order, 'order_key' ),