OK, so you’re trying to create your own class that is extending the class from plugin. The problem is that the plugin won’t use your class, so you’d have to modify the plugin.
On the other hand, if you take a closer look at that class:
public function display_meta_box($post)
{
$requirements = []; //Array I want to change with my own
$requirements = apply_filters('my_checklist_requirement_list', $requirements, $post) // . <--- Array I want to change with my own
}
you’ll see, that there is my_checklist_requirement_list
filter in there and you can use it.
So all you need to do is to put this in your functions.php:
add_filter( 'my_checklist_requirement_list', function( $requirements, $post ) {
$requirements = array( ... );
return $requirements;
}, 10, 2 );
Related Posts:
- Best collection of code for your 'functions.php' file [closed]
- Shared functionality in plugins and themes
- Remote upload file to server B
- WooCommerce create new product and add to cart on form submit
- Post source link plugin – small modification
- Modifying Footnote Plugin for Descriptive Title Attributes
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- Debugging Technique Question re: functions.php
- Override the filter from plugin in child theme
- Edit Yoast SEO breadcrumbs output [closed]
- Calling an attribute from a plugin shortcode
- Redirect to another page using contact form 7? [closed]
- Plugin Development – Functions or Hooks?
- Change Header (Logo) Based on Login
- how to change wp-admin url using function file
- same user role or copy the user role to be same as the other role
- Call javascript functions from each page
- How to keep plugin (media-sync) running even the tab is closed?
- implement custom roles in custom plugin
- Post source link plugin – small modification
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Adding discount functionality to the cart
- How to assign a specific service to a specific provider based on location
- Precheck fields when I add a new post
- working code, not working – Plugin Dev
- Place content inside the Post Loop
- Conditional required fields for WordPress Contact Form 7
- WordPress: code structure
- How to Add Extra Text In WordPress Title Before Post Publish
- How to disable plugin capability : “create new category”
- Product customizing quiz – quiz adding products to the cart
- add_query_arg not working
- My Category is too big on the Menu what can i do?
- how to load the language file in plugin?
- Plugin upgrade issue
- How to use get_theme_mod in gutenberg editor wordpress?
- Shortcode button dosent work for all posts. Work for first post only
- Get IDs of Images from Gallery Block in InnerBlocks of a Custom Gutenberg Block
- How to embed HTML code from WP Coder plugin (or other) into Main Index Template of the theme
- Is there a way I can find wordpress posts that don’t contain a word?
- WordPress plugin – Error “Plugin generate 2890 characters of unexpected output when activated”
- Prevent shortcode from being wrapped in tags
- AJAX button run function
- How can I capture Memberpress user info after signup [closed]
- My plugin wants to update another plugin
- Dropdown menu on custom page with product to choose number of products per page
- Change wordpress current_time function to different timezone
- Inserting HTML tag with ACF into shortcode
- I have no idea “How change font for elements in widget?”
- View Private Published Page with URL Code (no login required)
- Executing my function once on a specific time
- How to append to title via functions.php for auto-posting plugin [duplicate]
- How to stop or remove an action being called inside a function of an extended class
- Missing Argument
- JS Support Ticket – Auto create WP account
- load_plugin_textdomain error
- How to show Recent Page instead of Post?
- How to override a plugin function wrapped in a class?
- Bootstrap Drop Down menu is not working
- Remove Duplicator plugin from admin menu if not an administrator
- How to Display a Plugin function (content) on frontpage using index.php
- Input with spaces in Shortcode attributes overwritten by defaults
- Add a custom form on the post-new.php admin page
- wordpress plugin is not activating from widget
- Removing customise fields during plugin uninstallation
- Theme my Login plugin, how to update fields
- What’s the best way to implement AJAX in WordPress?
- How to Create a Custom Panel and Fields in Post Page [Plugin]
- Translating long texts with html formatting
- Adding Shortcode to Text Widget
- Date calculations from 2 custom fields
- Snippets: is it better to add them in functions.php or make site-specific plugins?
- How would I go about creating a user ranked post popularity page?
- Does WordPress validate inputs to all functions? (such as get_user_meta and insert_user_meta)
- Custom random quote widget breaks when used in multiple sidebars
- Anonymous Postings
- Using a function to change favorites listing
- Do widget options need to be escaped widget()?
- Is there any W3C compatible Share & Follow plugin?
- Does any one have Idea to get these functionalities with the plugin wp-multi-network
- Display post lists in 2nd paragraph
- How to debug error message: Cannot modify header information
- Using a post-signup hook to get user details
- How to enable specific plugin only based around shop manager role?
- How to change constants in WordPress wp-config.php programmatically?
- Restrict media upload size by format
- Disable woocommerce cookies and delete cart data automatically
- How to use a class from another plugin
- Override Plugin Script Fucnction in WordPress
- How to display custom sidebar in wordpress 5.5.2
- Calling plugin function inside custom plugin for onclick event
- className not populating in custom block
- Show function to super admin
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Run plugins only on certain pages
- creating html reusable blocks via shortcodes
- get current date + 90 days and checking every day
- Overide plugin files from child theme (/inc/ ) folder
- wp_generate_attachment_metadata is creating an empty array
- Adding a new field to the address field type in gravity forms