Not sure if this helps but try doing this in the main plugin file:
require plugin_dir_path(__FILE__).'inc/plugin-setting.php';
require plugin_dir_path(__FILE__).'inc/db.php';
// Register activation hook in the main plugin file
register_activation_hook(__FILE__, 'wp_comment_reactions');
Move your function wp_comment_reactions to the db.php file and call it from the main plugin file.
Related Posts:
- WordPress Scheduled Event Request Blocking
- Accessing the database from a plugin outside of action hooks
- Update results, Before deleting the related category [closed]
- Store a default value for a transient on plugin activation
- Execute long and heavy processes
- wpdb prepare insert table doesn’t work
- Building a REST API for your web app exposes primary keys of DB records?
- Set default Database Storage Engine when creating tables with plugins?
- How do I make this Metabox show current DB value?
- select a single val though a table in wordpress
- wp_update_post gives 500 internal error
- code that I can run, or a plug in to show what sql tables something pulls information from
- How to edit the default database of WordPress [closed]
- Create custom table for wordpress custom registration flow
- Creating a table via dbDelta
- I can’t fetch query parameters ($_GET parameters) with get_query_var
- How To Make Connection To WordPress Data Base In A Plugin?
- Second select list values are not saved after clicking update
- Use wc_enqueue_js only on specific pages – nested add_action
- How to use a frontend URL with a Plugin
- How to track a users progress through pages by inserting data into WordPress Database?
- WordPress template_include filter not working properly
- “The plugin generated 2694 characters of unexpected output…” on Plugin activation, CREATE TABLE sql command not working
- How to display a value from a radio button in the options menu in wordpress
- How to migrate the posts from an old custom legacy blog to a new WordPress website?
- Why WordPress architecture is not pure object oriented and it don’t use MVC pattern? [closed]
- #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- How can i display post loop in table format?
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- How to call function at the bottom of post using plugin?
- Prevent Data Resubmission On Page refresh
- SQL QUERY – Select a value directly from the database
- WP add_action factory
- Any possible way to make $wpdb->get_results() return anything else than array?
- Swapping wp_dropdown_categories function with wp_category_checklist
- How to show phpinfo() only in a new tab?
- Getting id of poll from WP database
- How can I remove a function that has been added to wordpress with add_filter?
- How does WordPress know wich language is chosen when there is a database connection error
- How do I programmatically set a user as spam in BuddyPress? [closed]
- How can I save unique user data on my site? [closed]
- How to use $_GET function WordPress backend
- Dynamic content in template
- Extend PHP regex to cover “srcset” and “style” attributes
- Using custom tables for old posts
- How can I hide that I Use WordPress (with W3 Total Cache)
- Saving plugin settings – ERROR: options page not found
- class_exists returns different values [closed]
- dbDelta not installing database
- Custom array from a query only write the last row of the query
- How can I import an excel column into wordpress database?
- WordPress Block developer from exporting Database via PHP
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- How do I display offsite database info on my wordpress site?
- WordPress and MySQL: trying to print data using PHP from user_meta custom field data
- How to remove the message ‘We could not find any results for your search’ without changing template files and without adding posts/pages?
- Custom meta box values are not getting saved for my custom post type
- Can’t upload CSV file to plugin directory using custom upload form in admin panel
- Validate and Sanitize WP REST API Request using WP JSON Schema?
- Can I remove or edit an include() from a function with a filter?
- Call to undefined function error in plugin
- Why when I create a new post I found 2 record related to this post into the posts database table?
- Get category id when SEO URL is turned on
- SQL error with custom query
- What’s wrong in my PHP code? I’m using WordPress Astra Theme and I can’t insert data into my SQL
- Using ACF Relationship field to set post type to draft or published status
- How to extend SelectControl with data from my theme
- $_POST returning empty values
- How to send custom form submissions to WordPress Database?
- Custom plugin: how do I call a PHP file if settings option is set to true?
- How can i avoid duplicate same post in wp?
- How do I disable cache for a certain page?
- How to check if plugin update process completed in wordpress?
- using filter and hook inside class
- Priority call methods – PHPMailer->addAddress(NULL)
- custom search query database in child theme
- How to properly escape in ternary operators – Wp Coding Standards?
- Add Admin Option w/ Anonymous Function
- add menu page in loop menu order
- How to query a staging database?
- Get meta_query value by user meta array
- How to send logs to plugin owner for a plugin?
- Force CSV download with template_redirect
- How to use foreach and if statement within array of arrays?
- Can form entries from a WordPress form go to a database
- AJAX Not Working With WordPress Database properly
- Weird Behaviour: Not all WordPress Posts appearing
- Can not manually create a database ( db, user, pass ) for a plugin
- Insert double entry in DB
- Cookie not created in AJAX request
- How to automatically convert images to WebP on WordPress?
- notify users when changed database
- Check user last login date
- Transate plugin with js & wp_localize_script
- WP Custom tables query
- Displaying custom meta box value in a custom post page
- Redirect posts to post editor page based on query string
- how to check elementor is widget is active or loaded
- Create a custom plugin with dynamic child pages listing database records
- Bulk data save in custom table