Populate Product Regular Price with a calculated ACF Field Value

Based on a reference, I was able to populate the field of the regular price based on ACF field alue using the following Code : add_action( ‘woocommerce_process_product_meta’,update_product_price_from_acf’, 100, 1 ); function update_product_price_from_acf( $product_id ) { if( $price_acf = get_field( ‘netsalesprice’, $product_id ) ) update_post_meta( $product_id, ‘_regular_price’, $price_acf ); } This, however, needs me to go … Read more

jQuery is not defined – some theme features do not work!

I had a similar problem after updating WordPress, try adding this in functions.php : function load_jquery() { wp_register_script(‘mainJquery’, get_template_directory_uri() . ‘/assets/js/jQuery.js’, array(‘jquery’), 1, true); wp_enqueue_script(‘mainJquery’); } add_action(‘wp_enqueue_scripts’, ‘load_jquery’); I was only missing array(‘jquery’), maybe it’s the same for you…