single-payment-page.php
45 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace Jet_Form_Builder\Gateways\Pages; |
| 5 | |
| 6 | |
| 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\Gateways\Meta_Boxes\Payer_Box; |
| 11 | use Jet_Form_Builder\Gateways\Meta_Boxes\Payer_Shipping_Box; |
| 12 | use Jet_Form_Builder\Gateways\Meta_Boxes\Payment_Details_Box; |
| 13 | |
| 14 | class Single_Payment_Page extends Base_Single_Page { |
| 15 | |
| 16 | /** |
| 17 | * Page title |
| 18 | */ |
| 19 | public function title(): string { |
| 20 | return __( 'JetFormBuilder Payment', 'jet-form-builder' ); |
| 21 | } |
| 22 | |
| 23 | public function parent_slug(): string { |
| 24 | return Payments_Page::SLUG; |
| 25 | } |
| 26 | |
| 27 | public function meta_containers(): array { |
| 28 | return array( |
| 29 | new Meta_Containers\Normal_Meta_Container( |
| 30 | new Payer_Box(), |
| 31 | new Payer_Shipping_Box() |
| 32 | ), |
| 33 | new Meta_Containers\Side_Meta_Container( |
| 34 | new Payment_Details_Box() |
| 35 | ), |
| 36 | ); |
| 37 | } |
| 38 | |
| 39 | public function assets() { |
| 40 | wp_enqueue_style( Pages_Manager::STYLE_ADMIN ); |
| 41 | wp_enqueue_script( Pages_Manager::SCRIPT_VUEX_PACKAGE ); |
| 42 | |
| 43 | parent::assets(); |
| 44 | } |
| 45 | } |