Put this code in your current theme function.php file. Set how many discount as per your require.
function add_extra_discount( $cart ) {
$discount = $cart->subtotal * 0.3;
$cart->add_fee( __( 'Extra Discount', 'twentyseventeen' ) , -$discount );
}
add_action( 'woocommerce_cart_calculate_fees', 'add_extra_discount' );
Related Posts:
- Order by rating not works in wp_query
- Woocommerce: show default variation price is products list?
- Woocommerce checkout fields on the same line
- display available size on hover, in woocommerce shop page [closed]
- How to Add Product Variation with Multiple Images via WooCommerce REST API
- WooCommerce: Email Notifications
- How do you add custom metadata to WooCommerce orders? Specifically a second external order ID
- WooCommerce: Adding Order Item Meta Data That’s Hidden
- Hide tabs on woocommerce product editor for user role
- Woocommerce add_to_cart non-register visitor not working
- Redirect user after login through woocommerce login page to page with his/her username?
- WooCommerce restore stock on order cancel
- WooCommerce: The model of e-mail is displaying only the html, not css [closed]
- How to show loading spinner after click on add to cart button [closed]
- Authenticate user into wordpress via 3rd party system, both with the same domain
- WordPress select field – show current value?
- Function to recalculate shipping costs on subscriptions after renewal with Automatewoo
- Creating a multisite registration form that also creates a woocommerce post
- Server-Based CRON Job
- How to incluide custom field in WooCommerce email using placeholder
- Woocommerce: Can’t put items in cart in iframe and on iphone
- How to show tag count for individual product post in wordpress woocommerce
- Checkout is blocked with blockUI when using action woocommerce_cart_calculate_fees
- Checkout form looks terrible [closed]
- How to upload multiple image using wp_insert_post
- How can i manage total price in checkout page? [closed]
- In WooCommerce product archive, how can you also set the quantity to be added to cart by typing, instead of just by using +/-?
- WooCommerce product category permalinks
- How to do string attachment with wp_mail
- Can’t show most recent comment on top with wp_list_comments() for WooCommerce reviews
- WooCommerce order complete email logic
- WooCommerce Displaying Price With & Without TAX [closed]
- API returns blank response after installing & uninstalling WP-rest-api plugin
- Tried to create a user role that can only edit user information, but my test account cannot view the dashboard. What am I missing?
- Filtering variable WooCommerce products by stock level using meta_query
- How can I run a multi language WordPress site in two folders in one install? [closed]
- Dropdown menu not displaying WordPress
- Redirect no product url’s to static url
- Adding a custom Shipping methods field to an order
- WooCommerce – Create multiple product tags via rest api endpoint
- WooCommerce which roles and capabilities control user login re-direct to Woo Account Page?
- how do i remove a woo-commerce widget?
- How can I convert woocommerce checkout fields in capital letters
- Conditional action hook
- Sending Email upon registration
- Order by date on category dynamically – Woocommerce
- Woocomnerce Limit Purchase value before proceed checkout
- Migrating data from Woocommerce to another webapp
- How To Customize The Product Page Template for a WooCommerce Custom Product Type Plugin [closed]
- Options to develop a non-ecommerce catalog?
- wp_set_object_terms setting only first id from array
- I need to export all products and images but I don’t know which table the images are in
- Add only sku to product url woocoomerce
- What is better way to sync wp multisite woocommerce products
- Remove required from a custom field created from WooCommerce Checkout Field Editor plugin
- How to change status of woocommerce orders when post status is changed
- Purchase/order statistics plugin for viewing per payment menthod?
- Displaying Woocommerce Product Attributes on single product page
- WooCommerce – Child Category wont show, but Parent does
- How to hide a random text with a div tag using a class on product pages with a specific tag
- How to solve `Error getting remote image` in woocommerce rest api script?
- Woocommerce digital download not working – database error Cannot add or update a child row: a foreign key constraint fails [closed]
- Add username and password section in WooCommerce’s my account page
- Recently viewed products – Order by viewed
- How can i add product Accessories from front-end using custom php form?
- How to save order item custom attributes save into custom table
- Manually create an order with a product ID woocommerce
- How to change user role after login?
- WooCommerce free shipping twice a week
- Product overlapping header
- merge tabs in woocommerce
- How to import products to Woo Commerce given that WP All Import keeps timing out
- WooCommerce subscriptions give option of manual renewal on checkout [closed]
- How to make a custom redirect in WooCommerce?
- Firstname and lastname greyout or hidden Billing details at next checkout like username is hidden [closed]
- How to use woo commerce login to authenticate code php pages?
- Change order status after checkout
- Is it safe to update an old site after backing it up and activating a child theme?
- how to add custom reviews button in woocommerce order complete generated mail
- Click Count on Download a File
- How to add coupon expiry date into the followup emails?
- Disable Woocommerce main shop page, but not the product category archive pages
- Not all strings are translated
- Custom Woocommerce checkout filed yields a Json error when validating [closed]
- access Woo commerce | WordPress methods externally
- How to store ACF from product in user_meta?
- How to display Woocommerce catagories
- Woocommerce set single city to sell to
- Trying to link to a custom css file in a new folder
- eCommerce solution doesn’t want to display its shortcodes or any content where it’s set to [closed]
- Woocommerce hidden fields with meta keys and values. how?
- How do I make a diagonal strikethrough on wordpress? [closed]
- Woocommerce – Remove ‘Buy Product’ Button from shop page [closed]
- Add woocommerce.css in template?
- registration_errors not working
- Translate Woocommerce tab
- Woocommerce -> gallery images per variation without a plugin? [closed]
- Detect Product Type with code
- Verify if woocommerce supports this design [closed]
- Hook for Woocommerce checkout fields