1 | <?php |
||
2 | /** |
||
3 | * Subscription meta box. |
||
4 | * |
||
5 | * @author Pronamic <[email protected]> |
||
6 | * @copyright 2005-2020 Pronamic |
||
7 | * @license GPL-3.0-or-later |
||
8 | * @package Pronamic\WordPress\Pay |
||
9 | * |
||
10 | * @since 1.1.6 |
||
11 | * @link https://github.com/WordPress/WordPress/blob/4.5.2/wp-admin/user-edit.php#L578-L600 |
||
12 | */ |
||
13 | |||
14 | $subscription = \get_pronamic_subscription( $post->ID ); |
||
15 | |||
16 | $mollie_customer_id = $subscription->get_meta( 'mollie_customer_id' ); |
||
17 | |||
18 | ?> |
||
19 | <p> |
||
20 | <?php |
||
21 | |||
22 | $customer_url = \add_query_arg( |
||
23 | array( |
||
24 | 'page' => 'pronamic_pay_mollie_customers', |
||
25 | 'id' => $mollie_customer_id, |
||
26 | ), |
||
27 | \admin_url( 'admin.php' ) |
||
28 | ); |
||
29 | |||
30 | echo \wp_kses( |
||
31 | \sprintf( |
||
32 | /* translators: %s: Mollie customer ID anchor. */ |
||
33 | \__( 'Customer: %s', 'pronamic_ideal' ), |
||
34 | \sprintf( |
||
35 | '<a href="%s">%s</a>', |
||
36 | \esc_url( $customer_url ), |
||
37 | \esc_html( $mollie_customer_id ) |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
38 | ) |
||
39 | ), |
||
40 | array( |
||
41 | 'a' => array( |
||
42 | 'href' => true, |
||
43 | ), |
||
44 | ) |
||
45 | ); |
||
46 | |||
47 | ?> |
||
48 | </p> |
||
49 | |||
50 | <?php |
||
51 | |||
52 | $mandate_id = $subscription->get_meta( 'mollie_mandate_id' ); |
||
53 | |||
54 | if ( ! empty( $mandate_id ) ) : |
||
55 | |||
56 | ?> |
||
57 | |||
58 | <p> |
||
59 | <?php |
||
60 | |||
61 | echo esc_html( |
||
62 | sprintf( |
||
63 | /* translators: %s: Mollie mandate ID */ |
||
64 | \__( 'Mandate: %s', 'pronamic_ideal' ), |
||
65 | $mandate_id |
||
66 | ) |
||
67 | ); |
||
68 | |||
69 | ?> |
||
70 | </p> |
||
71 | |||
72 | <?php endif; ?> |
||
73 |