@@ -29,28 +29,28 @@ |
||
| 29 | 29 | * @return bool|null |
| 30 | 30 | */ |
| 31 | 31 | public static function listen() { |
| 32 | - if ( ! filter_has_var( INPUT_GET, 'mollie_webhook' ) || ! filter_has_var( INPUT_POST, 'id' ) ) { |
|
| 32 | + if ( ! filter_has_var(INPUT_GET, 'mollie_webhook') || ! filter_has_var(INPUT_POST, 'id')) { |
|
| 33 | 33 | return null; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - $transaction_id = filter_input( INPUT_POST, 'id', FILTER_SANITIZE_STRING ); |
|
| 36 | + $transaction_id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_STRING); |
|
| 37 | 37 | |
| 38 | - $payment = get_pronamic_payment_by_transaction_id( $transaction_id ); |
|
| 38 | + $payment = get_pronamic_payment_by_transaction_id($transaction_id); |
|
| 39 | 39 | |
| 40 | - if ( null === $payment ) { |
|
| 40 | + if (null === $payment) { |
|
| 41 | 41 | return false; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | // Add note. |
| 45 | 45 | $note = sprintf( |
| 46 | 46 | /* translators: %s: Mollie */ |
| 47 | - __( 'Webhook requested by %s.', 'pronamic_ideal' ), |
|
| 48 | - __( 'Mollie', 'pronamic_ideal' ) |
|
| 47 | + __('Webhook requested by %s.', 'pronamic_ideal'), |
|
| 48 | + __('Mollie', 'pronamic_ideal') |
|
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | - $payment->add_note( $note ); |
|
| 51 | + $payment->add_note($note); |
|
| 52 | 52 | |
| 53 | 53 | // Update payment. |
| 54 | - Plugin::update_payment( $payment, false ); |
|
| 54 | + Plugin::update_payment($payment, false); |
|
| 55 | 55 | } |
| 56 | 56 | } |
@@ -29,29 +29,29 @@ discard block |
||
| 29 | 29 | $this->id = 'mollie'; |
| 30 | 30 | $this->name = 'Mollie'; |
| 31 | 31 | $this->url = 'http://www.mollie.com/en/'; |
| 32 | - $this->product_url = __( 'https://www.mollie.com/en/pricing', 'pronamic_ideal' ); |
|
| 32 | + $this->product_url = __('https://www.mollie.com/en/pricing', 'pronamic_ideal'); |
|
| 33 | 33 | $this->provider = 'mollie'; |
| 34 | 34 | |
| 35 | 35 | // Actions. |
| 36 | - $function = array( __NAMESPACE__ . '\Listener', 'listen' ); |
|
| 36 | + $function = array(__NAMESPACE__ . '\Listener', 'listen'); |
|
| 37 | 37 | |
| 38 | - if ( ! has_action( 'wp_loaded', $function ) ) { |
|
| 39 | - add_action( 'wp_loaded', $function ); |
|
| 38 | + if ( ! has_action('wp_loaded', $function)) { |
|
| 39 | + add_action('wp_loaded', $function); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - if ( is_admin() ) { |
|
| 43 | - $function = array( __CLASS__, 'user_profile' ); |
|
| 42 | + if (is_admin()) { |
|
| 43 | + $function = array(__CLASS__, 'user_profile'); |
|
| 44 | 44 | |
| 45 | - if ( ! has_action( 'show_user_profile', $function ) ) { |
|
| 46 | - add_action( 'show_user_profile', $function ); |
|
| 45 | + if ( ! has_action('show_user_profile', $function)) { |
|
| 46 | + add_action('show_user_profile', $function); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - if ( ! has_action( 'edit_user_profile', $function ) ) { |
|
| 50 | - add_action( 'edit_user_profile', $function ); |
|
| 49 | + if ( ! has_action('edit_user_profile', $function)) { |
|
| 50 | + add_action('edit_user_profile', $function); |
|
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - add_filter( 'pronamic_payment_provider_url_mollie', array( $this, 'payment_provider_url' ), 10, 2 ); |
|
| 54 | + add_filter('pronamic_payment_provider_url_mollie', array($this, 'payment_provider_url'), 10, 2); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -93,8 +93,8 @@ discard block |
||
| 93 | 93 | * @since 1.1.6 |
| 94 | 94 | * @see https://github.com/WordPress/WordPress/blob/4.5.2/wp-admin/user-edit.php#L578-L600 |
| 95 | 95 | */ |
| 96 | - public static function user_profile( $user ) { |
|
| 97 | - include dirname( __FILE__ ) . '/../views/html-admin-user-profile.php'; |
|
| 96 | + public static function user_profile($user) { |
|
| 97 | + include dirname(__FILE__) . '/../views/html-admin-user-profile.php'; |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | * @param Payment $payment |
| 105 | 105 | * @return string |
| 106 | 106 | */ |
| 107 | - public function payment_provider_url( $url, $payment ) { |
|
| 107 | + public function payment_provider_url($url, $payment) { |
|
| 108 | 108 | return sprintf( |
| 109 | 109 | 'https://www.mollie.com/dashboard/payments/%s', |
| 110 | 110 | $payment->get_transaction_id() |