| @@ 222-232 (lines=11) @@ | ||
| 219 | * @param bool $sent_to_admin |
|
| 220 | * @param bool $plain_text |
|
| 221 | */ |
|
| 222 | public function email_instructions( $order, $sent_to_admin, $plain_text = false ) { |
|
| 223 | $order_id = WC_Stripe_Helper::is_pre_30() ? $order->id : $order->get_id(); |
|
| 224 | ||
| 225 | $payment_method = WC_Stripe_Helper::is_pre_30() ? $order->payment_method : $order->get_payment_method(); |
|
| 226 | ||
| 227 | if ( ! $sent_to_admin && 'stripe_bitcoin' === $payment_method && $order->has_status( 'on-hold' ) ) { |
|
| 228 | WC_Stripe_Logger::log( 'Sending bitcoin email for order #' . $order_id ); |
|
| 229 | ||
| 230 | $this->get_instructions( $order_id, $plain_text ); |
|
| 231 | } |
|
| 232 | } |
|
| 233 | ||
| 234 | /** |
|
| 235 | * Gets the Bitcoin instructions for customer to pay. |
|
| @@ 215-225 (lines=11) @@ | ||
| 212 | * @param bool $sent_to_admin |
|
| 213 | * @param bool $plain_text |
|
| 214 | */ |
|
| 215 | public function email_instructions( $order, $sent_to_admin, $plain_text = false ) { |
|
| 216 | $order_id = WC_Stripe_Helper::is_pre_30() ? $order->id : $order->get_id(); |
|
| 217 | ||
| 218 | $payment_method = WC_Stripe_Helper::is_pre_30() ? $order->payment_method : $order->get_payment_method(); |
|
| 219 | ||
| 220 | if ( ! $sent_to_admin && 'stripe_multibanco' === $payment_method && $order->has_status( 'on-hold' ) ) { |
|
| 221 | WC_Stripe_Logger::log( 'Sending multibanco email for order #' . $order_id ); |
|
| 222 | ||
| 223 | $this->get_instructions( $order_id, $plain_text ); |
|
| 224 | } |
|
| 225 | } |
|
| 226 | ||
| 227 | /** |
|
| 228 | * Gets the Multibanco instructions for customer to pay. |
|