Removing an action from wp_footer called in a class that’s inside a bigger class

Because of the way the plugin is structured, the hooked function appears to be ultimately exist on the gallery property of the instance property of the DGWT_JG_Core class. When an instance of DGWT_JG_Core is created, a DGWT_JG_Gallery class is instantiated and added to the gallery property of the DGWT_JG_Core instance. So we need to remove … Read more

Adapt PHP form action for WordPress?

I think your action URL is wrong. Did you try with <?php echo plugins_url( ‘listrak-newsletter-api.php’, __FILE__ ); ?> like this way: echo ‘<form action=”‘ . plugins_url( ‘listrak-newsletter-api.php’, __FILE__ ) . ‘” method=”post”>’; in your code? Anyway I still recommend you to use WP AJAX to do this. Read here for more information.

How to remove plugin metaboxes from edit.php

You can use the do_meta_boxes hook to remove the metaboxes instead. Like below add_action( ‘do_meta_boxes’, ‘vpm_remove_meta_box’ ); function vpm_remove_meta_box() { remove_meta_box( ‘ortext-metabox’, ‘post’, ‘normal’ ); remove_meta_box( ‘ez-toc’, ‘post’, ‘normal’ ); } See this for more info https://developer.wordpress.org/reference/functions/remove_meta_box/

uninstall.php does not appear to trigger when uninstalling my plugin

I don’t see any issue with the uninstall besides the fact that echo a string(this interpreted us failed) and using hardcode prefix. Below code have been tested locally with the latest version of WordPress. // Access the database via SQL global $wpdb; $wpdb->query( “DELETE FROM {$wpdb->prefix}posts WHERE post_type=”acme_product”” ); $wpdb->query( “DELETE FROM {$wpdb->prefix}postmeta WHERE post_id … Read more

Rewrite rule not matching

I tested the suggestion from my comment and it worked. Remove the brackets from (myaccount) and change $matches[2] in the URL to myaccount: function wpse_287203_rewrite_rule() { add_rewrite_rule( ‘^user/(\d+)/myaccount/?’, ‘index.php?pagename=myaccount&user_id=$matches[1]’, ‘top’ ); } add_action( ‘init’, ‘wpse_287203_rewrite_rule’ ); (myaccount) will not match a whole world. That’s a little more involved. See this Stack Overflow answer for how … Read more