PluginProbe
JetFormBuilder — Dynamic Blocks Form Builder / 3.6.5.4
JetFormBuilder — Dynamic Blocks Form Builder v3.6.5.4
3.6.6.1 3.6.6 3.6.5.4 3.6.5.3 3.6.5.2 3.6.5.1 3.6.5 3.6.4.2 3.6.4.1 3.6.4 3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 134 releases
jetformbuilder / modules / gateways / pages / single-payment-print-page.php

single-payment-print-page.php in JetFormBuilder — Dynamic Blocks Form Builder 3.6.5.4, at modules/gateways/pages/single-payment-print-page.php

80 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 namespace JFB_Modules\Gateways\Pages;
5
6 use Jet_Form_Builder\Admin\Pages\interfaces\Page_Script_Declaration_Interface;
7 use Jet_Form_Builder\Admin\Pages\Pages_Manager;
8 use Jet_Form_Builder\Admin\Single_Pages\Base_Single_Page;
9 use Jet_Form_Builder\Admin\Single_Pages\Meta_Containers;
10 use Jet_Form_Builder\Exceptions\Repository_Exception;
11 use JFB_Modules\Gateways\Meta_Boxes\Payer_Box;
12 use JFB_Modules\Gateways\Meta_Boxes\Payer_Shipping_Box;
13 use Jet_Form_Builder\Gateways\Meta_Boxes\Payment_Details_Box;
14 use JFB_Modules\Gateways\Module;
15
16 // If this file is called directly, abort.
17 if ( ! defined( 'WPINC' ) ) {
18 die;
19 }
20
21 class Single_Payment_Print_Page extends Base_Single_Page implements Page_Script_Declaration_Interface {
22
23 use Gateways_Pages_Trait;
24
25 /**
26 * Page title
27 */
28 public function title(): string {
29 return __( 'JetFormBuilder Payment', 'jet-form-builder' );
30 }
31
32 public function slug(): string {
33 return 'payment-print';
34 }
35
36 public function parent_slug(): string {
37 return Payments_Page::SLUG;
38 }
39
40 public function meta_containers(): array {
41 return array(
42 new Meta_Containers\Normal_Meta_Container(
43 new Payer_Box(),
44 new Payer_Shipping_Box()
45 ),
46 new Meta_Containers\Side_Meta_Container(
47 new Payment_Details_Box()
48 ),
49 );
50 }
51
52 public function assets() {
53 wp_enqueue_style( Pages_Manager::STYLE_ADMIN );
54 wp_enqueue_script( Pages_Manager::SCRIPT_VUEX_PACKAGE );
55
56 parent::assets();
57 }
58
59 /**
60 * @throws Repository_Exception
61 */
62 public function register_scripts() {
63 /** @var Module $module */
64 /** @noinspection PhpUnhandledExceptionInspection */
65 $module = jet_form_builder()->module( 'gateways' );
66 $script_asset = require_once $module->get_dir(
67 'assets/build/admin/pages/payment-print.asset.php'
68 );
69
70 wp_register_script(
71 $this->slug(),
72 $this->base_script_url(),
73 $script_asset['dependencies'],
74 $script_asset['version'],
75 true
76 );
77 }
78
79 }
80