Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 14
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
Transactions_Endpoint
0.00% covered (danger)
0.00%
0 / 13
0.00% covered (danger)
0.00%
0 / 1
6
0.00% covered (danger)
0.00%
0 / 1
 register_endpoint
0.00% covered (danger)
0.00%
0 / 13
0.00% covered (danger)
0.00%
0 / 1
6
1<?php // phpcs:ignore Squiz.Commenting.FileComment.Missing
2namespace Automattic\JetpackCRM;
3
4defined( 'ZEROBSCRM_PATH' ) || exit( 0 );
5
6/**
7 * Transactions endpoint
8 */
9class Transactions_Endpoint extends Client_Portal_Endpoint {
10
11    public static function register_endpoint( $endpoints, $client_portal ) { // phpcs:ignore Squiz.Commenting.FunctionComment.Missing
12        if ( zeroBSCRM_getSetting( 'feat_transactions' ) > 0 ) {
13            $new_endpoint = new Transactions_Endpoint( $client_portal );
14
15            $new_endpoint->portal                       = $client_portal;
16            $new_endpoint->slug                         = 'transactions';
17            $new_endpoint->name                         = __( 'Transactions', 'zero-bs-crm' );
18            $new_endpoint->hide_from_menu               = false;
19            $new_endpoint->menu_order                   = 4;
20            $new_endpoint->icon                         = 'fa-shopping-cart';
21            $new_endpoint->template_name                = 'transactions.php';
22            $new_endpoint->add_rewrite_endpoint         = true;
23            $new_endpoint->should_check_user_permission = true;
24
25            $endpoints[] = $new_endpoint;
26        }
27        return $endpoints;
28    }
29}