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
|
<?php
use Objectiv\Plugins\Checkout\Managers\SettingsManager;
add_action( 'cfw_checkout_before_order_review', 'copify_desktop_header', 10 ); add_action( 'cfw_thank_you_before_order_review', 'copify_desktop_header', 10 ); add_action( 'cfw_order_pay_before_order_review', 'copify_desktop_header', 10 );
function copify_desktop_header() { if ( ! has_action( 'cfw_custom_header' ) ) : ?> <div id="cfw-logo-container"> <?php cfw_logo(); ?> </div> <?php endif; }
// 5 makes sure this is above notices add_action( 'cfw_checkout_main_container_start', 'copify_mobile_logo', 5 ); add_action( 'cfw_thank_you_main_container_start', 'copify_mobile_logo', 5 ); add_action( 'cfw_order_pay_main_container_start', 'copify_mobile_logo', 5 );
function copify_mobile_logo() { if ( ! has_action( 'cfw_custom_header' ) ) : ?> <div id="cfw-logo-container-mobile"> <?php cfw_logo(); ?> </div> <?php endif; }
add_action( 'cfw_checkout_after_order_review', 'copify_footer' ); add_action( 'cfw_thank_you_after_order_review', 'copify_footer' ); add_action( 'cfw_order_pay_after_order_review', 'copify_footer' ); function copify_footer() { if ( ! has_action( 'cfw_custom_footer' ) ) : ?> <footer id="cfw-footer" class="row"> <div class="col-lg-12"> <div class="cfw-footer-inner entry-footer"> <?php /** * Fires at the top of footer * * @since 3.0.0 */ do_action( 'cfw_before_footer' ); ?> <?php if ( ! empty( $footer_text = SettingsManager::instance()->get_setting( 'footer_text' ) ) ) : ?> <?php echo do_shortcode( $footer_text ); ?> <?php else : ?> Copyright © <?php echo date( 'Y' ); ?>, <?php echo get_bloginfo( 'name' ); ?>. All rights reserved. <?php endif; ?> <?php /** * Fires at the bottom of footer * * @since 3.0.0 */ do_action( 'cfw_after_footer' ); ?> </div> </div> </footer> <?php endif; }
// Move notices inside container remove_action( 'cfw_order_pay_main_container_start', 'cfw_wc_print_notices_with_wrap', 10 ); add_action( 'cfw_order_pay_before_order_review', 'cfw_wc_print_notices', 0 );
remove_action( 'cfw_checkout_main_container_start', 'cfw_wc_print_notices_with_wrap', 10 ); add_action( 'cfw_checkout_before_order_review', 'cfw_wc_print_notices', 0 );
|