/** * @param WC_Order $order * @param Mollie_API_Object_Payment $payment * @param bool $admin_instructions * @param bool $plain_text * @return string|null */ protected function getInstructions(WC_Order $order, Mollie_API_Object_Payment $payment, $admin_instructions, $plain_text) { if ($payment->isPaid() && $payment->details) { return sprintf(__('Payment completed by <strong>%s</strong> (IBAN: %s, BIC: %s)', 'mollie-payments-for-woocommerce'), $payment->details->consumerName, implode(' ', str_split($payment->details->consumerAccount, 4)), $payment->details->consumerBic); } return parent::getInstructions($order, $payment, $admin_instructions, $plain_text); }
/** * Initialise Gateway Settings Form Fields */ public function init_form_fields() { parent::init_form_fields(); $this->form_fields = array_merge($this->form_fields, array('expiry_days' => array('title' => __('Expiry date', 'mollie-payments-for-woocommerce'), 'type' => 'number', 'description' => sprintf(__('Number of days after the payment will expire. Default <code>%d</code> days', 'mollie-payments-for-woocommerce'), self::EXPIRY_DEFAULT_DAYS), 'default' => self::EXPIRY_DEFAULT_DAYS, 'custom_attributes' => array('min' => self::EXPIRY_MIN_DAYS, 'max' => self::EXPIRY_MAX_DAYS, 'step' => 1)), 'mail_payment_instructions' => array('title' => __('Mail payment instructions', 'mollie-payments-for-woocommerce'), 'label' => sprintf(__('Should Mollie automatically mail the payment instructions to the customer? Default <code>%s</code>', 'mollie-payments-for-woocommerce'), strtolower(__('Disabled', 'mollie-payments-for-woocommerce'))), 'type' => 'checkbox', 'default' => 'no', 'description' => __('If you disable this option the customer still has an option to send the payment instructions to an email address on the Mollie payment screen.', 'mollie-payments-for-woocommerce'), 'desc_tip' => true))); }
/** * */ public function __construct() { $this->supports = array('products', 'refunds'); parent::__construct(); }