| 1 |
<?php |
| 2 |
/** |
| 3 |
* @author ThimPress |
| 4 |
* @package LearnPress/Templates |
| 5 |
* @version 4.0.0 |
| 6 |
*/ |
| 7 |
|
| 8 |
defined( 'ABSPATH' ) || exit(); |
| 9 |
|
| 10 |
if ( ! isset( $order ) ) { |
| 11 |
return; |
| 12 |
} |
| 13 |
|
| 14 |
$profile = LP_Profile::instance(); |
| 15 |
?> |
| 16 |
|
| 17 |
<?php if ( $order->get_user_id() != get_current_user_id() ) : ?> |
| 18 |
<p><?php printf( __( 'This order is paid for %s', 'learnpress' ), $order->get_user_email() ); ?></p> |
| 19 |
<?php else : ?> |
| 20 |
<?php $checkout_email = $order->get_checkout_email(); ?> |
| 21 |
<?php if ( $checkout_email && $checkout_email != $profile->get_user()->get_email() ) : ?> |
| 22 |
<p><?php printf( __( 'This order is paid by %s', 'learnpress' ), $order->get_checkout_email() ); ?></p> |
| 23 |
<?php endif; ?> |
| 24 |
<?php endif; ?> |
| 25 |
|