| 1 |
<?php |
| 2 |
/** |
| 3 |
* Class ProfileOrdersTemplate. |
| 4 |
* |
| 5 |
* @since 4.2.6.2 |
| 6 |
* @version 1.0.0 |
| 7 |
*/ |
| 8 |
namespace LearnPress\TemplateHooks\Profile; |
| 9 |
|
| 10 |
use LearnPress\Helpers\Template; |
| 11 |
|
| 12 |
class ProfileOrdersTemplate { |
| 13 |
public static function instance() { |
| 14 |
static $instance = null; |
| 15 |
|
| 16 |
if ( is_null( $instance ) ) { |
| 17 |
$instance = new self(); |
| 18 |
} |
| 19 |
|
| 20 |
return $instance; |
| 21 |
} |
| 22 |
|
| 23 |
public static function tab_content() { |
| 24 |
do_action( 'learn-press/profile/layout/orders' ); |
| 25 |
} |
| 26 |
|
| 27 |
protected function __construct() { |
| 28 |
add_action( 'learn-press/profile/layout/orders', [ $this, 'sections' ], 2 ); |
| 29 |
} |
| 30 |
|
| 31 |
public static function init() { |
| 32 |
self::instance(); |
| 33 |
} |
| 34 |
|
| 35 |
public function sections( $data ) { |
| 36 |
echo '<div class="profile-orders">'; |
| 37 |
Template::instance()->get_template( |
| 38 |
LP_PLUGIN_PATH . 'templates/profile/tabs/orders/list.php' |
| 39 |
); |
| 40 |
Template::instance()->get_template( |
| 41 |
LP_PLUGIN_PATH . 'templates/profile/tabs/orders/recover-order.php' |
| 42 |
); |
| 43 |
echo '</div>'; |
| 44 |
} |
| 45 |
} |
| 46 |
|