| 1 |
<?php |
| 2 |
/** |
| 3 |
* Charitable Square Gateway Hooks for admin. |
| 4 |
* |
| 5 |
* Action/filter hooks used for handling payments through the Square gateway. |
| 6 |
* |
| 7 |
* @package Charitable Square/Hooks/Gateway/Admin |
| 8 |
* @author David Bisset |
| 9 |
* @copyright Copyright (c) 2018, WP Charitable LLC |
| 10 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 11 |
* @since 1.8.7 |
| 12 |
*/ |
| 13 |
|
| 14 |
// Exit if accessed directly. |
| 15 |
if ( ! defined( 'ABSPATH' ) ) { |
| 16 |
exit; |
| 17 |
} |
| 18 |
|
| 19 |
/** |
| 20 |
* Enqueue scripts and styles. |
| 21 |
*/ |
| 22 |
add_action( 'admin_enqueue_scripts', array( Charitable_Square_Admin::get_instance(), 'enqueue_scripts_styles' ) ); |
| 23 |
|
| 24 |
/** |
| 25 |
* Warn when Square is connected but no webhook signing secret is stored. |
| 26 |
* |
| 27 |
* Since 1.8.12 unsigned webhooks are rejected, so a missing signing secret |
| 28 |
* silently stops Square donations and refunds from reconciling. Registered |
| 29 |
* here rather than via Charitable_Square_WebhooksHealthCheck::init(), which |
| 30 |
* is not currently called. |
| 31 |
* |
| 32 |
* @since 1.8.12 |
| 33 |
*/ |
| 34 |
add_action( 'admin_notices', array( new Charitable_Square_WebhooksHealthCheck(), 'missing_signing_secret_notice' ) ); |
| 35 |
|
| 36 |
/** |
| 37 |
* Display admin notice about PHP version incompatibility. |
| 38 |
* This is handled by the init hook in Charitable_Square_Compatibility already. |
| 39 |
*/ |
| 40 |
// add_action( 'admin_notices', array( Charitable_Square_Compatibility::get_instance(), 'display_version_notice_sitewide' ) ); |
| 41 |
|
| 42 |
// add_filter( 'charitable_admin_strings', array( Charitable_Square_Admin::get_instance(), 'javascript_strings' ) ); |
| 43 |
|
| 44 |
|