If the classes are not in the same file, you’ll need to require it into the child class ( myCustomClass ). Are you doing that?
Example :
//get the base class
if(!class_exists('MyParentClass')) {
require_once plugin_dir_path( __FILE__ ) . '/_inc/MyParentClass.php';
}
/**
* Class Definition
*/
class MyChildClass extends MyParentClass{
// class definition
}
Related Posts:
- Should all plugins be encapsulated in a Class?
- Consuming an external API in WordPress?
- How can I import a class privately into a plugin?
- Generate custom output for page/URL in a plugin
- Post source link plugin – small modification
- Add CSS animation as Preloader to WordPress
- How to list the Hooks and order of execution in current loading page? [duplicate]
- Check if a class exists within a method
- Setting up widgets in wordpress with a unique ID for the after_title argument
- Modifying Footnote Plugin for Descriptive Title Attributes
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- force customers to add only single item to card per purchase EDD [closed]
- Auto delete WordPress users according to time
- Edit Yoast SEO breadcrumbs output [closed]
- How would I go about creating a user ranked post popularity page?
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Most efficient way to use classes to create admin pages using Settings API
- Basic Object Oriented plugin question
- Using plugin functions/methods within templates
- Redirect to another page using contact form 7? [closed]
- Inserting custom PHP script on homepage
- Why is my custom post type not being activated on plug-in activation?
- Loop in elementor custom widget not working
- I am trying to make a field show and save from quickedit screen
- Built a second plugin but it overwrote the first one
- .php file for woocommerce edit category? [closed]
- Customize Menu | Styling LESS/SCSS code formats
- Why is it important to check for isset and is_array before checking in_array in this example?
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- Calling a save function from a “submit” button
- same user role or copy the user role to be same as the other role
- How to fix these PHP Warnings with the “Feed JSON” plug-in?
- woocommerce remove coupon link does not work
- implement custom roles in custom plugin
- WordPress Custom Hook with Class method
- 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
- Rename a folder via HTML POST request
- Move plugin pages from dashboard to front-end
- working code, not working – Plugin Dev
- WordPress plugin blog creation
- Cron job shedules replace?
- Custom shortcode being shown in WPBakery backend rather than the block
- Move plugin upload folder from mywebsite.com/wp-content/uploads/pdfuploads to mywebsite.com/pdfs?
- Get post content inside plugin class method
- Woocommerce list variations that are added already to cart in Single Product
- Flexslider empty slide
- Custom SportsPress list
- Autoloading a PHP class – working outside, but not inside WordPress plugin
- private functions in plugins
- How to fix vanilla comments extra iframe space
- I want to remove the register/login WordPress top bar from my website
- How to delete remain data in WP database after deleting custom post via admin interface
- Strict Standards: Non-static method in sidebar generator
- What can I do to customize a widget provided with this plugin? from where have I to start?
- WordPress: code structure
- Function not being called on form submit, only blank admin-post.php page
- How to make a Template page to show the information of different things Shop and Product page?
- Plugin or mod for wordpress to make content publication SUPER easy
- Delete Post With No Traffic?
- Automatically Creating Posts for Popular Forum Topics or Products [closed]
- What’s the recommended process for organising collaborative posting?
- Multi step form, custom plugin
- Can I check plugins and themes for PHP 5.6 ahead of global PHP server Update
- How can I get WordPress to save comments in markdown format?
- Plugin upgrade issue
- How to prevent plugins from loading jQuery
- Using TinyMCE in plugin?
- Translation plugin to translate another plugins
- How to Loop Through all Posts and Count Attachments using Get Media Attachments
- Contact Form 7 – Form name blank [closed]
- How to redirect to same page after form submission
- How to add a new column with text fields to WooCommerce Cart List?
- Creating a functionality plugin to edit seriously simple podcasting
- Creating an admin meta box to save post as pending
- Custom meta box with jQuery.sortable custom post type list
- Passing value as hidden parameter to next page
- Apply html elements in php statement
- add_rewrite_rule to load different page, without changing URL in browser
- Plugin or ways to limit number of users logging in the website,
- Replace old theme that understand old css (vcex_icon_box css_animation)
- WP Ajax DB issues
- ACF checkbox return format based on page
- How to translate wordpress blog to other languages?
- Multiple image selection custom widget
- Paid Membership Pro displaying a user name in PHP
- Creating Nested custom fields
- Plugin does not create a custom table upon activation
- Hyperlink to execute PHP
- How to get site homepage from plugin?
- admin panel save option with ajax
- update_post_meta not working
- Pulling Advanced Custom Fields from other pages
- Vote It Up Plugin – Add ascending numbers to MostVotedAllTime Chart Function
- I want create woocommerec match products columns
- WordPress Custom Page Blog Template Pagination Problem (Pagination Not Displaying)
- How to override plugin function in code snippets WordPress