Total Complexity | 2 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
27 | class PaymentsModule { |
||
28 | /** |
||
29 | * Plugin. |
||
30 | * |
||
31 | * @var Plugin $plugin |
||
32 | */ |
||
33 | public $plugin; |
||
34 | |||
35 | /** |
||
36 | * Construct and initialize a payments module object. |
||
37 | * |
||
38 | * @param Plugin $plugin The plugin. |
||
39 | */ |
||
40 | public function __construct( Plugin $plugin ) { |
||
41 | $this->plugin = $plugin; |
||
42 | |||
43 | // Listen to payment status changes so we can log these in a note. |
||
44 | add_action( 'pronamic_payment_status_update', array( $this, 'log_payment_status_update' ), 10, 4 ); |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Payment status update. |
||
49 | * |
||
50 | * @param Payment $payment The status updated payment. |
||
51 | */ |
||
52 | public function log_payment_status_update( $payment, $can_redirect, $old_status, $new_status ) { |
||
57 | ) ); |
||
58 | } |
||
60 |