Home Forums Plugins CURCY – WooCommerce Multi Currency Filter for currency plugin

Filter for currency plugin

  • Author
    Posts
  • #70030

    Savanna Goodness
    Participant

    Hi

    I am using a Cost Of Goods plugin and the developer discovered that there is not filter for him to hook. Would you provide this for the next update?

    This is what was requested :
    “Ok, I think I fixed it. Please check if it’s ok now? However, there is one issue – to fix that, I had to make changes in the “WooCommerce Multi Currency Premium” plugin. Unfortunately, they didn’t add any filter so I could hook in. So when you will update their plugin, all my changes will be gone. We should ask them to make these changes permanent.

    What I did was changed two lines in their woocommerce-multi-currencywoocommerce-multi-currencyadminreports.php:

    on lines 72 and 196, I changed from:
    if ( ! $report || $report === ‘sales_by_date’ ) {

    to:
    if ( ! $report || $report === ‘sales_by_date’ || $report === ‘alg_cost_of_goods’ ) {

    If they wouldn’t like to add “alg_cost_of_goods” directly, they could do a more general approach, something like:

    if ( ! $report || $report === ‘sales_by_date’ || apply_filters( ‘wmc_admin_reports’, false, $report ) ) {

    Would you provide as the above?

You must be logged in to see replies to this topic. Click here to login or register