• Resolved osamublack

    (@osamublack)


    Is there any method by which I can add a column to product table in wcfm or edit its existing values.
    Product Table
    I surfed the web and found the following filter, placed it in my plugin

        add_filter( 'wcfm_products_additonal_data_hidden', '__return_false' );
        apply_filters( 'wcfm_product_additonal_data', '-', $product_id );
    

    But its not working.

Viewing 1 replies (of 1 total)
  • Thread Starter osamublack

    (@osamublack)

    Hello Again,
    I worked a solution by using jQuery to add certain texts.

    
      jQuery(document).ready(function($){
        setTimeout(function() {
          var product_cells =  $('#wcfm-products').find('tr td');
          if (product_cells.length > 2) {
            // Getting certain cell of each row.
            for (var i = 10; i < product_cells.length; i = i + 13) {
              var cell = product_cells[i];
             //Calculations          
             //Any Sort of your calculations date difference in my case.
             //Replacing Html          
              cell.innerHTML = cell.innerHTML + 'More Data';
              $('wcfm_products_limit_label').html('Per Product Price: 300 PKR');
            }
          }
        }, 5000);
      });
    }
    

    If there is a better method or any code correction please notify me. Thank you.

    • This reply was modified 4 years, 5 months ago by osamublack.
Viewing 1 replies (of 1 total)
  • The topic ‘Edit Product Table’ is closed to new replies.