- Timestamp:
- 02/26/2016 12:41:21 AM (10 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes
- Files:
-
- 2 edited
-
payment-request.php (modified) (1 diff)
-
wordcamp-budgets.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/payment-request.php
r2600 r2628 431 431 432 432 case 'payment_method': 433 $value = WordCamp_Budgets::get_valid_payment_methods( );433 $value = WordCamp_Budgets::get_valid_payment_methods( $post->post_type ); 434 434 break; 435 435 -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-budgets.php
r2605 r2628 358 358 * Get a list of valid payment methods 359 359 * 360 * @param $post_type 361 * 360 362 * @return array 361 363 */ 362 public static function get_valid_payment_methods() { 363 return array( 'Direct Deposit', 'Check', 'Credit Card', 'Wire' ); 364 public static function get_valid_payment_methods( $post_type ) { 365 $methods = array( 'Direct Deposit', 'Check', 'Wire' ); 366 367 if ( WCP_Payment_Request::POST_TYPE === $post_type ) { 368 $methods[] = 'Credit Card'; 369 } 370 371 return $methods; 364 372 } 365 373 … … 416 424 417 425 case 'payment_method': 418 if ( in_array( $unsafe_value, self::get_valid_payment_methods( ), true ) ) {426 if ( in_array( $unsafe_value, self::get_valid_payment_methods( $_POST['post_type'] ), true ) ) { 419 427 $safe_value = $unsafe_value; 420 428 } else {
Note: See TracChangeset
for help on using the changeset viewer.