This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('DOMContentLoaded', function () { | |
// Check if we're on a product category archive page | |
if (document.body.classList.contains('archive') && document.body.classList.contains('woocommerce')) { | |
// Get a reference to the select element | |
const sortingSelect = document.querySelector('.woocommerce-ordering select'); | |
// Hide the default select box | |
sortingSelect.style.display = 'none'; | |
// Create a new div for the sorting buttons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const defaultParams = { | |
title: '', | |
titleText: '', | |
text: '', | |
html: '', | |
footer: '', | |
icon: undefined, | |
iconColor: undefined, | |
iconHtml: undefined, | |
template: undefined, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'admin_notices', 'fix_wc_notice_472021' ); | |
/* | |
* Change notice 'name' as needed. | |
*/ | |
function fix_wc_notice_472021() { | |
global $wpdb; | |
$wpdb->update( $wpdb->prefix . 'wc_admin_notes', ['status'=>'actioned'], ['name'=>'woocommerce-core-paypal-march-2022-updated'] ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_single_product_carousel_options', 'filter_single_product_carousel_options' ); | |
function filter_single_product_carousel_options( $options ) { | |
$options['slideshow'] = true; | |
$options['animationLoop'] = true; | |
$options['slideshowSpeed'] = 3000; | |
return $options; | |
} |