Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $license_keys = edd_software_licensing()->get_license_keys_of_user(); ?>
- <div class="edd-licenses">
- <?php if ( $license_keys ) : ?>
- <?php foreach ( $license_keys as $license ) : ?>
- <div class="single-edd-license box-shadow">
- <?php $payment_id = edd_software_licensing()->get_payment_id( $license->ID ); ?>
- <h5 class="edd_sl_item_name" style="font-weight: bold; margin-bottom: 15px;">
- <?php echo edd_software_licensing()->get_download_name( $license->ID ); ?>
- <?php if( $price_id = edd_software_licensing()->get_price_id( $license->ID ) ) : ?>
- <span class="edd_sl_key_sep"> – </span>
- <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>
- <?php endif; ?>
- </h5>
- <span class="edd_sl_license_key_wrapper">
- <input type="text" readonly="readonly" class="edd_sl_license_key" value="<?php echo esc_attr( edd_software_licensing()->get_license_key( $license->ID ) ); ?>" />
- </span>
- <table class="license-details">
- <tr>
- <td>
- <span class="edd_sl_status_label"><?php _e( 'Status:', 'edd_sl' ); ?> </span>
- <span class="edd_sl_license_status edd-sl-<?php echo edd_software_licensing()->get_license_status( $license->ID ); ?>">
- <?php echo ucwords(edd_software_licensing()->get_license_status( $license->ID )); ?>
- </span>
- <div class="edd_sl_item_expiration">
- <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' ); ?> </span>
- <?php if( edd_software_licensing()->is_lifetime_license( $license->ID ) ) : ?>
- <?php _e( 'Never', 'edd_sl' ); ?>
- <?php else: ?>
- <?php echo date_i18n( 'F j, Y', edd_software_licensing()->get_license_expiration( $license->ID ) ); ?>
- <?php endif; ?>
- </div>
- <span class="edd_sl_limit_label"><?php _e( 'Activations:', 'edd_sl' ); ?> </span>
- <span class="edd_sl_limit_used"><?php echo edd_software_licensing()->get_site_count( $license->ID ); ?></span>
- <span class="edd_sl_limit_sep"> / </span>
- <span class="edd_sl_limit_max"><?php echo edd_software_licensing()->license_limit( $license->ID ); ?></span>
- </td>
- <td class="right">
- <?php if( ! edd_software_licensing()->force_increase() ) : ?>
- <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>
- <?php endif; ?>
- <?php if( edd_sl_license_has_upgrades( $license->ID ) && 'expired' !== edd_software_licensing()->get_license_status( $license->ID ) ) : ?>
- <br />
- <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>
- <?php elseif ( edd_sl_license_has_upgrades( $license->ID ) && 'expired' == edd_software_licensing()->get_license_status( $license->ID ) ) : ?>
- <br />
- <span class="edd_sl_no_upgrades"><?php _e( 'Renew to upgrade', 'edd_sl' ); ?></span>
- <?php endif; ?>
- <?php if( edd_sl_renewals_allowed() ) : ?>
- <?php if( 'expired' === edd_software_licensing()->get_license_status( $license->ID ) ) : ?>
- <br />
- <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>
- <?php elseif( ! edd_software_licensing()->is_lifetime_license( $license->ID ) && edd_software_licensing()->can_extend( $license->ID ) ) : ?>
- <br />
- <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>
- <?php endif; ?>
- <?php endif; ?>
- <br/>
- <?php do_action( 'edd_sl_license_key_details', $license->ID ); ?>
- </td>
- </tr>
- </table>
- </div>
- <?php endforeach; ?>
- <?php else : ?>
- <p>You currently have no licenses.</p>
- <?php endif; ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement