-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcamptix-instamojo.php
37 lines (30 loc) · 1.16 KB
/
camptix-instamojo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Plugin Name: CampTix Instamojo Payment Gateway
* Plugin URI: https://www.sanyog.in/instamojo
* Description: Simple and Flexible payment ticketing for Camptix using Instamojo Indian Payment Gateway
* Author: codexdemon
* Author URI: http://www.sanyog.in/
* Version: 1.3
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
// Add INR currency
add_filter( 'camptix_currencies', 'camptix_add_inr_currency' );
function camptix_add_inr_currency( $currencies ) {
$currencies['INR'] = array(
'label' => __( 'Indian Rupees', 'camptix' ),
'format' => 'Rs. %s',
);
return $currencies;
}
// Load the Instamojo Payment Method
add_action( 'camptix_load_addons', 'camptix_instamojo_load_payment_method' );
function camptix_instamojo_load_payment_method() {
define( 'CAMPTIX_INSTAMOJO_DIR', plugin_dir_path( __FILE__ ) );
define( 'CAMPTIX_INSTAMOJO_URL', plugin_dir_url( __FILE__ ) . '/' );
if ( ! class_exists( 'CampTix_Payment_Method_Instamojo' ) )
require_once plugin_dir_path( __FILE__ ) . 'classes/class-camptix-payment-method-instamojo.php';
camptix_register_addon( 'CampTix_Payment_Method_Instamojo' );
}
?>