id = 'aisp_adminmanual'; $this->has_fields = false; $this->supports = array( 'products' ); // translators: Admin title of the internal "Admin Manual Payment" gateway. $this->method_title = __( 'Admin Manual Payment', 'aisp-order-tools-for-woocommerce' ); // translators: Description for the internal admin-only payment gateway. $this->method_description = __( 'Internal payment option for administrators to create pending payment orders and send payment links manually.', 'aisp-order-tools-for-woocommerce' ); // translators: Default title displayed for the admin-only payment option in the checkout (visible only to admins). $this->title = __( 'Send Payment Link (admin)', 'aisp-order-tools-for-woocommerce' ); // translators: Default description for the admin-only payment method. $this->description = __( 'Creates an unpaid order and automatically sends the customer a payment link by email.', 'aisp-order-tools-for-woocommerce' ); // Always active and hidden from public settings. $this->enabled = 'yes'; } public function process_payment( $order_id ) { $order = wc_get_order( $order_id ); // translators: Order note when an admin uses the manual payment gateway. $order->update_status( 'pending', __( 'Awaiting payment (Admin Manual Payment).', 'aisp-order-tools-for-woocommerce' ) ); return array( 'result' => 'success', 'redirect' => $this->get_return_url( $order ), ); } }