0

There are two conflicting plugins on my site:

  1. Payment Forms for Paystack
  2. Formidable Forms

Is there a way to disable Payment Forms for Paystack WP plugin only on the entry pages for my formidable form: site.com/wp-admin/admin.php?page=formidable-entries&frm_action=edit&id=x where x= any positive number from 1 to infinity ?

When I disable the Paystack plugin, I can view the form entries of Formidable. But when enabled, it causes an error that scrambles all the fields.

I tried the solution of a similar question to no avail: Disable plugin on Specific Page of Admin

I'm new to coding. Perhaps I'm not substituting the variables well.

Thanks in advance.

EDIT:

This was the code I used following the answer given in the link above:

<?php
add_filter( 'option_active_plugins', 'wpse264498_deactivate_ps' );

function wpse264498_deactivate_ps($plugins){

    // check if you are on the certain page
    global $pagenow;
    if( $pagenow == 'admin.php' ) {

        // check if it's right CPT
        if( isset($_GET['page']) && $_GET['page'] == 'formidable-entries') {

            // search the plugin to disable among active plugins
            // Warning! Check the plugin directory and name
            $key = array_search( 'payment-forms-for-paystack/paystack-forms.php' , $plugins );

            // if found, unset it from the active plugins array
            if ( false !== $key ) {
                unset( $plugins[$key] );
            }
        }
    }

    return $plugins;
}
  • Can you edit the question to show what code you used that did not work? – kero Nov 7 at 13:23
  • Of course, I just did that but I don't know why some of the codes are breaking off from the code tags. – walswals Nov 7 at 13:35
  • You need to use triple backticks for code blocks, single backticks only work for short code snippets that show inline – Tom J Nowell Nov 7 at 13:36
  • Oh ok, thanks for the edit @TomJNowell – walswals Nov 7 at 13:37
0

I found a way to resolve it:

  1. I installed and activated Plugin Organizer WP Plugin
  2. Used Settings:
    • Fuzzy URL matching = ON
    • Ignore URL Protocol = ON
    • Ignore URL argument = ON
    • Auto trailing slash = ON
    • Selective Plugin Loading = ON (very important)
    • Selective Admin Plugin Loading = ON (very important)
  3. Created a new plugin filter with the permalink http://example.org/wp-admin/admin.php?page=formidable-entries
  4. Checked "Also Affect Children" in the plugin filter page
  5. Disabled Payment Forms for Paystack in the list of plugins in the filter page
  6. Saved and that solved it for me

This took me weeks of almost losing my mind!!! Hopefully the above helps others

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.