• Resolved kaeming

    (@kaeming)


    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_button

    When 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 div
    

    This 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.

    • This topic was modified 5 years, 1 month ago by kaeming.
    • This topic was modified 5 years, 1 month ago by kaeming.
    • This topic was modified 5 years, 1 month ago by kaeming.
    • This topic was modified 5 years, 1 month ago by kaeming.
    • This topic was modified 5 years, 1 month ago by kaeming.
    • This topic was modified 5 years, 1 month ago by kaeming.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kaeming

    (@kaeming)

    Also just want to comment that I love this plugin, will upgrade to the pro version soon 😀

    Plugin Author CartPops

    (@woopops)

    Thank you @kaeming , that menas a lot!

    Code not updating, try adding something to the cart. Sometimes the fragments are cached and they need to refresh again.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Visual hooks not working properly (with alternative solution)’ is closed to new replies.