/app/view/templates/membership_frontend_payment.php

  1. <div class="<?php echo get_ms_pm_membership_wrapper_class(); ?>"> 
  2. <legend><?php _e( 'Join Membership', 'membership2' ) ?></legend> 
  3. <p class="ms-alert-box <?php echo get_ms_pm_alert_box_class(); ?>"> 
  4. <?php echo get_ms_pm_message(); ?> 
  5. </p> 
  6. <table class="ms-purchase-table"> 
  7. <tr> 
  8. <td class="ms-title-column"> 
  9. <?php _e( 'Name', 'membership2' ); ?> 
  10. </td> 
  11. <td class="ms-details-column"> 
  12. <?php echo get_ms_pm_membership_name(); ?> 
  13. </td> 
  14. </tr> 
  15.  
  16. <?php if ( is_ms_pm_membership_description() ) : ?> 
  17. <tr> 
  18. <td class="ms-title-column"> 
  19. <?php _e( 'Description', 'membership2' ); ?> 
  20. </td> 
  21. <td class="ms-desc-column"> 
  22. <span class="ms-membership-description"><?php 
  23. echo get_ms_pm_membership_description(); 
  24. ?></span> 
  25. </td> 
  26. </tr> 
  27. <?php endif; ?> 
  28.  
  29. <?php if ( ! is_ms_pm_membership_free() ) : ?> 
  30. <?php if ( is_ms_pm_invoice_discount() || is_ms_pm_invoice_pro_rate() || is_ms_pm_invoice_tax_rate() ) : ?> 
  31. <tr> 
  32. <td class="ms-title-column"> 
  33. <?php _e( 'Price', 'membership2' ); ?> 
  34. </td> 
  35. <td class="ms-details-column"> 
  36. <?php 
  37. if ( get_ms_pm_membership_price() > 0 ) { 
  38. echo get_ms_pm_membership_formatted_price(); 
  39. } else { 
  40. _e( 'Free', 'membership2' ); 
  41. ?> 
  42. </td> 
  43. </tr> 
  44. <?php endif; ?> 
  45.  
  46. <?php if ( is_ms_pm_invoice_discount() ) : ?> 
  47. <tr> 
  48. <td class="ms-title-column"> 
  49. <?php _e( 'Coupon Discount', 'membership2' ); ?> 
  50. </td> 
  51. <td class="ms-price-column"> 
  52. <?php echo get_ms_pm_invoice_formatted_discount(); ?> 
  53. </td> 
  54. </tr> 
  55. <?php endif; ?> 
  56.  
  57. <?php if ( is_ms_pm_invoice_pro_rate() ) : ?> 
  58. <tr> 
  59. <td class="ms-title-column"> 
  60. <?php _e( 'Pro-Rate Discount', 'membership2' ); ?> 
  61. </td> 
  62. <td class="ms-price-column"> 
  63. <?php echo get_ms_pm_invoice_formatted_pro_rate(); ?> 
  64. </td> 
  65. </tr> 
  66. <?php endif; ?> 
  67.  
  68. <?php if ( is_ms_pm_show_tax() ) : ?> 
  69. <tr> 
  70. <td class="ms-title-column"> 
  71. <?php echo get_ms_pm_invoice_tax_name(); ?> 
  72. </td> 
  73. <td class="ms-price-column"> 
  74. <?php echo get_ms_pm_invoice_formatted_tax(); ?> 
  75. </td> 
  76. </tr> 
  77. <?php endif; ?> 
  78.  
  79. <tr> 
  80. <td class="ms-title-column"> 
  81. <?php _e( 'Total', 'membership2' ); ?> 
  82. </td> 
  83. <td class="ms-price-column ms-total"> 
  84. <?php 
  85. if ( get_ms_pm_invoice_total() > 0 ) { 
  86. if ( is_ms_admin_user() ) { 
  87. echo get_ms_pm_invoice_formatted_total_for_admin(); 
  88. }else{ 
  89. echo get_ms_pm_invoice_formatted_total(); 
  90. } else { 
  91. _e( 'Free', 'membership2' ); 
  92. ?> 
  93. </td> 
  94. </tr> 
  95.  
  96. <?php if ( is_ms_pm_trial() ) : ?> 
  97. <tr> 
  98. <td class="ms-title-column"> 
  99. <?php _e( 'Payment due', 'membership2' ); ?> 
  100. </td> 
  101. <td class="ms-desc-column"><?php 
  102. echo get_ms_pm_invoice_formatted_due_date(); 
  103. ?></td> 
  104. </tr> 
  105. <tr> 
  106. <td class="ms-title-column"> 
  107. <?php _e( 'Trial price', 'membership2' ); ?> 
  108. </td> 
  109. <td class="ms-desc-column"> 
  110. <?php 
  111. if ( get_ms_pm_invoice_trial_price() > 0 ) { 
  112. echo get_ms_pm_invoice_formatted_trial_price(); 
  113. } else { 
  114. _e( 'Free', 'membership2' ); 
  115. ?> 
  116. </td> 
  117. </tr> 
  118. <?php endif; ?> 
  119.  
  120. <?php 
  121. do_action( 
  122. 'ms_view_frontend_payment_after_total_row',  
  123. get_ms_payment_subscription(),  
  124. get_ms_payment_invoice(),  
  125. get_ms_payment_obj() 
  126. ); 
  127. ?> 
  128.  
  129. <tr> 
  130. <td class="ms-desc-column" colspan="2"> 
  131. <span class="ms-membership-description"><?php 
  132. echo get_ms_pm_invoice_payment_description(); 
  133. ?></span> 
  134. </td> 
  135. </tr> 
  136. <?php endif; ?> 
  137.  
  138. <?php if ( is_ms_pm_cancel_warning() ) : ?> 
  139. <tr> 
  140. <td class="ms-desc-warning" colspan="2"> 
  141. <span class="ms-cancel-other-memberships"><?php 
  142. echo get_ms_pm_cancel_warning(); 
  143. ?></span> 
  144. </td> 
  145. </tr> 
  146. <?php endif; 
  147.  
  148. if ( is_ms_admin_user() ) : ?> 
  149. <tr> 
  150. <td class="ms-desc-adminnote" colspan="2"> 
  151. <em><?php 
  152. _e( 'As admin user you already have access to this membership', 'membership2' ); 
  153. ?></em> 
  154. </td> 
  155. </tr> 
  156. <?php else : 
  157. do_action( 
  158. 'ms_view_frontend_payment_purchase_button',  
  159. get_ms_payment_subscription(),  
  160. get_ms_payment_invoice(),  
  161. get_ms_payment_obj() 
  162. ); 
  163. endif; 
  164. ?> 
  165. </table> 
  166. </div> 
  167. <?php 
  168. do_action( 'ms_view_frontend_payment_after', get_ms_payment_obj_data(), get_ms_payment_obj() ); 
  169. do_action( 'ms_show_prices' ); 
  170.  
  171. if ( is_ms_pm_show_tax() ) { 
  172. do_action( 'ms_tax_editor', get_ms_payment_invoice() ); 
  173. ?> 
  174. <div style="clear:both;"></div> 
.