Advertisement
verygoodplugins

Untitled

Nov 29th, 2021
836
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.58 KB | None | 0 0
  1.     <?php $license_keys = edd_software_licensing()->get_license_keys_of_user(); ?>
  2.  
  3.     <div class="edd-licenses">
  4.  
  5.         <?php if ( $license_keys ) : ?>
  6.             <?php foreach ( $license_keys as $license ) : ?>
  7.  
  8.                 <div class="single-edd-license box-shadow">
  9.  
  10.                     <?php $payment_id = edd_software_licensing()->get_payment_id( $license->ID ); ?>
  11.  
  12.                     <h5 class="edd_sl_item_name" style="font-weight: bold; margin-bottom: 15px;">
  13.                         <?php echo edd_software_licensing()->get_download_name( $license->ID ); ?>
  14.                         <?php if( $price_id = edd_software_licensing()->get_price_id( $license->ID ) ) : ?>
  15.                             <span class="edd_sl_key_sep">&nbsp;&ndash;&nbsp;</span>
  16.                             <span class="edd_sl_key_price_option"><?php echo edd_get_price_option_name( edd_software_licensing()->get_download_id( $license->ID ), $price_id ); ?></span>
  17.                         <?php endif; ?>
  18.                     </h5>
  19.                     <span class="edd_sl_license_key_wrapper">
  20.                         <input type="text" readonly="readonly" class="edd_sl_license_key" value="<?php echo esc_attr( edd_software_licensing()->get_license_key( $license->ID ) ); ?>" />
  21.                     </span>
  22.  
  23.                     <table class="license-details">
  24.                         <tr>
  25.                             <td>
  26.  
  27.                                 <span class="edd_sl_status_label"><?php _e( 'Status:', 'edd_sl' ); ?>&nbsp;</span>
  28.                                 <span class="edd_sl_license_status edd-sl-<?php echo edd_software_licensing()->get_license_status( $license->ID ); ?>">
  29.                                     <?php echo ucwords(edd_software_licensing()->get_license_status( $license->ID )); ?>
  30.                                 </span>
  31.                                 <div class="edd_sl_item_expiration">
  32.                                     <span class="edd_sl_expires_label edd_sl_expiries_label"><?php 'expired' === edd_software_licensing()->get_license_status( $license->ID ) ? _e( 'Expired:', 'edd_sl' ) : _e( 'Expires:', 'edd_sl' ); ?>&nbsp;</span>
  33.                                     <?php if( edd_software_licensing()->is_lifetime_license( $license->ID ) ) : ?>
  34.                                         <?php _e( 'Never', 'edd_sl' ); ?>
  35.                                     <?php else: ?>
  36.                                         <?php echo date_i18n( 'F j, Y', edd_software_licensing()->get_license_expiration( $license->ID ) ); ?>
  37.                                     <?php endif; ?>
  38.                                 </div>
  39.                                 <span class="edd_sl_limit_label"><?php _e( 'Activations:', 'edd_sl' ); ?>&nbsp;</span>
  40.                                 <span class="edd_sl_limit_used"><?php echo edd_software_licensing()->get_site_count( $license->ID ); ?></span>
  41.                                 <span class="edd_sl_limit_sep">&nbsp;/&nbsp;</span>
  42.                                 <span class="edd_sl_limit_max"><?php echo edd_software_licensing()->license_limit( $license->ID ); ?></span>
  43.  
  44.                             </td>
  45.                             <td class="right">
  46.  
  47.                                 <?php if( ! edd_software_licensing()->force_increase() ) : ?>
  48.                                     <a href="<?php echo esc_url( add_query_arg( array( 'license_id' => $license->ID, 'action' => 'manage_licenses', 'payment_id' => $payment_id ), get_permalink( edd_get_option( 'purchase_history_page' ) ) ) ); ?>"><?php _e( 'Manage Sites', 'edd_sl' ); ?></a>
  49.                                 <?php endif; ?>
  50.                                 <?php if( edd_sl_license_has_upgrades( $license->ID ) && 'expired' !== edd_software_licensing()->get_license_status( $license->ID ) ) : ?>
  51.                                     <br />
  52.                                     <a href="<?php echo esc_url( add_query_arg( array( 'view' => 'upgrades', 'license_id' => $license->ID, 'action' => 'manage_licenses', 'payment_id' => $payment_id ), get_permalink( edd_get_option( 'purchase_history_page' ) ) ) ); ?>"><?php _e( 'View Upgrades', 'edd_sl' ); ?></a>
  53.                                 <?php elseif ( edd_sl_license_has_upgrades( $license->ID ) && 'expired' == edd_software_licensing()->get_license_status( $license->ID ) ) : ?>
  54.                                     <br />
  55.                                     <span class="edd_sl_no_upgrades"><?php _e( 'Renew to upgrade', 'edd_sl' ); ?></span>
  56.                                 <?php endif; ?>
  57.                                 <?php if( edd_sl_renewals_allowed() ) : ?>
  58.                                     <?php if( 'expired' === edd_software_licensing()->get_license_status( $license->ID ) ) : ?>
  59.                                         <br />
  60.                                         <a href="<?php echo edd_software_licensing()->get_renewal_url( $license->ID ); ?>" title="<?php esc_attr_e( 'Renew license', 'edd_sl' ); ?>"><?php _e( 'Renew license', 'edd_sl' ); ?></a>
  61.                                     <?php elseif( ! edd_software_licensing()->is_lifetime_license( $license->ID ) && edd_software_licensing()->can_extend( $license->ID ) ) : ?>
  62.                                         <br />
  63.                                         <a href="<?php echo edd_software_licensing()->get_renewal_url( $license->ID ); ?>" title="<?php esc_attr_e( 'Extend license', 'edd_sl' ); ?>"><?php _e( 'Extend license', 'edd_sl' ); ?></a>
  64.                                     <?php endif; ?>
  65.                                 <?php endif; ?>
  66.                                 <br/>
  67.                                 <?php do_action( 'edd_sl_license_key_details', $license->ID ); ?>
  68.  
  69.                             </td>
  70.                         </tr>
  71.                     </table>
  72.  
  73.                 </div>
  74.  
  75.             <?php endforeach; ?>
  76.         <?php else : ?>
  77.  
  78.             <p>You currently have no licenses.</p>
  79.  
  80.         <?php endif; ?>
  81.  
  82.     </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement