Visual hooks not working properly (with alternative solution)
-
Update: Realized there’s no issue, just the code not updating.
Some of the visual hooks are not working, for example,
cartpops_drawer_after_checkout_buttonWhen you try to add a add_action, it won’t work because the do_action is embed inside a div. A simple alternative is to modify the file and place the do_action out of the div like this:
<div class="<?php echo esc_html( implode( ' ', array_filter( $classes ) ) ); ?>"> <div class="cpops-cart-line-items"> <?php if ( ! empty( $subtotal ) ) : ?> <?php echo wp_kses_post( $subtotal ); ?> <?php endif; ?> <?php if ( ! empty( $discount ) ) : ?> <?php echo wp_kses_post( $discount ); ?> <?php endif; ?> <?php if ( ! empty( $tax ) ) : ?> <?php echo wp_kses_post( $tax ); ?> <?php endif; ?> <?php if ( ! empty( $total ) ) : ?> <?php echo wp_kses_post( $total ); ?> <?php endif; ?> </div> <?php do_action( 'cartpops_drawer_before_checkout_button' ); ?> <div class="wc-proceed-to-checkout"> <a class="checkout-button wc-forward" href="<?php echo esc_url( $url ); ?>"><?php echo esc_html( $button_text ); ?></a> </div> </div> <?php do_action( 'cartpops_drawer_after_checkout_button' ); ?> //Outside of divThis is a temporary alternative that I have for now, it is not exactly a solution as it is outside the div, and not after the button. Hopefully it’ll be fixed in the next update with a proper solution! Thanks
Update: Realized there’s no issue, just the code not updating.
The topic ‘Visual hooks not working properly (with alternative solution)’ is closed to new replies.