If your intent is to remove that function/action only on the front page (not clear from your question), then this code
if (is_front_page) {
remove_action( 'woocommerce_single_product_summary',
'woocommerce_template_single_price');
}
This code needs to be outside of the ‘admin’ code area of the plugin. See this link for documentation on is_front_page()
https://codex.wordpress.org/Function_Reference/is_front_page
If that is not your question, then please edit your question to provide more detail.
Related Posts:
- What is the wordpress wp-includes folder for?
- WordPress Update Plugin Hook/Action? Since 3.9
- How come `wp_options` table does not have an index on `autoload`?
- Best way to abort plugin in case of insufficient PHP version?
- What do you think about custom designed plugin/theme options UIs?
- What is the correct way to build a widget using OOP
- Optimize shortcode callbacks
- Custom action button in Gutenberg editor (post_submitbox_misc_actions – equivalent)
- Modifying the way WP sets cookies
- add_action with a class method is causing fatal errors
- Include third party Javascript library which is not included in WordPress
- Update a Plugin while maintaining back compatibility: general
- How to get vim to autocomplete WordPress API functions?
- Not sure the best way to save custom plugin data
- How do I make specific plugin functionality apply to different sites in a network?
- Plugin development with unit tests
- What is a settings group actually for?
- The changes I make to an external JS file of my WP plugin are only applied after I clear my browser’s cache
- How does gettext works for translating readme file of plugin?
- How to debug WordPress correctly?
- How to add multiple copies of a widget from “available widgets”
- How do I approach removing menu items on the fly based on settings in my plugin?
- Can I use core’s “or Link to Existing Content” feature in my plugin?
- Plugin with specific admin menu icon
- Translate strings not recognised in plugin
- Print WordPress username id inside JavaScript
- How to Download and install plugin database remotely
- Should I always prefer esc_attr_e & esc_html_e instead of _e?
- WordPress add_admin_page not working even parameters are correct?
- How to use WP_Term with (menu) argument in the wp_nav_menu?
- using new WP_Query in save_post function alters $post
- Preview Changes button missing on custom post type page since updating to 3.4
- Any problem in using native jquery ajax style instead of using admin-ajax.php?
- Communicate between plugins
- WP_Editor – Saving Value into Plugin Option – Stripping HTML
- How To Consistently Enforce Rewrite Rule in Plugin Development
- Warning: Cannot modify header information – How to resolve this issue? [closed]
- $paged always 0 on plugin’s custom page
- Is there a way in which I can compare product id with the order id to display content on front end before placing the order? [closed]
- Video Security just like facebook [closed]
- Email verification for new users
- Link Pop-up in custom plugin
- Insert/Update values to a table after blogname option etc. is updated
- How to handle shortcodes through plugin
- Does admin_print_scripts-$hook_suffix work for nested paths to individual files?
- How to add a widget to the post editing view?
- WordPress debug messages not displaying
- Show message from backend
- Cannot change caption for a plugin
- Remove all removed pages from wordpress
- PHP File_exist() not working – Checking if File Exist in WordPress Theme Directory
- Woocommerce inventory [closed]
- Invalid hook call on save, not edit when using swiper slider
- Add a check box in Menu Settings
- how to load the comment template from a plugin
- Change/Set Page Title and Meta Tags from Page Called within a Plugin
- Is there any way to fire heartbeat API from for website visitors?
- Look for a file in a theme before loading from plugin
- Include HTML (Bootstrap Modal Box) with a plugin into my header
- when i activate my plugin i want to auto create pages with shortcodes
- Using init hook for register_taxonomy is causing invalid_taxonomy in wp_insert_term()
- How can I prevent ‘500 internal server error’ because of a long install process?
- How to display TinyMCE HTML view?
- Displaying custom content from a plugin within the active theme
- Downloading File via headers doesnt work
- get the permalink error
- Custom plugin & calling REST api of wordpress instance the plugins is running on
- Add variables from rewrite rules to query var
- “add to cart” links css class “ajax_add_to_cart” doesn’t show in woocommerce in widget sidebar
- Does $this context change in an AJAX callback?
- How do I specify where to save the debug.log?
- WordPress custom url without using any of the custom tags given
- How to call a plugin function from a page
- Code for cron to delete posts that contain specific expression (e.g. “unable to fetch” every 30 minutes
- If user is logged-in display/hide widgets ( siteorigine) [closed]
- Javascript not being loaded only in custom taxonomy template
- User Registration Moderate
- Making adding info to an overlay bio easy for average user?
- Moving the “share” button
- Confusing $tag specification for apply_filters call, in core options.php code
- Delete Query executing regardless of WHERE Clause condition
- How to change the wording of front-end `next article` for custom type registered in a plug-in?
- Get (eventual) permalink from post within Edit Post in Admin panel
- Ajax not working to insert, query and result data
- wordpress plugin require_once file – can’t user wordpress functions
- Change Page title when Pagingation the posts
- Custom MySQL query to pull out Advanced Custom Fields?
- WordPress User Management Departmental Managers
- Link to a admin submenu item using a custom link
- loop and in admin header problem
- Remove image in post when it’s removed in media library
- Get next page in get_posts
- Facebook share button help
- How to Implement SAM Broadcaster with WordPress? [closed]
- how do I find out if a placed order was deleted or trashed? [closed]
- How can I interact with a third party service that sends POST requests to me in response to the order information that I send them?
- Fatal Error triggers Before WP_Error handler
- How to create wordpress plugin support page? [closed]
- ACF – programmatically install and activate in pipeline to automate testing for custom plugin development?
- How can I include React useState in a custom gutenberg block plugin?