The first error message means that there is restrictions in place on where you can include files from, set by the server. You could try with
require_once ABSPATH . '/wp-content/plugins/pluginname/pluginfunctions.php';
but I’m not sure if it would work.
With the second include you’re trying to include an URL which is disabled by the server for security reasons.
However, why do you need to include the function of plugin B? If plugin B is present that means it’s probably activated, which in turn means you can use the function directly from plugin A without needing to include the file specifically.
Related Posts:
- How do I replace a function, declared inside a plugin’s class, in functions.php?
- Why does including a file in theme’s functions.php not work?
- FPDF for creating pdf diplomas
- Including a PHP file via a function that is part of a plugin?
- Shared functionality in plugins and themes
- Prevent publishing the post before setting a featured image?
- How to Loop Plugin Option Field Set?
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- Include files for a plugin not including
- How to load plugin before the wordpress jquery?
- Adding rich text editor to my plugin
- Disabling post images for not logged in users
- WordPress ajax call for not logged in users, doesn’t work
- Extend Elementor Archive Posts widget with a custom skin in order to show multiple badges
- HELP: Integrating WP with raw PHP code once published button is hit
- How to redirect Old Post URL to new Post and keep Old post Comments?
- Modifying Footnote Plugin for Descriptive Title Attributes
- I would like to use create a function in my custom plugin to tell WP to use a different header
- bulk change of image setting “link to” to “link to: image url “
- Limit the number of plugins that can be installed in a WordPress installation
- Add get_option to jquery
- How to get variables from fucntion.php to my plugin files
- Avoiding Duplicate function names in Post Loop (WP_Footer script)
- How to stop or remove an action being called inside a function of an extended class
- Date calculations from 2 custom fields
- Does WordPress validate inputs to all functions? (such as get_user_meta and insert_user_meta)
- Using a function to change favorites listing
- How to debug error message: Cannot modify header information
- How to enable specific plugin only based around shop manager role?
- Adding a new field to the address field type in gravity forms
- Nested shortcode functions accessing variable
- Calling an attribute from a plugin shortcode
- Include comments form in plugin page
- Difference and examples of esc_attr__() and esc_attr_e()
- Redirect to another page using contact form 7? [closed]
- Display Custom Field Value on Admin Page Column
- List the authors that have written posts in a category
- How to get plugin name from plugin file location
- How to prevent additional code in functions.php to be removed once there is an update?
- Checking the count within a foreach loop
- Create a post builder skin in a plugin
- Use $variable from file1.php in file2.php (different file paths)
- Need to replace Currency Shortforms
- add_query_arg not work in admin
- Woocommerce singe product custom gallery output works just on the first slide
- How do I create a custom permalink structure for a page template
- How to remove a class function from a plugin by using remove_action()?
- Api external with wordpress
- strange shortcode error: does shortcodes requires any dependency?
- All custom widgets are not showing in widget area at the same time
- Hook for altering the content of all wp mails
- How to get rid of Ellipsis on Woocommerce [Essential] Theme [closed]
- Sharing functions between plugins
- Trying to include files in plugin isn’t working
- Removing the custom_image_header from wp_head
- Displaying page content from plugin, inside exising empty WP page
- Checkbox show / hide output result
- implement custom roles in custom plugin
- How to get current cart values using WC_Shortcodes?
- How to copy the all WordPress media items to another custom plugin folder?
- Creating an array from form inputs before it is posted to the options database
- WordPress default post categories meta box widget
- Fatal error “Call to undefined function is_plugin_active” each time the plugin is activated
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- How to assign a specific service to a specific provider based on location
- Conditional Homepage for logged in user
- Make modification of add_to_cart button specific to single page
- front end editor creation for Restropress plug in – displaying information from a WP admin area, on a different URL
- how can export data in excel file custom plugin
- WP_CRON issue with UTC and local time
- How to wrap image tag into div for post only?
- Update User Meta Via Ajax
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- Nested DIV’s across functions in PHP, do not seem to work
- Unexpected plugin_dir_path Output
- How to write wordpress plugins faster to load?
- how to repeat taxonomy in different places on wordpress
- how to create table during plugin installation in side a class
- AJAX login without a plugin does not work. when add a action to function.php
- Posting code inside the post instead of in the template file using shortcode
- Metabox Data not saving
- How to add a handler for a button in plugin?
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- Can’t get custom user meta to show in header
- Building custom pages with a video player
- overwrite a plugin function in functions.php
- Pass strings to plugin function [closed]
- How to tweak a plugin without preventing it from updating
- WP Members additional fields on user profile [closed]
- Integrate Razorpay quick payments plugin with contact form7 plugin
- Woocommerce – Product Description heading [closed]
- Woocommerce disable checkout on specific day
- Display Video as Post Thumbnail
- Notifications Bar on home page only
- How to Add Extra Text In WordPress Title Before Post Publish
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Gravity Forms and Gravity View Permissions
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- WordPress Convert queries to slashes using function.php
- Run a function only once when logging into dashboard