Your string is not read as a callback. You should pass an array:
$pcpt = new Project_Custom_Post_Type;
register_activation_hook( __FILE__, array( $pcpt, 'activate' ) );
Note that init
happens before plugin activation, so not callbacks from your class will be executed.
Related Posts:
- Custom pages with plugin
- Add rewrite rule to permalink structure
- add_rewrite_rule, plugin activation and plugin deactivation
- Does flush_rewrite_rules() remove all rules added by other plugins as well as mine?
- Add_rewrite_rule doesn’t add custom url in plugin
- Do rewrites added with add_rewrite_rule() persist after plugin deletion?
- WordPress rewrite rule depend on meta values not ids
- Custom pages with plugin
- Apache rewrite rules and wordpress problem
- Add Rewrite Rule for custom page
- What is the best way to output plugin result in certain url
- flush_rewrite_rules not working on plugin deactivation, invalid URLs not showing 404
- Custom rewrite rule is not picked by WordPress
- How can I rewrite a plugin generated URL?
- WordPress custom URL Rewrites redirecting not masking
- Best way to hook a custom url?
- Remove rewrite rules generated by plugin during deactivation
- How does WP handle multiple matching rewrite rules?
- How to Create a Custom Plugin Permalink
- Custom rewrite rules not working with WPML
- How to Create a Custom Slug for Tags and Categories with a prefix or suffix?
- Redirect to another page using contact form 7? [closed]
- Remove .htaccess portion upon plugin deactivation?
- Custom url rewriting
- URL rewrite with external JSON query
- WordPress rewrite rules not working
- How to rewrite URL and get the values?
- How to embed a new string in url?
- i want to rewrite my custom plugin url
- add_rewrite_rule to load different page, without changing URL in browser
- Change custom rewrite rule when permalink is updated/changed
- Change default url to plugin custom post type
- WP Job Manger change jobs url (NOT slug)
- Loading external page template and enqueue script from plugin causes 403 forbidden error
- Where the Nickname is being used in WordPress
- How can I include a setting that has a variable number of values in a settings page using register_setting?
- Adding dynamic section to WordPress
- Custom data-id wp_enqueue_script
- Yoast SEO blocking/re-initialising longer running process
- Add Fields with Sub-Fields to WP Job Manager
- How to get the permalink of a page when loading my plugin
- Passing $this->get_field_name() to javascript
- add_action in functions.php, do_action in plugin?
- Ajax gives 400 error
- Read text defined under __()
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- Serialize data for wp options
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- React JSX in WordPress Plugin Development
- My plugin wants to update another plugin
- Plugin Options Not Saving to Database in WP 4.5
- Redirection of users away from wp-admin (but not administrators)
- Using SVN to upload plugin created with gutenberg blocks
- WordPress Plugin [closed]
- Certain functions are undefined when called form mu-plugins
- Why is the ‘Gutenberg’ Plugin generating an ‘Inconsistent File Permissions’ error when other Plugins, with the same permissions, do not?
- WordPress front end AJAX. Return 0 :?
- breadcrumb need to show all pages and subpages
- Widget’s container?
- Get Every Key & Value from Array then Display All in New Line
- WordPress 5.4 – How to prevent to enter only certain values in custom field
- DB Query not working in Plugin
- Make plugin php file called directly aware of WordPress?
- sending different email notification while registration based on user role
- WordPress Widget Not Saving Instance
- How to get a notification when the plugin is installed?
- Different registration form for different roles
- WordPress Post HTML after Posting
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- Settings options not showing up on Sub Menu page in WordPress plugin
- My plugin does not install correctly if a previous version is still installed
- unregister a sidebar widget
- Custom Meta box change size
- Could add_query_arg() redirect user to external site?
- How to solve conflict with scripts?
- wp_insert_post not inserting post from XML
- The Build menu theme is frozen with the wordpress theme
- Access “wp site health info” data from plugin
- How to prevent redoing get_posts queries and make results available to other scripts?
- Prefix WordPress Taxonomy Tags With Hashtag Symbol Like Twitter
- Change Woo Custom Endpoint Titles from a Plugin
- Get input form data posted by users
- WP internationalization not loaded
- Disable default posts (Posts,Pages,Comments and Media) in wp-admin
- Adding custom cron_schedule prior to wp_schedule_event
- Create plugin with form in post and submit it to specific form
- Storing values in Post Meta vs new tables
- Get page type to display content
- Widget redirecting to home page
- Capturing POST data
- map urls to plugins
- I am using multi image metabox plugin but I did get how to display the images in templete?
- How to open author url linked to a new tab in settings page in the WordPress plugin list
- How can I properly sanitize the update_option in WordPress?
- Why is my menu page not being displayed?
- How to make content as required in custom post type?
- How to create a “Most Popular” & “Latest” TAB in WordPress
- is_user_logged_in() undefined at shutdown in plugin context
- What are Seeds? [closed]
- Shortcode cannot parse attributes within double quotes. ” is becoming ” breaking my shortcode