PluginProbe
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 4.2.2
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v4.2.2
4.7.2 4.7.1 4.7.0 4.6.6 4.6.5 4.6.4 4.6.3 4.6.2 4.6.1 4.6.0 4.5.1 4.5.0 4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 All 281 releases
surecart / packages / blocks / Controllers / ChargeController.php
ChargeController.php
49 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace SureCartBlocks\Controllers;
3
4 use SureCart\Models\Component;
5 use SureCart\Models\User;
6
7 class ChargeController extends BaseController {
8 /**
9 * List all charges and paginate.
10 *
11 * @return function
12 */
13 public function index() {
14 ob_start(); ?>
15
16 <sc-spacing style="--spacing: var(--sc-spacing-large)">
17 <sc-breadcrumbs>
18 <sc-breadcrumb href="<?php echo esc_url( add_query_arg( [ 'tab' => $this->getTab() ], remove_query_arg( array_keys( $_GET ) ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended ?>">
19 <?php esc_html_e( 'Dashboard', 'surecart' ); ?>
20 </sc-breadcrumb>
21 <sc-breadcrumb>
22 <?php esc_html_e( 'Payment History', 'surecart' ); ?>
23 </sc-breadcrumb>
24 </sc-breadcrumbs>
25
26 <?php
27 echo wp_kses_post(
28 Component::tag( 'sc-charges-list' )
29 ->id( 'sc-customer-charges' )
30 ->with(
31 [
32 'heading' => __( 'Payment History', 'surecart' ),
33 'query' => [
34 'customer_ids' => array_values( User::current()->customerIds() ),
35 'page' => $this->getPage(),
36 'per_page' => 10,
37 ],
38 ]
39 )->render()
40 );
41 ?>
42
43 </sc-spacing>
44
45 <?php
46 return ob_get_clean();
47 }
48 }
49