[Solved] How can I reliably reset the Woocommerce user selected shipping method in the cart during testing? [closed]

Have a look at the WooCommerce Shipping Class. Specifically, the reset_shipping() method. You can reset the chosen shipping method that has been stored to the session via: <?php unset( WC()->session->chosen_shipping_methods ); ?> EDIT: A non-programmatic way to do this is to head to the WP Admin Dashboard and navigate to: WooCommerce –> System Status –> … Read more

[Solved] I want to delete a specified row in an html table where a class cannot be added [closed]

It’s hard to understand your question so please clarify if this is not your requested answer. You could use the css selector :nth-child(x) to select the correct cells that need to disappear. Then you can use display: none; to hide these cells. If you don’t want other cells to jump in weird places you could … Read more

[Solved] Woocommerce Progressive extra cost based on total number of items in the cart

Based on (this answer) WooCommerce Cart Quantity Base Discount, you can add a progressive fee based on total number of items: add_action( ‘woocommerce_cart_calculate_fees’,’woocommerce_cart_extra_cost’, 10, 1 ); function woocommerce_cart_extra_cost( $cart ) { if ( is_admin() && ! defined( ‘DOING_AJAX’ ) ) return; $cart_item_count = $cart->get_cart_contents_count(); // CONDITIONAL ITEMS QUANTITY FEE AMOUNT if( $cart_item_count < 6 ) … Read more

[Solved] Woocommerce: disable payment method with cost on delivery

A good way how to do this is through jQuery. Put inside the of your document the following <script src=”https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js”></script> Then find the file where the checkout page is setup and enter the following: $(document).ready(function() { if ($(‘input[name=your_radio_name]:checked’).val() == “the value when the element should be hidden”) { $(‘#id_of_the_element_that_should_be_hidden’).hide(); }); }); 2 solved Woocommerce: disable … Read more

[Solved] WordPress Woocommerce theme’s Header is not transparent like in the original demo

First, I think you need to check options in wp-admin > appearance > customize. Sometime themes provide few options regarding Header there. I have checked it and it looks like your “.content” div is not starting from top of the body. Your “header” is already transparent. If you have still an issue, let me check … Read more

[Solved] sidebar on the shop page is not showing but showing in blog and single product pages only [closed]

Answer: To make appear sidebar in shop page or else first we should check some default possible ways . step 1: check in theme customising- layout&styling the size of layout switched to full width.() step 2: after clicking widget option to customise widget in the shop page ,if you see notice as ‘your theme has … Read more

[Solved] How to add target=“_blank” to add to cart button on Single Product page? [closed]

You add this piece of code to your functions.php file: // add custom button to shop page add_filter(‘woocommerce_loop_add_to_cart_link’, ‘shop_page_open_external_in_new_window’, 10, 2); function shop_page_open_external_in_new_window($link) { global $product; if ($product->is_type(‘external’)) { $link = sprintf( ‘<a rel=”nofollow” href=”%s” data-quantity=”%s” data-product_id=”%s” data-product_sku=”%s” class=”%s” target=”_blank”>%s</a>’, esc_url($product->add_to_cart_url()), esc_attr(isset($quantity) ? $quantity : 1), esc_attr($product->id), esc_attr($product->get_sku()), esc_attr(isset($class) ? $class : ‘button product_type_external’), esc_html($product->add_to_cart_text()) … Read more