• Resolved frenchmaxime

    (@frenchmaxime)


    Hello, form7 is out of order on one of my sites. WordPress indicates: “An error of type E_ERROR was caused in line 38 of the file /home/maximumfpf/www/wp-content/themes/porto-child/functions.php. Error message: Uncaught Error: Call to undefined function wpcf7_do_enqueue_scripts() in /home/xxx/www/wp-content/themes/porto-child/functions.php:38 »
    Then, I disabled reCAPTCHA in contact options 7, but I still have all pages containing a form which are in debug.

    <?php

    add_action( ‘wp_enqueue_scripts’, ‘porto_child_css’, 1001 );

    // Load CSS
    function porto_child_css() {
    // porto child theme styles
    wp_deregister_style( ‘styles-child’ );
    wp_register_style( ‘styles-child’, esc_url( get_stylesheet_directory_uri() ) . ‘/style.css’ );
    wp_enqueue_style( ‘styles-child’ );

    if ( is_rtl() ) {
        wp_deregister_style( 'styles-child-rtl' );
        wp_register_style( 'styles-child-rtl', esc_url( get_stylesheet_directory_uri() ) . '/style_rtl.css' );
        wp_enqueue_style( 'styles-child-rtl' );
    }

    }

    add_filter( ‘woocommerce_order_button_text’, ‘misha_custom_button_text’ );

    function misha_custom_button_text( $button_text ) {
    return ‘Payer et valider ma commande’; // new text is here
    }

    // Disable contact-form-7 enqueue actions
    remove_action( ‘wp_enqueue_scripts’, ‘wpcf7_do_enqueue_scripts’, 10 );
    remove_action( ‘wp_enqueue_scripts’, ‘wpcf7_recaptcha_enqueue_scripts’, 10 );

    // Trigger contact-form-7 enqueue actions when form shortcode is executed
    function contact_form_7_enqueue_scripts($out){
    wpcf7_do_enqueue_scripts();
    wpcf7_recaptcha_enqueue_scripts();
    return $out;
    }
    add_filter( ‘shortcode_atts_wpcf7’, ‘contact_form_7_enqueue_scripts’ );

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the website in question?

    Thread Starter frenchmaxime

    (@frenchmaxime)

    Hi Takayuki, many thanks for the proposal of help. The website is [ link moved to link field and marked NSFW, next time use that field please ] (adult content). Thanks. Maxime.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    What other plugins and theme do you use on the site?

    Thread Starter frenchmaxime

    (@frenchmaxime)

    Hi Takayuki thanks for help , the Theme is Porto, with Elementor and :
    
    Age Verifier for WordPress
    Alpus Elementor FlexBox Addon
    Contact Form 7
    CookieYes | GDPR Cookie Consent
    Disable Comments
    Duplicate Page
    Dynamic Featured Image
    Elementor
    Email Template Customizer for WooCommerce
    Flamingo
    One Click Demo Import
    Porto Theme - Functionality
    Porto Theme - Visual Composer Addon
    Slider Revolution
    Visual Composer
    WooCommerce
    WooCommerce Admin
    WooCommerce.com Update Manager
    WooPayments
    WP Super Cache
    YITH WooCommerce Ajax Product Filter
    YITH WooCommerce Ajax Search
    YITH WooCommerce Badge Management
    YITH WooCommerce Wishlist
    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Try switching to the default theme, deactivating all plugins excluding Contact Form 7 and Flamingo, and clearing all cache data.

    Why you are advised to deactivate plugins and switch to the default theme.

    Thread Starter frenchmaxime

    (@frenchmaxime)

    Hello Takayuki, temporarily returning to the parent theme has indeed solved the problem (even without deactivating the other plugins), but I cannot definitively return to a parent theme, I am making too many changes, I need my child theme. An idea ? thank you very much for the help. Maxime.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘[NSFW] Debug Error in line 38 (recaptcha?)’ is closed to new replies.