Created
June 27, 2013 10:27
-
-
Save ethzero/5875446 to your computer and use it in GitHub Desktop.
Patch for the Tribe Event Manager Eventbrite class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- tribe-eventbrite.class.php.ORIGINAL 2013-01-18 20:56:16.000000000 +0000 | |
| +++ tribe-eventbrite.class.php 2013-06-14 11:47:15.042590764 +0100 | |
| @@ -1265,7 +1265,7 @@ | |
| * @param array $_POST | |
| * @return void | |
| */ | |
| - public function payment_update( $postId, $eventId, $_POST ) { | |
| + public function payment_update( $postId, $eventId, $post ) { | |
| $paymentTypes = array('check' => '', 'cash' => '', 'invoice' => ''); | |
| $requestParams = 'event_id=' . $eventId; | |
| @@ -1276,26 +1276,26 @@ | |
| } else { | |
| // otherwise loop through the payment methods as it's supposed to | |
| foreach( $paymentTypes as $key => $val ) { | |
| - $onOff = $_POST['EventBritePayment_accept_' . $key]; | |
| + $onOff = $post['EventBritePayment_accept_' . $key]; | |
| if ( $onOff ) $requestParams .= '&accept_' . $key . '=' . $onOff; | |
| $paymentTypes[$key] = $onOff; | |
| } | |
| foreach( $paymentTypes as $key => $val ) { | |
| if ( $val ) { | |
| - $instructions = $_POST['EventBritePayment_instructions_'.$key]; | |
| + $instructions = $post['EventBritePayment_instructions_'.$key]; | |
| if ( $instructions ) $requestParams .= '&instructions_' . $key . '=' . urlencode( stripslashes( $instructions ) ); | |
| } | |
| } | |
| // Online payment method is either/or (not both) | |
| - $onlineMethod = $_POST['EventBritePayment_accept_online']; | |
| - if ( !empty( $_POST['EventBritePayment_accept_online'] ) ) { | |
| + $onlineMethod = $post['EventBritePayment_accept_online']; | |
| + if ( !empty( $post['EventBritePayment_accept_online'] ) ) { | |
| switch( $onlineMethod ) { | |
| case 'paypal': | |
| - $requestParams .= '&accept_paypal=1&paypal_email=' . $_POST['EventBritePayment_paypal_email']; | |
| + $requestParams .= '&accept_paypal=1&paypal_email=' . $post['EventBritePayment_paypal_email']; | |
| break; | |
| case 'google': | |
| - $requestParams .= '&accept_google=1&google_merchant_id=' . $_POST['EventBritePayment_google_merchant_id'] . '&google_merchant_key=' . $_POST['EventBritePayment_google_merchant_key']; | |
| + $requestParams .= '&accept_google=1&google_merchant_id=' . $post['EventBritePayment_google_merchant_id'] . '&google_merchant_key=' . $_POST['EventBritePayment_google_merchant_key']; | |
| break; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment