| 1 |
<?php |
| 2 |
|
| 3 |
namespace SpringDevs\Subscription\Illuminate; |
| 4 |
|
| 5 |
/** |
| 6 |
* Class Comments |
| 7 |
* |
| 8 |
* @package SpringDevs\Subscription\Illuminate |
| 9 |
*/ |
| 10 |
class Comments { |
| 11 |
|
| 12 |
/** |
| 13 |
* Initialize the class. |
| 14 |
*/ |
| 15 |
public function __construct() { |
| 16 |
add_action( 'admin_init', array( $this, 'remove_comments_metabox' ) ); |
| 17 |
} |
| 18 |
|
| 19 |
/** |
| 20 |
* Remove Comments related metaboxes from `subscrpt_order` post. |
| 21 |
* |
| 22 |
* @return void |
| 23 |
*/ |
| 24 |
public function remove_comments_metabox() { |
| 25 |
remove_meta_box( 'commentsdiv', 'subscrpt_order', 'normal' ); |
| 26 |
remove_meta_box( 'commentstatusdiv', 'subscrpt_order', 'side' ); |
| 27 |
remove_meta_box( 'commentstatusdiv', 'subscrpt_order', 'normal' ); |
| 28 |
remove_meta_box( 'commentstatusdiv', 'subscrpt_order', 'normal' ); |
| 29 |
} |
| 30 |
} |
| 31 |
|