The best way to include an external library is to put it in your plugins folder. Then just use require_once()
wherever you need it. Depending on the size of the plugin and your type of programing this might be in the main plugin file or wherever you need that functionality.
Related Posts:
- Where to put third party PHP library?
- How can a plugin create a page/form in the front end?
- Looking for WordPress System Diagrams
- How to add Request header in WordPress remote api calls
- Init action hook running late after PayPal’s return url?
- Get specific color from admin color scheme
- wp_remote_get doesn’t work with secure connections https?
- How do you create a custom edit.php / edit pages page
- Edit the output of wp_widget_rss_output()
- Why are two functions over-riding each other?
- How to Parse an Array of Elements in Gutenberg Block
- how to set context in WordPress for unit testing
- Custom rewrite rule serves content, but returns 404 error code
- Cannot modify header information – headers already sent by pluggable.php
- htmlentities and editing text
- Gutenberg registerFormatType with Multiple Classes
- Translate strings not recognised in plugin
- Best way to notify WordPress plugin users of new release candidates for beta testing?
- How to update total price of completed order in woocommerce? [closed]
- How do I add a custom sublevel menu specified in one directory to a custom top level menu specified in another directory?
- wp_localize_script and host/browser cache
- How to run a external JavaScript file on wp-admin if admin, and other if normal user?
- Get a custom table to an array
- How to use WP_Term with (menu) argument in the wp_nav_menu?
- Turn off Admin Bar (Toolbar) in backend – no easy way
- Error : “Cannot use object of type WP_Post as array in”
- Replacing Scripts in Admin Load_Scripts
- How to filter content on Save/Publish to add rel=”nofollow” to all external links?
- When to use add_settings_section vs just register_setting?
- How to show active version on wordpress.org of a published plugin?
- How to customize login process
- How should I store a log for my plugin
- Adding more text to a post, after it was published
- How to modify the comments to be displayed in a post?
- Find out Requires WP tag for a plugin when submitting it
- what is the difference between these phares?
- WP_Query filters
- Plugin Architecture Question: How to avoid using transients
- SSL certificate verify failed
- How to load library scripts in admin from plugins in noConflict wrapper?
- Insert/Update values to a table after blogname option etc. is updated
- wordpress how to query wp_options table
- How to add a widget to the post editing view?
- rest_no_route on custom API endpoint wordpress
- How to query custom db table?
- How to only load css for used blocks on frontend
- adding wp-cli commands to plugin: how to document to users?
- Additional classes `undefined` after saving post in Gutenberg
- How do you submit a Gutenberg plugin?
- Remove all removed pages from wordpress
- Creating an empty page programatically
- Multiple API Endpoints (wp_remote_get)
- plugin_dir_url & plugin_basename not working when plugin dir is outside wordpress dir
- How to replace default comments with custom HTML?
- Invalid hook call on save, not edit when using swiper slider
- Call to undefined function is_home() or any conditional tags
- WP nonce field checkbox prints checked=’checked’ outside input field
- Change/Set Page Title and Meta Tags from Page Called within a Plugin
- WooCommerce Endpoints content
- Make dynamic string translatable
- Creating two tables in database on activation hook
- wp_schedule_event is registered but function isn’t running
- Simple plugin don’t display content
- How to display TinyMCE HTML view?
- Cannot output plugin twice with shortcode
- How to make an admin plugin menu page go full screen?
- It is possible to pass $args that sent by add_settings_field() inside another function?
- Change reminder email date to 14 days before
- Gutenberg – Call google map render function in save after DOM has been rendered
- Woocommerce get_term_by() in transition_post_status hook doesn’t works
- Does $this context change in an AJAX callback?
- Home page is not loading, where in other pages are displaying on the site
- Custom table / Alternative to WP_List_Table
- Why is that only the first row getting inserted into Mysql table when i import csv file on backend custom plugin?
- Adding Amchart Interface to WordPress API
- WordPress Own Rewrite Rules
- WordPress with React: Saving and Using Data Collected with fetch
- Don’t print customizer styles when no setting has been used
- bindParam? WordPress 4.9.5 SQL LIKE statement %s and %LIKE%
- tweaking the
- Plugin with functions inside a class & how to trigger WP CRON
- User Registration Moderate
- external Integration with wordpress timeout error
- add_settings_error on validating plugin options API
- Implementing Select2 plugin into WordPress
- Problem to return more than single line captions
- Unable to show a message after plugin activation
- Why user is added back in database after deletion?
- Use plupload to upload images and save them to custom folder and database table
- How to add conent (text) to Add New pages form of admin in WordPress
- Can I access WordPress API’s from within plugin scripts?
- Is there a way to make is_search() always return false
- Ajax url value to pass ‘variable’ to use in query
- Apply Filters Causing a 500 Internal Server Error
- How to do searching based on keywords added in page
- Open media box library from link
- How to only Load scripts on variable products page
- Using tag or inline style attribute?
- remove () from category number [closed]
- Programmatically creating posts based on external JSON feed (asynchronously)