Terjadi warning Critical Error di blog wordpress, pada saat saya coba menginstal Plugin Photo Reviews for WooCommerce
Fatal error: Uncaught Error: Call to undefined function is_ajax() xxxxxxxxx xxxxxxxxx xxxxxxxxx " /> There has been a critical error on your website. Learn more about debugging in WordPress.
kita bisa melihat kode tersebut di atas dengan cara Men-Debug terlebih dahulu wordpress kita melalui Cpanel. buka wp-config.php, dan masukan kode di bawah ini pada bagian bawah.
define('WP_DEBUG', true);
Ok, lanjut ke cara memperbaikinya. Silahkan buka plugins/woo-photo-reviews/includes/functions.php, kemudian masukan kode di bawah ini di akhir file tersebut
if ( ! function_exists( 'is_ajax' ) ) {
/**
* Is_ajax - Returns true when the page is loaded via ajax.
*
* @return bool
*/
function is_ajax() {
return function_exists( 'wp_doing_ajax' ) ? wp_doing_ajax() : defined( 'DOING_AJAX' );
}
}
Selamat mencoba.
Comments
Post a Comment