• I use default Gutenberg filters for WooCommerce. Filtering by attribute. Most of them are numeric. How can I reorder them by name_num?

    In admin panel the order is correct, but widget ignores it. So 8 is lower then 12. The sorting is still alphabetic. I tried to add the order by jQuery – but some native script doesn’t allow me to change the order after loading, so ‘mousehover’ or ‘load’ don’t help.

    I tried to disable Gutenberg for widgets, the widgets that I added earlier still look like they looked, and in admin panel they became blocks

    <!-- wp:woocommerce/filter-wrapper {"filterType":"attribute-filter","heading":"Filter by attribute","className":""} -->
    <div class="wp-block-woocommerce-filter-wrapper"><!-- wp:heading {"level":3} -->
    <h3 class="wp-block-heading">Потужн?сть (кВт)</h3>
    <!-- /wp:heading -->
    
    <!-- wp:woocommerce/attribute-filter {"className":"inventor-filter","attributeId":13,"heading":"","lock":{"remove":true}} -->
    <div class="wp-block-woocommerce-attribute-filter is-loading inventor-filter" data-attribute-id="13" data-show-counts="true" data-query-type="or" data-heading="" data-heading-level="3"><span aria-hidden="true" class="wc-block-product-attribute-filter__placeholder"></span></div>
    <!-- /wp:woocommerce/attribute-filter --></div>
    <!-- /wp:woocommerce/filter-wrapper -->

    Maybe it’s possible to add {{sortby: name_num}} or something like it?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to reorder values in widget (Gutenberg,wc-block-components-checkbox)?’ is closed to new replies.