Answering my own question just in case someone comes across it looking for an answer. Managed to figure it out!
We have to get the URL as follows, we can’t just reference it like we normally would on a server
plugins_url( 'products.csv', __FILE__ );
The above code returns the information we need, rather than just referencing products.csv
Related Posts:
- How to Add an Index to Plugin Database table
- Creating two database tables via plugin
- How does WordPress handle MySQL row lock errors?
- WordPress register_activation_hook table creation not working
- Default Plugin Settings Not Writing to Database
- Building an email signup form. Where should the information be saved in the DB?
- Plugin Options Not Saving to Database in WP 4.5
- How to create custom tables in WordPress using my own plugin?
- Is it possible to create Custom Post plug-in?
- Help With MySQL to WPDB Query Conversion
- Prevent duplicate records in plugin table
- WordPress Backend HA (Automatic failover)
- How can I change the meta_key for a particular piece of information?
- Can I create a table on my DB without creating a plugin?
- WordPress : Explain Plugins & Theme string value in database
- Is it necessary to auto delete my WP plugin database tables when users deactivate/delete my plugin?
- How to insert and call new data in wordpress website database through a plugin
- WPDB: Update table
- Issue running db create table query from static method
- Separate database for a wordpress plugin
- Best/Correct way to add an option to a category
- What is the WordPress approach to custom data?
- How to create plugin/ page that reads from database
- DB Query not working in Plugin
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- WordPress plugin: efficient way to store large data
- Integrating Custom Database with WordPress
- How to display results from a data table with an encrypted user id?
- How to make a Product page without ordering and database
- I want to schedule email (date, time is in database->table) wp_schedule_event() not working
- How to securely controlling data without keeping it in postmeta?
- $wpdb->insert not working inside save_post tag
- Where do the section input fields values are stored in database
- how can i get records from wp_postmeta table using particular meta_key in database?
- Create New Admin Menu Section – Like how custom post type works, in a way
- Creating fields in the database
- How to submit the custom form data in database in WordPress without plugin?
- get_option returning a different value from what’s saved
- How can I delete the options from DB when the plugin is deleted?
- register_activation_hook not working
- On the same site, how do I send data from a plugin file to a theme file?
- plugin doesn’t retrieve data from database
- Custom pages with plugin
- Update my custom WordPress Plugin through my own server [duplicate]
- Do plugin files have to follow a specific convention to be “picked up” by WordPress?
- WordPress Vote Plugin – Vote Once and Track User
- How to read configuration file in wordpress or PHP
- Echo simple string in Plugin
- Using the ‘draft_to_publish’ hook (post status transition)
- Can I explicitly specify ENGINE=InnoDB in WordPress?
- Setting up WordPress plugin’s page
- how does wp.media javascript library work?
- Can Not Redirect from Plugin-Registered Admin Page
- How to Reload the Dashboard After Clicking Update in Quick-Edit?
- Get the last post ID
- Loading class files via autoload method
- I would like to use create a function in my custom plugin to tell WP to use a different header
- Auto add content such as pages upon plugin activation?
- Escape when echoed
- How to remove the woocommerce_checkout_process action hook in woocommerce if particular project in cart [closed]
- Make id column as AUTO INCREMENT on plugin activation
- WP_Query ordering numbers as letters
- WordPress Automatic Plugin Update Renames Plugin Directory
- How to change commenter links to /user/user_id?
- Execute a plugin only on post pages
- Create dynamic page content from custom WordPress plugin page
- WordPress Gutenberg react make import of __experimentalUseInnerBlocksProps which is no more experimetal
- How to stop activating a plugin and show admin notice when dependent plugins minimum version is not met
- DROP TABLE with uninstall hook not working
- How can I make my metabox appear?
- Change plugin name on WordPress repo
- Admin AJAX doesn’t work in plugin admin page – Even though code is copied verbatim from WordPress Codex
- Are plugins instantiated on every request to WordPress?
- adding a button to the media uploader
- Add some fileds to the wp_posts table
- Always get creating a new table with foreign key
- How do I add $_SESSION[”] to my wordpress page?
- Plugin Activation Error – The plugin generated 22 characters of unexpected output during activation
- Search users with custom meta data
- Woocommerce plugin – How to create two versions of the same plugin with slightly different implementation for different users
- How to Join wp_posts & wp_postmeta table using custom query
- Use localized plugin name and description even when the plugin is disabled
- Cron: Update four post at Hour
- submit two file input fields in the same form
- Cron task gets removed from the schedule
- “Enable Media Replace” plugin does not update serialized object in WPMeta
- One time call to external API in widget
- echo plugin results on pages
- WordPress scheduled event not working
- plugin_dir_url(__FILE__) searches parent theme in ACF extension
- My ajax request don´t work and return 0
- Plugin to Delete All Posts Monthly
- mailjet plugin – extend functionnalities and reuse api
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- Allow users to enter and edit data in one-to-many configuration
- contact form 7 captcha support anyother captcha plugin? [closed]
- Display Any Field fromAdmin Panel in Frontend via Shortcode?
- Is Nonce Verification (CSRF) required for WordPress Custom Bulk User Actions?
- plugin development code standard not matching for SQL query
- Ajax response from Media Selection does not update ALL information more than once