customers
2 months ago
orders
4 months ago
subscriptions
3 months ago
add-edit-coupon.php
2 years ago
add-edit-plan-group.php
1 year ago
add-edit-plan.php
1 month ago
checkout-field-item.php
3 years ago
checkout-fields.php
3 years ago
coupons-page-sidebar.php
3 years ago
groups-page-sidebar.php
3 years ago
index.php
3 years ago
payment-method-list.php
3 years ago
plans-page-sidebar.php
3 years ago
tax-rates-setup.php
3 years ago
payment-method-list.php
102 lines
| 1 | <?php |
| 2 | |
| 3 | use ProfilePress\Core\Classes\ExtensionManager; |
| 4 | |
| 5 | $payment_methods = ProfilePress\Core\Membership\PaymentMethods\PaymentMethods::get_instance()->get_all(true); ?> |
| 6 | |
| 7 | <div class="ppress-payment-methods-wrap<?= ExtensionManager::is_premium() ? ' is-premium' : '' ?>"> |
| 8 | <table cellspacing="0" class="widefat"> |
| 9 | <thead> |
| 10 | <tr> |
| 11 | <th class="ppress-payment-method-table-sort"></th> |
| 12 | <th class="ppress-payment-method-table-title"><?php esc_html_e('Method', 'wp-user-avatar') ?></th> |
| 13 | <th class="ppress-payment-method-table-enabled"><?php esc_html_e('Enabled', 'wp-user-avatar') ?></th> |
| 14 | <th class="ppress-payment-method-table-description"><?php esc_html_e('Description', 'wp-user-avatar') ?></th> |
| 15 | <th class="ppress-payment-method-table-subscription-support"><?php esc_html_e('Subscription Support', 'wp-user-avatar') ?></th> |
| 16 | <th class="ppress-payment-method-table-actions"></th> |
| 17 | </tr> |
| 18 | </thead> |
| 19 | <tbody> |
| 20 | <?php foreach ($payment_methods as $payment_method) : ?> |
| 21 | <?php $config_url = esc_url(add_query_arg('method', $payment_method->get_id())); ?> |
| 22 | <tr id="<?php echo $payment_method->get_id() ?>"> |
| 23 | <td class="ppress-payment-method-table-sort"> |
| 24 | <span class="gateway-sort"><span class="dashicons dashicons-menu"></span></span> |
| 25 | </td> |
| 26 | <td class="ppress-payment-method-table-title"> |
| 27 | <a href="<?= $config_url ?>"><?php echo $payment_method->get_method_title() ?></a> |
| 28 | </td> |
| 29 | <td class="ppress-payment-method-table-enabled"> |
| 30 | <?php echo $payment_method->is_enabled() ? |
| 31 | '<span class="ppress-payment-method-icon ico-yes"><span class="dashicons dashicons-yes"></span></span>' : |
| 32 | '<span class="ppress-payment-method-icon"><span class="dashicons dashicons-no-alt"></span></span>' |
| 33 | ?> |
| 34 | </td> |
| 35 | <td class="ppress-payment-method-table-description"> |
| 36 | <?php echo $payment_method->get_method_description() ?> |
| 37 | </td> |
| 38 | <td class="ppress-payment-method-table-subscription-support"> |
| 39 | <?php echo $payment_method->supports($payment_method::SUBSCRIPTIONS) ? |
| 40 | '<span class="ppress-payment-method-icon ico-yes"><span class="dashicons dashicons-yes"></span></span>' : |
| 41 | '<span class="ppress-payment-method-icon"><span class="dashicons dashicons-no-alt"></span></span>' |
| 42 | ?> |
| 43 | </td> |
| 44 | <td class="ppress-payment-method-table-actions"> |
| 45 | <a href="<?= $config_url ?>" class="button"><?php esc_html_e('Configure', 'wp-user-avatar'); ?></a> |
| 46 | </td> |
| 47 | </tr> |
| 48 | <?php endforeach; ?> |
| 49 | <?php if ( ! ProfilePress\Core\Classes\ExtensionManager::is_premium()) : |
| 50 | |
| 51 | $pro_payment_methods = [ |
| 52 | 'paypal' => [ |
| 53 | 'name' => 'PayPal', |
| 54 | 'description' => esc_html__('Wish to accept payments and sell memberships via PayPal? %supgrade to premium%s.', 'wp-user-avatar') |
| 55 | ], |
| 56 | 'mollie' => [ |
| 57 | 'name' => 'Mollie', |
| 58 | 'description' => esc_html__('%sUpgrade to premium%s to accept one-time and recurring payments via iDEAL, Credit Card, Apple Pay, Klarna, Bancontact, in3 etc with Mollie.', 'wp-user-avatar') |
| 59 | ], |
| 60 | 'razorpay' => [ |
| 61 | 'name' => 'Razorpay', |
| 62 | 'description' => esc_html__('%sUpgrade to premium%s to accept one-time and recurring payments via Razorpay.', 'wp-user-avatar') |
| 63 | ] |
| 64 | ]; |
| 65 | |
| 66 | foreach ($pro_payment_methods as $payment_method_id => $pm_args) { |
| 67 | |
| 68 | $payment_method_upsell_url = sprintf('https://profilepress.com/pricing/?utm_source=wp_dashboard&utm_medium=upgrade&utm_campaign=%s-gateway-method', $payment_method_id); |
| 69 | |
| 70 | $payment_method_addon_url = sprintf('https://profilepress.com/addons/%1$s/?utm_source=wp_dashboard&utm_medium=upgrade&utm_campaign=%1$s-gateway-method', $payment_method_id); |
| 71 | |
| 72 | ?> |
| 73 | <tr> |
| 74 | <td class="ppress-payment-method-table-sort"> |
| 75 | <span class="gateway-sort"><span class="dashicons dashicons-menu"></span> |
| 76 | </td> |
| 77 | <td class="ppress-payment-method-table-title"> |
| 78 | <a target="_blank" href="<?= $payment_method_addon_url ?>"><?= $pm_args['name'] ?></a> |
| 79 | </td> |
| 80 | <td class="ppress-payment-method-table-enabled"> |
| 81 | <span class="ppress-payment-method-icon"><span class="dashicons dashicons-no-alt"></span></span> |
| 82 | </td> |
| 83 | <td class="ppress-payment-method-table-description"> |
| 84 | <?php echo sprintf( |
| 85 | $pm_args['description'], |
| 86 | '<a target="_blank" href="' . $payment_method_upsell_url . '">', '</a>' |
| 87 | ) ?> |
| 88 | </td> |
| 89 | <td class="ppress-payment-method-table-subscription-support"> |
| 90 | <span class="ppress-payment-method-icon ico-yes"><span class="dashicons dashicons-yes"></span></span> |
| 91 | </td> |
| 92 | <td class="ppress-payment-method-table-actions"> |
| 93 | <a target="_blank" href="<?= $payment_method_addon_url ?>" class="button"><?php esc_html_e('Configure', 'wp-user-avatar'); ?></a> |
| 94 | </td> |
| 95 | </tr> |
| 96 | <?php |
| 97 | } |
| 98 | ?> |
| 99 | <?php endif ?> |
| 100 | </tbody> |
| 101 | </table> |
| 102 | </div> |