Changeset 6334 for sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/camptix-tweaks/camptix-tweaks.php
- Timestamp:
- 01/10/2018 12:54:11 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/camptix-tweaks/camptix-tweaks.php
r6059 r6334 10 10 add_filter( 'camptix_dashboard_paypal_credentials', __NAMESPACE__ . '\paypal_credentials' ); 11 11 add_filter( 'camptix_paypal_predefined_accounts', __NAMESPACE__ . '\paypal_credentials' ); 12 add_filter( 'camptix_stripe_predefined_accounts', __NAMESPACE__ . '\stripe_credentials' ); 12 13 add_action( 'init', __NAMESPACE__ . '\hide_empty_tickets' ); 13 14 add_action( 'wp_print_styles', __NAMESPACE__ . '\print_login_message_styles' ); … … 120 121 } 121 122 123 /** 124 * Setup our pre-defined Stripe payment credentials. 125 * 126 * @param array $credentials 127 * 128 * @return array 129 */ 130 function stripe_credentials( $credentials ) { 131 // Sandbox account 132 $credentials = array( 133 'wpcs-sandbox' => array( 134 'label' => 'WordCamp Sandbox', 135 'sandbox' => true, 136 'api_public_key' => defined( 'WORDCAMP_CAMPTIX_STRIPE_TEST_PUBLIC' ) ? WORDCAMP_CAMPTIX_STRIPE_TEST_PUBLIC : '', 137 'api_secret_key' => defined( 'WORDCAMP_CAMPTIX_STRIPE_TEST_SECRET' ) ? WORDCAMP_CAMPTIX_STRIPE_TEST_SECRET : '', 138 ), 139 ); 140 141 // Production account 142 if ( defined( 'WORDCAMP_CAMPTIX_STRIPE_LIVE_PUBLIC' ) ) { 143 $credentials['wpcs-production'] = array( 144 'label' => 'WordPress Community Support, PBC', 145 'sandbox' => false, 146 'api_public_key' => defined( 'WORDCAMP_CAMPTIX_STRIPE_LIVE_PUBLIC' ) ? WORDCAMP_CAMPTIX_STRIPE_LIVE_PUBLIC : '', 147 'api_secret_key' => defined( 'WORDCAMP_CAMPTIX_STRIPE_LIVE_SECRET' ) ? WORDCAMP_CAMPTIX_STRIPE_LIVE_SECRET : '', 148 ); 149 } 150 151 return $credentials; 152 } 153 122 154 /* 123 155 * Show empty tickets
Note: See TracChangeset
for help on using the changeset viewer.