Hi @filipeos,
We’ve just released new plugin v1.3.4. There I’ve added new more sophisticated function for retrieving the MSRP from the product:
$msrp = alg_wc_msrp_get_product_msrp( $product_id );
$msrp_discount = alg_wc_msrp_get_product_msrp( $product_id, 'msrp_discount' );
$msrp_discount_percent = alg_wc_msrp_get_product_msrp( $product_id, 'msrp_discount_percent', 0 );
* You can also omit $product_id
– in this case the function will try to get current product’s ID.
* When retrieving $msrp_discount_percent
– third parameter (i.e. 0
) defines the number of decimals to which final result is rounded.
Please let me know if something is not working as expected. And if you like the plugin, please consider leaving us a rating.