Product attributes to body class

/*Product attributes to body class*/ function add_product_attributes_to_body( $classes ) { if ( is_product() ) { $product = wc_get_product(); $attributes = $product->get_attributes(); foreach ( $attributes as $attribute ) { $attribute_name = $attribute->get_name();...

Product Delivery class on body class

/* Classe de livrasion as body class */ function add_delivery_class_to_body( $classes ) { if ( is_product() ) { $product = wc_get_product(); $shipp = $product->get_shipping_class(); $classes[] = $shipp; } return $classes; } add_filter( ‘body_class’,...

WOO France only

//——————-France payment only————————- add_filter( ‘woocommerce_available_payment_gateways’, ‘allow_france_only’ ); function allow_france_only(...