Generate JS variable array through data-set from woocommerce HTML variation

后端 未结 1 401
慢半拍i
慢半拍i 2021-01-25 18:34

This is the part of a vanilla JS code =

var prices = [100, 536, 2368];

But the above is hardcoded. I want them through an HTML select drop down

1条回答
  •  余生分开走
    2021-01-25 19:05

        add_action( 'wp_footer', 'webtoffee_product_attr_filter' );
    
        function webtoffee_product_attr_filter() {
           if ( !is_product() ) {
              return;
           }
           ?>
              add_action('wp_footer', 'webtoffee_checkout_shipping_filter_it_states');
    
        function webtoffee_checkout_shipping_filter_it_states() {
            if (!is_product()) {
                return;
            }
            ?>
    
           
    
        

    Try this

    0 讨论(0)
提交回复
热议问题