• Resolved zebeber

    (@zebeber)


    Hi,

    I use your plugin, and it’s suits my needs.
    But I also use the Woocommerce Role Based price plugin, and when I’m logged with a custom “pro customer” role on the site, it’s doesn’t display the unit measure.
    If I disconnect and visit the site like a classic unlogged customer, it displays well the unit.

    Do you have a solution for that?

    Kind regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    Same here but I’m using Woo Discount Rules Pro for discounts and promotions and Unit of Measure suffix was not showing on discounted products.

    If it can help, in my case, I managed to get it to work by adjusting the add_filter priority from 10 to 999.

    In the file : woocommerce-unit-of-measure/public/class-wc-uom-public.php, I changed :

    public function wc_uom_public_activate() {
    		add_filter( 'woocommerce_get_price_html', array( $this, 'wc_uom_render_output' ), 10, 2 );
    	}

    to :

    public function wc_uom_public_activate() {
    		add_filter( 'woocommerce_get_price_html', array( $this, 'wc_uom_render_output' ), 999, 2 );
    	}

    And now the Unit of Measure text is showing on my discounted products.

    Not an expert programmer here so I’m not sure if this is completely legit but it works for me.

    Hope this can help!

    • This reply was modified 2 years, 11 months ago by SweetManiac. Reason: adding some info
    • This reply was modified 2 years, 11 months ago by SweetManiac. Reason: adding some more info
    Plugin Author Brad Davis

    (@brad-davis)

    Hi @zebeber, thank you for calling out the clash with another plugin. The suggested change from @sweetmaniac is a change ill release in the next version of the plugin in the next few days.

    Plugin Author Brad Davis

    (@brad-davis)

    Hey @sweetmaniac that is a totally legit way to handle it with the priority. I’ll add it to the next version within the next few days.

    Cheers
    Bradley

    Plugin Author Brad Davis

    (@brad-davis)

    This update has been released in version 3.0.3

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘No display with unit with Woocommerce Role based price’ is closed to new replies.