• Hello,

    Really really LOVE the plugin but it’s currently incompatible with HPOS on Woocommerce…. Any idea when the plugin gets updated for it? Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Aggravated Badger

    (@tehcook)

    bump

    In 2024, more ecommerce sites are planning a move to HPOS data storage.

    This plugin is marked as not compliant with HPOS data storage.

    Is this true, and if so, is it something that would be very difficult to implement?

    Thread Starter Aggravated Badger

    (@tehcook)

    Bump for awareness

    Thread Starter Aggravated Badger

    (@tehcook)

    Due to the dev’s laziness, I looked for alternatives and lo and behold, I found this article that actually provides a code snippet that does exactly what the plugin does.

    https://avada.io/woocommerce/docs/add-clear-cart-button.html

    I did the Code Snippet method and used this snippet and works LIKE A CHARM:

    add_action( 'woocommerce_cart_coupon', 'custom_woocommerce_empty_cart_button' );
    function custom_woocommerce_empty_cart_button() {
    	echo '<a href="' . esc_url( add_query_arg( 'empty_cart', 'yes' ) ) . '" class="button" title="' . esc_attr( 'Empty Cart', 'woocommerce' ) . '">' . esc_html( 'Empty Cart', 'woocommerce' ) . '</a>';
    }
    
    add_action( 'wp_loaded', 'custom_woocommerce_empty_cart_action', 20 );
    function custom_woocommerce_empty_cart_action() {
    	if ( isset( $_GET['empty_cart'] ) && 'yes' === esc_html( $_GET['empty_cart'] ) ) {
    		WC()->cart->empty_cart();
    
    		$referer  = wp_get_referer() ? esc_url( remove_query_arg( 'empty_cart' ) ) : wc_get_cart_url();
    		wp_safe_redirect( $referer );
    	}
    }
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘incompatible with HPOS for Woocommerce’ is closed to new replies.