Looking for help?
< All Topics
Print

How to add custom payment method in POS

To do this, add this snippets code to your theme/function.php or any code snippets plugin and custom the method code , method name as you want


if(!function_exists('custom_payment_op_login_format_payment_data'))
{
    function custom_payment_op_login_format_payment_data($payment_methods){
//add 1st method
        $payment_method_data = array(
            'code' => 'payment_code_here', // change to your method code
            'name' => 'Payment Method Name',// change to your method name
            'type' => 'offline',
            'hasRef' => true,
            'partial' => false,
            'description' => 'Payment Method Name description',// change to your method name description
            'online_type' => 'external',
            'offline_transaction' => 'yes',
            'offline_order' => 'yes'
        );
        $payment_methods[] = $payment_method_data;
// add second method
$payment_method_data = array(
            'code' => 'payment_code_here_2', // change to your method code
            'name' => 'Payment Method Name 2',// change to your method name
            'type' => 'offline',
            'hasRef' => true,
            'partial' => false,
            'description' => 'Payment Method Name description 2',// change to your method name description
            'online_type' => 'external',
            'offline_transaction' => 'yes',
            'offline_order' => 'yes'
        );
        $payment_methods[] = $payment_method_data;

//end
        return $payment_methods;
    }
}
add_filter('op_pos_payment_method_list','custom_payment_op_login_format_payment_data',10,1);
Table of Contents