Add this in function file for hide add to cart button
function wpa_109409_is_purchasable( $purchasable, $product ){
if( $product->get_price() == 0 )
$purchasable = false;
return $purchasable;
}
add_filter('woocommerce_is_purchasable','wpa_109409_is_purchasable', 10, 2);
Visit this link for more detail Woocommerce – Hide “add to cart” on free products
Related Posts:
- How to detect WP plugins used on a site
- Using WordPress as a CMS: Developer preferences for custom vs existing plugins
- Login with OpenID, similar to Stack Exchange sites?
- Does WordPress contain “default” anti-SQL injection code that responds with a 404 error?
- WordPress Capabilities: edit_user vs edit_users
- Passing .pem and .key files in cURL doesn’t work in WordPress
- Is there a limit on the size of a WP page?
- How to restrict Front-End Editor on a page?
- Is there a WordPress Plugin that allows voting “does this coupon work” on specific links like Retailmenot
- Advanced custom field plugin not showing in admin sidebar
- How to remove action from plugin?
- Sidebar Generator issue [closed]
- Force plugin to fail activation
- Is there a plugin to help with translation of other plugins? [closed]
- How to load default scripts included with WordPress correctly?
- Skip file when plugin updated
- Are contributed plugin translations automatically installed in WordPress?
- Why would WP-CLI and WP Admin show different list of plugins with updates?
- Can I use a Shortcode output as an HTML attribute value?
- Use WordPress with a custom OAuth2 provider
- Is license need for free wordpress plugin
- How to send little data between admin pages of my plugin?
- How to activate plugins for my WordPress sites from a remote server
- Register script in one plugin, and enqueue it in another
- how to load the language file in plugin?
- Getting a List of Categories for Use in a Plugin?
- Add a captcha form to the woocommerce register form
- WordPress multiple pages on one page via button switching
- How to get all of the activate_plugin action parameters?
- Redirect already logged in users away from a page to a specific page base on user role
- What can be reason for no plugin-strings available under stable section on translate.wordpress.org?
- WP_Terms_List_Table Quick Edit not working
- External Script Using WP – Hooks / Actions Not Working?
- How to add FB like + share AND also other Social Buttons on ALL pages and posts?
- file-gallery plugin line 1573 broken in 4.2 upgrade [closed]
- How do I use wp_editor() in widget form?
- the_tags : can we insert a class
- PHP Error When a plugin is active
- Errors when trying to use a plugin to write to the database
- Completely disabling password reset/recovery
- How to load different homepage on Mobile.?
- WordPress REST API Plugin Development – Add Custom Endpoint
- how to prevent all css and javascripts files from loading
- Hook into the rendering of a WordPress Template
- Best way to count visitors?
- WPTouch – how to remove shortcodes or make shortcodes function
- Adding class to last list item? Not WP generated
- I changed .live() to .on() but change is not reflected on the server
- Trying to add a page template for my custom post type from a plugin, but it will not display in the template dropdown unless file is in theme
- How do I set up XAMPP to allow me to download plugins and themes?
- How do I add an options page at the bottom of the list?
- Hardcoded paths in my plugin
- How to save plugin custom settings page fields
- wp_insert_term() doesnt insert a term
- Dequeue, Unregister, Remove Action – Not Working on Plugin
- HTTP requests start hanging after I try activating all plugins, and only stop when I manually disable the plugins via DB
- Memory Management when developing plug-ins
- How can recognize post’s category?
- Developing plugin, where to place action hooks etc?
- Widget content turns up before title
- Load script only in the admin page
- Using AJAX to run SQL statement and populate dropdown
- How do I fill the Home Description?
- Disable “auto embed” feature when pasting text and links
- How to prevent users to view server files using WP File Manager plugin?
- Alternative Hook to the_content for Changing Background Color
- How to use WordPress header function and footer function and not load word press database
- SASS not showing in customized preloader plugin
- Lock content in WordPress website
- I want to display “how many times this tag used in WordPress?”
- After updating theme & plugin I am getting an error message
- Get Current Post ID in WP Loop For GiveWP
- Suspect incomplete .pot file – what to do?
- Password Protect wp-content?
- Unable to activate themes on localhost
- How to make cover image in post block expand to entire screen?
- Can you develop themes and plugins while using the hosting services BlueHost? [closed]
- Conditional Fields depending on checkboxes
- Identify if the_post hook is being called from the admin post list
- Translation plugin with default language?
- wordpress ajax pagination object value does not change
- Reorganization of namespaces
- Google analytic issue in wordpress
- Passing a parameter to filter and action functions
- image upload error wordpress
- Holding 2 wp_user in the same action (to update billing_email when user_email is updated)
- Simply Exclude – Category feed exclusion is excluding from category feed instead of just the main feed
- OOP Plugin: Where should I place the action hooks in the class?
- How to get the real address from a url (permalink)
- 404 Page when emptying spam or deleting a plugin
- File permissions for wp-minify plugin
- How to make temporary expiring link for a downloadable file
- Add country flags
- How to declare this function correctly?
- Content expands beyond its column container [closed]
- Plugin version number after code rewrite [closed]
- wp_handle_upload – specified file failed upload test
- Resources for building a custom event page template
- Split Million WordPress Post’s Into Multiple Database Server
- Set the title of a custom post automatically by using info from custom fields?