@daniel-mesteru and @63n (63N I’m sorry I never got back to you like I said I would. I definitely know first-hand about searching everywhere for solutions to tough problems, and how often another’s post saves me.)
So, I am looking at this project which I haven’t in a while, and it looks like I
in functions.php of my child theme (Avada in my case) I enqueued these jQuery UI files (downloaded from jQuery – just google jQuery UI) and a
// jQuery accordion - product single page
function product_accordion()
{
if ((is_product()) || (is_archive())){
wp_enqueue_style('jquery-ui', get_stylesheet_directory_uri() . '/css/jquery-ui.css', 10);
wp_register_script('jquery-core', get_stylesheet_directory_uri() . 'https://code.jquery.com/jquery-1.8.2.js', array('jquery'), '1.0', true);
wp_enqueue_script('jquery-core');
wp_register_script('jquery-ui', 'https://code.jquery.com/ui/1.9.0/jquery-ui.js', array('jquery'), '1.0', true);
wp_enqueue_script('jquery-ui');
/*
* @source https://jqueryui.com/accordion/#no-auto-height
*/
// alert("accordion-snippet.js start");
jQuery('#accordion').accordion({
collapsible:true,
active:false,
autoHeight: false,
disabled:true,
heightStyle: "content"
});
// alert("#accordion').accordion({...}); executed");
jQuery('#accordion h3.ui-accordion-header').click(function(){
jQuery(this).next().slideToggle();
});
jQuery('.accordion-expand-all').click(function(){
jQuery('#accordion h3.ui-accordion-header').next().slideDown();
});
// alert("accordion-snippet.js loaded");
wp_register_script(‘accordion-snippet’, get_stylesheet_directory_uri() . ‘/js/accordion-snippet.js’, array(‘jquery’), ‘1.0’, true);
wp_enqueue_script(‘accordion-snippet’);
}
}
add_action(‘wp_enqueue_scripts’, ‘product_accordion’);`
the accordion-snippet file has:
/*
* @source https://jqueryui.com/accordion/#no-auto-height
*/
// alert("accordion-snippet.js start");
jQuery('#accordion').accordion({
collapsible:true,
active:false,
autoHeight: false,
disabled:true,
heightStyle: "content"
});
// alert("#accordion').accordion({...}); executed");
jQuery('#accordion h3.ui-accordion-header').click(function(){
jQuery(this).next().slideToggle();
});
jQuery('.accordion-expand-all').click(function(){
jQuery('#accordion h3.ui-accordion-header').next().slideDown();
});
// alert("accordion-snippet.js loaded");
And this removes product tabs from original position and puts them next to product image:
/**
* @snippet Move product tabs beside the product image - WooCommerce
* @how-to Get CustomizeWoo.com FREE
* @sourcecode https://businessbloomer.com/?p=393
* @author Rodolfo Melogli
* @testedwith WooCommerce 3.5.2
* @donate $9 https://businessbloomer.com/bloomer-armada/
*/
remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10);
add_action('woocommerce_single_product_summary', 'woocommerce_output_product_data_tabs', 60);
I’m pretty sure that covers it, but I might have missed something. It ended up being somewhat complicated…but doable! There is a possibility i could have hidden any duplicate set of something via CSS, but hopefully I didn’t and got it done cleaner.
Let me know if either of you need more and I’ll take a closer look. Also if inspecting the page might help, you can see it here: https://levelupnowyou.com/product/womens-survivor-racerback-tank/
Thanks.