/** * get_content_plain function. * * @access public * @return string */ function get_content_plain() { $order = new WC_Order($this->object['order_id']); $item_name = WC_Subscriptions_Order::get_item_name($this->object['order_id'], $this->object['product_id']); $order_item = WC_Subscriptions_Order::get_item_by_product_id($order, $this->object['product_id']); $product = $order->get_product_from_item($order_item); if (isset($product->variation_data)) { $item_name .= ' (' . woocommerce_get_formatted_variation($product->variation_data, true) . ')'; } WC_Subscriptions_Order::$recurring_only_price_strings = true; $recurring_total = WC_Subscriptions_Order::get_formatted_order_total(0, $order); WC_Subscriptions_Order::$recurring_only_price_strings = false; if ($end_of_prepaid_term = wp_next_scheduled('scheduled_subscription_end_of_prepaid_term', array('user_id' => (int) $order->user_id, 'subscription_key' => $this->subscription_key))) { $end_of_prepaid_term = date_i18n(woocommerce_date_format(), $end_of_prepaid_term + get_option('gmt_offset') * 3600); } ob_start(); woocommerce_get_template($this->template_plain, array('subscription_key' => $this->subscription_key, 'subscription' => $this->object, 'order' => $order, 'email_heading' => $this->get_heading(), 'item_name' => $item_name, 'recurring_total' => $recurring_total, 'last_payment' => date_i18n(woocommerce_date_format(), WC_Subscriptions_Manager::get_last_payment_date($this->subscription_key, '', 'timestamp')), 'end_of_prepaid_term' => $end_of_prepaid_term), '', $this->template_base); return ob_get_clean(); }