1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
<?php namespace Objectiv\Plugins\Checkout\Loaders;
/** * Class Content * * Loads pages into normal WP content * * @link checkoutwc.com * @since 3.6.0 * @package Objectiv\Plugins\Checkout\Core * @author Clifton Griffin <[email protected]> */ class Content extends LoaderAbstract { /** * * @since 3.6.0 * @access public * */ public static function checkout() { /** * Filters whether to load checkout template * * @since 2.0.0 * * @param bool $load True load, false don't load */ if ( ! apply_filters( 'cfw_load_checkout_template', cfw_is_checkout() ) ) { return; }
$global_template_parameters = self::init_checkout();
add_action( 'wp_head', array( 'Objectiv\Plugins\Checkout\Loaders\Content', 'output_custom_header_scripts' ), 20, 4 ); add_action( 'wp_head', array( 'Objectiv\Plugins\Checkout\Loaders\Content', 'output_custom_styles' ), 40, 5 ); add_action( 'wp_footer', array( 'Objectiv\Plugins\Checkout\Loaders\Content', 'output_custom_footer_scripts' ) );
add_shortcode( 'woocommerce_checkout', function() use ( $global_template_parameters ) { // Setup checkout ob_start();
// Output the contents of the <body></body> section self::display( $global_template_parameters, 'content.php' );
return ob_get_clean(); } ); }
public static function order_pay() { /** * Filters whether to load order pay template * * @since 2.0.0 * * @param bool $load True load, false don't load */ if ( ! apply_filters( 'cfw_load_order_pay_template', is_checkout_pay_page() ) ) { return; }
$global_template_parameters = self::init_order_pay();
add_action( 'wp_head', array( 'Objectiv\Plugins\Checkout\Loaders\Content', 'output_custom_header_scripts' ), 20, 4 ); add_action( 'wp_head', array( 'Objectiv\Plugins\Checkout\Loaders\Content', 'output_custom_styles' ), 40, 5 ); add_action( 'wp_footer', array( 'Objectiv\Plugins\Checkout\Loaders\Content', 'output_custom_footer_scripts' ) );
add_shortcode( 'woocommerce_checkout', function() use ( $global_template_parameters ) { // Setup checkout ob_start();
// Output the contents of the <body></body> section self::display( $global_template_parameters, 'order-pay.php' );
return ob_get_clean(); } ); }
public static function order_received() { /** * Filters whether to load order received template * * @since 2.0.0 * * @param bool $load True load, false don't load */ if ( ! apply_filters( 'cfw_load_order_received_template', is_order_received_page() ) ) { return; }
$global_template_parameters = self::init_thank_you();
add_action( 'wp_head', array( 'Objectiv\Plugins\Checkout\Loaders\Content', 'output_custom_header_scripts' ), 20, 4 ); add_action( 'wp_head', array( 'Objectiv\Plugins\Checkout\Loaders\Content', 'output_custom_styles' ), 40, 5 ); add_action( 'wp_footer', array( 'Objectiv\Plugins\Checkout\Loaders\Content', 'output_custom_footer_scripts' ) );
add_shortcode( 'woocommerce_checkout', function() use ( $global_template_parameters ) { // Setup checkout ob_start();
// Output the contents of the <body></body> section self::display( $global_template_parameters, 'thank-you.php' );
return ob_get_clean(); } ); }
/** * @deprecated 5.0.0 */ public static function wp_head() { add_action( 'wp_head', array( 'Objectiv\Plugins\Checkout\Loaders\Content', 'output_custom_header_scripts' ), 20, 4 ); add_action( 'wp_head', array( 'Objectiv\Plugins\Checkout\Loaders\Content', 'output_custom_styles' ), 40, 5 ); }
/** * @deprecated 5.0.0 */ public static function wp_footer() { add_action( 'wp_footer', array( 'Objectiv\Plugins\Checkout\Loaders\Content', 'output_custom_footer_scripts' ) ); } }
|