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
- Does the number of downloads displayed for a plug-in in the WordPress.org plug-in directory include automatic updates?
- Which method is best to enqueue scripts
- Function to activate WordPress theme inside a plugin
- What is the correct way to check if WP_Filesystem can write to a directory without aking for username / password?
- Is there a WordPress Plugin that allows voting “does this coupon work” on specific links like Retailmenot
- Pass A Value From Outside To A Plugin Variable
- shortcode doesn’t work
- Built in admin ajax hooks?
- Could someone please help me to add category id with in this query so this will return posts from a certain category?
- What are the benefit in adding hook in the init() hook?
- building plugin and it is displaying above plugins page
- Is the wordpress user-model changed in wpmu?
- Where to hook my plugin’s action
- load_theme_textdomain path
- Dynamic CSS Vs Inline Issues in Code any Way around in a WordPress Themes?
- plugin development: problem with functions
- Building plugin with changeable custom post type values…advice needed
- Conditional attributes and logic per product category
- Why Is This Code Causing The Admin Bar to Disappear?
- Displaying Custom Sidebar Without Modifying Theme’s Core File?
- plugin code is pulling information from database in one instance and not in other. What is wrong?
- Gathering and logging data from a plugin: how to do it without race conditions?
- How to pass the API key to the client from the database? [closed]
- Include a php file from another plugin
- How do I make a secure API call from a shortcode when a button is clicked?
- Hook into the rendering of a WordPress Template
- Can the uniqueness of the plugin file/plugin slug and version number be trusted?
- Plugin has added weird data in wp_options, set to autoload
- Save user total active time after login in wordpress [closed]
- Switch from wp-cron to a server cron job
- Calling a save function from a “submit” button
- The Events Calendar Plugin – List View Background Colour Issue [closed]
- Select Form Element Not Saving from Plugin Options
- How to automatically activate users after registration without activation email?
- Seperate plugin and theme files
- Pass PHP variable to javascript
- How to implement color picker from WordPress in my boilerplate plugin?
- custom post type plugin error [closed]
- create pages automatically and dynamically in wordPress
- Make downloadable ebook read online without download option
- WordPress rewrite rule depend on meta values not ids
- Problem with wordpress has_action() function
- Offering a freemium plugin (a free version + paid version)
- In woocommerce, is there any way to empty wordpress default mini cart when order placed?
- Remove special characters from filenames
- Making a Custom Post Type Plugin – keep getting the white screen of death
- Limit Google Ads to particular blog posts
- What’s the preferred method of writing AJAX-enabled plugins?
- Shortcode registered from a plugin not recognized
- How to change a specific page to custom page?
- wp_update_post call really slow when official Facebook plugin is installed
- How use Dynamic hyperlink on each wordpress post?
- _e in wordpress +
- WordPress Code Access to Restricted Content without Registration
- wp_handle_upload – specified file failed upload test
- how to make wordpress remember my choice
- Form with response button after on table after submission
- wordpress admin-ajax bad request 400