DonationFormElements.php
30 lines
| 1 | <?php |
| 2 | namespace Give\PaymentGateways\Stripe; |
| 3 | |
| 4 | /** |
| 5 | * Class DonationFormElements |
| 6 | * @package Give\PaymentGateways\Stripe |
| 7 | * |
| 8 | * We use this class to output HTML fields on donation form. |
| 9 | * |
| 10 | * @since 2.9.2 |
| 11 | */ |
| 12 | class DonationFormElements { |
| 13 | /** |
| 14 | * Add html tags to form . |
| 15 | * |
| 16 | * @since 2.9.2 |
| 17 | * |
| 18 | * @param array $htmlTags Array of form html tags |
| 19 | * |
| 20 | * @return array |
| 21 | */ |
| 22 | public function addFormHtmlTags( $htmlTags ) { |
| 23 | if ( give_is_gateway_active( 'stripe_checkout' ) ) { |
| 24 | $htmlTags['data-stripe-checkout-type'] = give_stripe_get_checkout_type(); |
| 25 | } |
| 26 | |
| 27 | return $htmlTags; |
| 28 | } |
| 29 | } |
| 30 |