• Resolved Harpreet Singh

    (@soapify)


    Clicking on add to cart after selecting dates on product page gives error message Please select valid date. Deactivating Ultimate member Plugin solves the issue. I think calendar module of both plugins are clashing. Can you help me with this as both plugins are important for me. I have given product link.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ashanna

    (@morki)

    Hello,

    Yes, both plugins use the same pickadate.js library and conflict with each other.

    Please add this code to your (child) theme functions.php in order to fix the issue:

    add_action( 'admin_enqueue_scripts', 'remove_duplicate_pickadate_script', 999 );
    add_action( 'wp_enqueue_scripts', 'remove_duplicate_pickadate_script', 999 );
    
    function remove_duplicate_pickadate_script() {
        if ( wp_script_is( 'pickadate', 'enqueued' ) ) {
            wp_dequeue_script( 'um_datetime' );
            wp_dequeue_script( 'um_datetime_date' );
            wp_dequeue_script( 'um_datetime_legacy' );
            wp_deregister_script( 'um_datetime' );
            wp_deregister_script( 'um_datetime_date' );
            wp_deregister_script( 'um_datetime_legacy' );
        }
    
        if ( wp_style_is( 'picker', 'enqueued' ) ) {
            wp_dequeue_style( 'um_datetime' );
            wp_dequeue_style( 'um_datetime_date' );
        }
    }

    Regards,
    Natasha

    • This reply was modified 4 years ago by Ashanna.
    Thread Starter Harpreet Singh

    (@soapify)

    It worked! Thank you so much for the quick response. The Plugin is really cool. Keep up the good work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Compatibity Issue with Ultimate Member Plugin’ is closed to new replies.