Skip to content

Instantly share code, notes, and snippets.

View janvier005's full-sized avatar
🏠
Working from home

janvier005 janvier005

🏠
Working from home
View GitHub Profile
@janvier005
janvier005 / custom.js
Created April 8, 2022 02:27
Destroys jquery-anyview run animations
function remove_animate(selector_id){ // selector_id is a css selector tag, id or class
(function ($) {
$(selector_id+' .animate__animated').each(function(){
$(this).removeClass('animate__animated');
})
}(jQuery));
}
@janvier005
janvier005 / functions.php
Created December 22, 2021 22:03
Add shop_manager role to access Atum Stock Manager into Wordpress / Woocommerce
function shop_manager_stock_capabilities() {
$capabilities = array(
// Purchase price caps.
'edit_purchase_price',
'view_purchase_price',
// Purchase Orders caps.
'edit_purchase_order',
'read_purchase_order',