skip to Main Content

Trigger a javascript function when a WooCommerce order comes in processing status

I am having trouble calling a js function after I process a Woocommerce order. I have the following code in my functions.php: add_action( 'wp_enqueue_scripts', 'enqueue_so_18552010' ); add_action( 'woocommerce_order_status_processing', 'purchaseCompleted' ); function enqueue_so_18552010() { wp_enqueue_script( 'my-java', // Handle get_stylesheet_directory_uri() . '/js/custom.js?V=2020.08.01v12',…

VIEW QUESTION

Simple HTML and JS login page not working, unable to fetch email and password fields on button click-Twitter bootstrap

<!doctype html> </html> <head> <title> </title> <link href="../assets/css/bootstrap.css" rel="stylesheet"> <link href="sigin-style.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> </head> <body> <div class="container-fluid px-1 px-md-5 px-lg-1 px-xl-5 py-5 mx-auto"> <div class="card card0 border-0"> <div class="row d-flex"> <div class="col-lg-6"> <div class="card1 pb-5"> <div class="row"> </div>…

VIEW QUESTION

Wait until async finish, then save the data in variables – Woocommerce

I'm totally newbie in JavaScript ... I have this code: const MMKV = new MMKVStorage.Loader().initialize(); async function getData() { let role = await MMKV.getStringAsync("role"); if (role === "distribuidor") { consumerKey = Constants.Keys.distributorConsumerKey; consumerSecret = Constants.Keys.distributorConsumerSecret; return [consumerKey, consumerSecret]; } };…

VIEW QUESTION
Back To Top
Search