• hi!
    I’m trying to add prices to more than 500 products for 60 countries, manually (not by exchange rate). And i want this procces to be automatic. I parce prices from file to variables. So in line 51 (which is: $_price_method = get_post_meta( get_the_ID(), $_id_prefix . ‘_price_method’ , true ); ) i need to change to something like this: $_price_method = $MyVariable and in lines 85 and 90 i need to change values in
    ” …value=”<?php echo wc_format_localized_price( $_regular_price ); ?> ” and
    ” …value=”<?php echo wc_format_localized_price( $_sale_price ); ?> ” to my variables $myregularprice and $mysaleprice. Or mabe some call some custom methods or functions instead of these variables. How can i make this?

    • This topic was modified 6 years, 10 months ago by rafaelrafael.
Viewing 1 replies (of 1 total)
  • Thread Starter rafaelrafael

    (@rafaelrafael)

    or better:
    woocommerce_wp_radio(
    array(
    ‘id’ => $_id_prefix . ‘_price_method’,
    ‘value’ => $_price_method, //here instaed of $_price_method i need ‘manual’
    ‘class’ => ‘wcpbc_price_method’,
    ‘label’ => __( ‘Price for’, ‘wc-price-based-country’ ) . ‘ ‘ . $value[‘name’]. ‘ (‘ . get_woocommerce_currency_symbol( $value[‘currency’] ) . ‘)’,
    ‘options’ => array(
    ‘exchange_rate’ => __(‘Calculate prices by exchange rate’, ‘wc-price-based-country’),
    ‘manual’ => __(‘Set prices manually’, ‘wc-price-based-country’)
    )
    )
    );

    and in input fields i need $_regular_price and $_sale_price change to $myregularprice and $mysaleprice

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with coding’ is closed to new replies.