Installing the NoFraud device JavaScript on your WooCommerce pages is a simple process that can be done in a few steps. The NoFraud device JavaScript is used to help our system provide the best decisions possible when it comes to fraud detection and prevention.
Method 1: Using the Theme Editor
- First, make sure that you have the latest version of WordPress and WooCommerce installed on your website.
- Go to the Appearance > Editor section of your WordPress dashboard. This will bring you to the theme editor, where you can access the files for your website's theme.
- Locate the functions.php file in the theme editor. This file is responsible for controlling the functions of your theme, including the ability to add JavaScript.
- Add the following code to the functions.php file:
Make sure to replace '<INSERT USER ID>' with your specific user ID provided by NoFraud.function custom_scripts() { wp_enqueue_script( 'nofraud-script', 'https://services.nofraud.com/js/<INSERT USER ID>/customer_code.js', array(), '1.0.0', true ); } add_action( 'wp_enqueue_scripts', 'custom_scripts' );
- Save the changes you've made to the functions.php file.
- Refresh your website, and the NoFraud device JavaScript file should now be loaded on your WooCommerce pages.
Method 2: Using a Plugin (If functions.php is not available in Method 1)
- Go to the Plugins section of your WordPress dashboard and click on "Add New".
- Search for a plugin such as "Header and Footer Scripts", "Custom JavaScript" or "Simple Custom CSS and JS" and install the one you prefer.
- Once the plugin is installed and activated, you will find a new option in the settings menu of your WordPress dashboard.
- Go to the plugin settings, you will find a place to add your javascript code. Add the following code
<script src="https://services.nofraud.com/js/<INSERT USER ID>/customer_code.js"></script>
Make sure to replace '<INSERT USER ID>' with your specific user ID provided by NoFraud.