forked from restrictcontentpro/library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrcp-registration-fee.php
41 lines (35 loc) · 1.11 KB
/
rcp-registration-fee.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
38
39
40
41
<?php
/**
* Plugin Name: Restrict Content Pro - Registration Fee
* Description: Adds a custom fee to registration.
* Version: 1.0
* Author: Sandhills Development, LLC
* Author URI: https://sandhillsdev.com
* License: GPL2
*/
/**
* Adds a custom fee to registration
*
* This example adds a $20 fee that applies to the first payment only and is not affected by pro-ration
*
* @param RCP_Registration $registration
*
* @return void
*/
function pw_rcp_add_registration_fee( $registration ) {
$registration->add_fee( 20, __( 'Custom Registration Fee', 'rcp' ), false, false );
}
add_action( 'rcp_registration_init', 'pw_rcp_add_registration_fee', 20 );
/**
* Adds a recurring fee to registration
*
* This example adds a $20 fee that applies to all payments in the subscription and is not affected by pro-ration
*
* @param RCP_Registration $registration
*
* @return void
*/
function pw_rcp_add_recurring_registration_fee( $registration ) {
$registration->add_fee( 20, __( 'Custom Registration Fee', 'rcp' ), true, false );
}
add_action( 'rcp_registration_init', 'pw_rcp_add_recurring_registration_fee', 20 );