• Hello,

    Could you please make “multiply_by” shortcode attribute global for all numeric result fields (like for [alg_product_weight] ) that would make this great plugin even a bit more fantastic.

    Thank you very much indeed.

    Best regards,
    Endre

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

    (@ucsendre)

    This solved the problem for me now:

    add_shortcode( 'alg_product_weight_in_gramms', 'alg_product_weight_in_gramms' );
    if ( ! function_exists( 'alg_product_weight_in_gramms' ) ) {
    function alg_product_weight_in_gramms( $atts, $content = '' ) { global $product;
    if ( $product ) { return ( $product->has_weight() ) ? floatval( $product->get_weight() ) * 1000 : ''; }
    return ''; } }

    I still believe “multiply_by” should be global.

    Best regards,
    Endre

Viewing 1 replies (of 1 total)
  • The topic ‘please make multiply_by a global attribute for numeric results’ is closed to new replies.