Getting Scrape nonce check failed. Please try again when editing child theme

This topic has 2 replies, 2 voices, and was last updated 3 years ago ago by Olga Barlow

  • Avatar: aurangzebaa
    aurangzebaa
    Participant
    November 30, 2021 at 15:25

    why im getting this error “Scrape nonce check failed. Please try again” when editing theme function PHP file.

    please add this code if u can and check if product images are showed in checkout page

    /**
    * @snippet WooCommerce Show Product Image @ Checkout Page
    */

    add_filter( ‘woocommerce_cart_item_name’, ‘ts_product_image_on_checkout’, 10, 3 );

    function ts_product_image_on_checkout( $name, $cart_item, $cart_item_key ) {

    /* Return if not checkout page */
    if ( ! is_checkout() ) {
    return $name;
    }

    /* Get product object */
    $_product = apply_filters( ‘woocommerce_cart_item_product’, $cart_item[‘data’], $cart_item, $cart_item_key );

    /* Get product thumbnail */
    $thumbnail = $_product->get_image();

    /* Add wrapper to image and add some css */
    $image = ‘


    . $thumbnail .

    ‘;

    /* Prepend image to name and return it */
    return $image . $name;

    }

    1 Answer
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    December 1, 2021 at 13:19

    Hello,

    We are not responsible for the third-party code, sorry, https://themeforest.net/page/item_support_policy
    Are you trying to edit PHP files via WP Dashboard? Use FTP for these purposes because in case you make any error you’ll be locked out and won’t be able to change anything back without FTP. So, it would be better to use FTP from start.
    Besides, I hope that you make all the changes in the child theme files. Don’t edit any parent theme files because you will lose our changes after the theme update.

    Regards

  • Viewing 2 results - 1 through 2 (of 2 total)

The issue related to '‘getting Scrape nonce check failed. Please try again when editing child theme’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.