Try something like this:
if ( !function_exists('get_field') && $_REQUEST['action'] != 'activate' )
This will prevent your function being defined for the run where a plugin is actually being activated.
Related Posts:
- Best collection of code for your 'functions.php' file [closed]
- Disable plugin / plugin action via theme
- How do I call wp_get_current_user() in a plugin when plugins are loaded before pluggable.php?
- Shared functionality in plugins and themes
- Need to create a Theme demo site that features multiple themes
- Declare a function before plugin does on the theme functions.php file
- Editor access to plugin settings
- Override the core function locate_template
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- Fatal error: Call to undefined function cmsms_theme_page_layout_scheme()
- All sites themes functions.php have been changed
- Overwrite category head title
- Proper way to use plugin functions in functions.php
- Need to replace Currency Shortforms
- How to make a dynamic css class whose name changes every visit to confuse scraper
- Set up functions to be overridden without using function_exists() by short-circuiting them?
- How to add custom function to pluggable.php
- Removing the custom_image_header from wp_head
- What is the most efficient way of adding additional functionaliy for admin only
- RSS feeds for specific topics
- Hide Plugin Custom Post Type Menu Link
- Securing langugae folder
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- Shows warning when enable “wp_gallery_custom_links” plugin with Themify Builder
- How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?
- How to Call Function From Separate WordPress Install on Same Server?
- Can’t get custom user meta to show in header
- overwrite a plugin function in functions.php
- What Are Security Best Practices for WordPress Plugins and Themes? [closed]
- How to include a plugin’s php file to another plugin functions file [duplicate]
- Disable author pages for specific users
- Set active theme via URL
- How to assign user a role if none is present when logging in
- Migrating a File from Plugin to Theme and changing its path → instead create a REST endpoint
- How to find out what blocks are added by a plugin
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- Current user in plugin returns NULL
- Unable to install theme recommended plugins on Multisite
- More than one text-domain is being used because of the included templates for plugins
- How to prevent users to download videos from lms website?
- Dropdown menu on custom page with product to choose number of products per page
- How to append to title via functions.php for auto-posting plugin [duplicate]
- Bootstrap Drop Down menu is not working
- How to change constants in WordPress wp-config.php programmatically?
- Override Plugin Script Fucnction in WordPress
- Conditional attributes and logic per product category
- What is @Action in WordPress?
- using do_shortcode
- WordPress checkbox and Illegal string offset
- How to get menu location in wp_update_nav_menu hook
- Undefined index: action plugin problem
- PHP script from functions php is loaded via admin-ajax to div…and the result is 0, not the desired content
- How to Include File from Plugins into Template?
- How can I fetch data from another website to my wordpress website with mysql database
- How to translate WP Blog (search, category etc.)?
- Licensing options for WordPress Plugins
- how to change wp-admin url using function file
- Extending a theme: build new features as plugin or core modules?
- Expected ‘add_filter’ (T_STRING)
- Could not add ‘LoginLogout’ link using BAW login logout plugin
- Adding a pagenavi to function for displaying bookmarks
- How do I work with the SlideDeck plug-in?
- “User need to be logged in in order to make a booking” issue
- Custom Plugin scripts from admin working in frontend
- Error Metabox Warning: call_user_func() expects parameter 1 to be a valid callback
- Disable WordPress Theme Browser and Plugin Browser
- Sold out Label for variable products which are partially sold out
- Create automatic latest version link
- How to Access a file that is inside a plugin’s dir from the theme’s `functions.php` file
- dokan edit functionality
- how to split and upload a theme on wordpress?
- Cannot pass value variable to WP AJAX functions
- Sharing varible between two add_actions
- Easiest way to load/fire a handful of functions, IF checkbox is checked?
- Removing Plugin Action via Theme for Non-admins
- post id or permalink auto-incrementing number and reset everyday
- Override filter variable not working
- how to add navigation icons in specific template?
- Get a Taxonomy values in an array
- How to make a website with two types of logins , Sellers and buyers?
- WordPress environment not loading properly
- Why all my wordpress sites keeps telling me that everything is up to date at /wp-admin/update-core.php?
- How can I save cookies to members
- Place content inside the Post Loop
- Speed issues because of CSS & JavaScript
- Follow author on muti-user WordPress site
- Is there any wordpress function to update a random post every 10 minutes?
- jquery-issue: cannot load the basic jquery
- functions.php conditional output for a single plugin
- Single dash converted to double dash
- How use Dynamic hyperlink on each wordpress post?
- Why do I get this “peer’s certificate issuer not recognised” error when trying to install a theme?
- How to execute init or woocommerce_init only for checkout page
- Javascript as Jquery Function Call?
- Can’t modify plugin function
- Any plugin/theme available which suits my requirement? [closed]
- Two sites one PC
- PHP if url extension action=discussion condition use [closed]
- How to Add Extra Text In WordPress Title Before Post Publish
- WordPress Convert queries to slashes using function.php