• Resolved 8bit7

    (@8bit7)


    in PHP in functions.php file, I’m trying to display/hide the price depending on if a radio button is set to yes/no in a product. How can I see what the radio button is set to?

    As like:

    if (the_field( 'radio_button' ) -> yes) {
    $price = true;
    } else {
    $price = false;
    }
    
    if ($price) {
    ...Display Price...
    } else {
    ...Don't Display Price...
    }

    Or just whatever, just a quick example to hopefully show what I mean.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author krazyplugins

    (@krazyplugins)

    @8bit7 Instead of the_field use get_field and you will get what you want.

    Thanks

    Hello Conditional logic does not work in Dokan products and only works in WooCommerce products. Is it possible that the conditional logic in the dokan products section works like woocommerce backend?
    I don’t want some fields to be displayed in some dokan products, but all fields are displayed in all products

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘What’s the logic of radio buttons?’ is closed to new replies.