My friend Ewout just answered this question a couple months ago on stackoverflow. Add the following to your theme’s functions.php file:
add_filter ('add_to_cart_redirect', 'redirect_to_checkout');
function redirect_to_checkout() {
global $woocommerce;
$checkout_url = $woocommerce->cart->get_checkout_url();
return $checkout_url;
}
Here’s a link to his answer: https://stackoverflow.com/a/15597933/1543310
Related Posts:
- “Custom Post Type Permalinks” plugin URL strcuture
- register_activation_hook in oop approach
- Can free plugin on WordPress.org site promote pro-version of this plugin?
- Add script into front from my plugin
- Meta box losing its value when scheduled post is published
- Make thumbnails on product-category pages the same size [WooCommerce] [closed]
- how to change automatic placing of social plugins below content?
- Multisite for Multisite?
- Get User_id outside wordpress,
- Why shortcode always displayed after footer not in body
- HTTP 500 error after plugin install
- echo statement displayed on front end
- how to activate a plugin inside a theme
- Add some fileds to the wp_posts table
- Editing wp-config.php
- What am is missing? (API CORS)
- How to find out which plugin create captcha after login?
- Plugin Activation Error – The plugin generated 22 characters of unexpected output during activation
- Change the layout of action links under the plugin names
- How can i add simple code in only in posts by function.php
- Deactivated Visual Composer plugin, site crashed, what to do? [closed]
- JQuery needs to be defined in , but Gravity Forms is defining it in the
- Does Deactivating a Plugin Help Anything?
- The add_action(‘register_form’) isn’t effecting my registration form
- Store plugin page content in wp_options?
- Plugin hook not working on specific WordPress installation – how to troubleshoot?
- HTTPS connection with wampserver for “Facebook for WordPress” plugin
- Each User has a Personal Blog
- Add Stack Exchange Recent Questions to a wordpress sidebar?
- How to hide plugin options for editors via functions.php
- WordPress Stats Plugin: Display Post Views [closed]
- Pagination not working
- looking for a multi-user hello-world plugin
- Unable to use custom taxonomy with front end post form
- jQuery slider widget similar to cnet.com
- Custom content plugin for front page in wordpress
- Bulk User Deletion
- Links to plugin files not resolving
- Transfer from register plus to register plus redux plugin
- need to find duplicated meta value in custom filed and view the posts that have the same value
- Woocommerce plugin – How to create two versions of the same plugin with slightly different implementation for different users
- product available stock day by day
- How to search post titles with whole words only, but not the exact word only?
- Can I disable xml-rpc by setting it to false?
- Add a parameter at the end of the url and prettify
- Cron: Update four post at Hour
- submit two file input fields in the same form
- Is there any known plugins that would replace WordPress classes in editor with their Bootstrap 4 equivalent?
- Share my WordPress plugin for updating how?
- Add post attachment images their links
- elementor development – custom widget like an inner section widget
- How can I change page content for good once a button is pressed?
- Google Maps for Woocommerce Checkout
- WordPress Admin login redirect to homepage
- Get and Update Most Meta Value as an array in HTML form
- Error after installing the WordPress plugin updates
- Plugin to manage form submissions on admin panel
- How to iterate on a list?
- How to upload PDF from Front-End and post automatically?
- WordPress error after installing plugin “Internal Server Error” [closed]
- The etiquette of forking a plugin and table tag
- echo plugin results on pages
- ACF Taxonomy search on backend (Relationship field)
- Template conflict with WC Payment Method
- Confusing problem with displaying message recipient metadata
- When in WordPress I try to run a php script directly I am redirected to the home page
- wp_insert_post() post_author and return post_id are not working
- Different email notifications (about pending posts) to different users
- Multiple Checkbox
- installed WordPress but can’t upgrade or add plugins due to webdav https?
- Template redirect inside of plugin not redirecting
- Theme specific plugin, how?
- Plugin (smart archives reloaded) crashed site / no access on admin panel
- Can’t pull metadata for a term in my theme’s function.php
- Looking for a wordpress referral plugin that counts the referral after an action is performed [closed]
- How to call uninstall.php?
- Fatal error with jigoshop and woocommerce
- Plugins enqueuing jquery in head
- How do add_action and WP_Query
- How to make my plugin insert text into a custom div?
- Plug-in (Slickr Flickr) works on local machine, but not server
- List plugins used in a WP site – guest, not admin [duplicate]
- Submit posts in two different post types with the same form
- Static page with formatted post list
- Load css classes after using ajax calls
- Theme causing SSL break on chrome
- How to recognize which plugin generated this code?
- Website and admin page are not loading [closed]
- How can I manage the background image of a slider based on the featured image of a page?
- Preset categories in wordpress by GET-paremters [duplicate]
- Q&A lite plugin comments
- Integrating WordPress Content into a jQuery Slider
- Serious social interaction [closed]
- WordPress file manager plugin [closed]
- How to load plugin static data from cloudfront
- WP-DBManager Plugin Can’t Find Mysql Path
- Change social icon in twenty twenty three theme
- How to create a buddypress group automatically if a topic is created
- How to add portfolio category post count in main navigation menu?
- Looking for Features in WP Compatible Slider