Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action('wp_head', function(){
- ?>
- <script>
- jQuery(document).ready(function($) {
- const categories = ['accessories','decor'];
- const limit = 10;
- $.each( categories, function( index, cat ) {
- if( $('body').hasClass( 'product_cat-' + cat.toLowerCase() ) ){
- $( '.wc-drag-n-drop-file').attr('data-max', limit );
- }
- });
- });
- </script>
- <?php
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement