• Resolved pascalransch

    (@pascalransch)


    Hi,

    I’ve updated my plugin (was 4.X) and moved to latest 5.x version.
    I need to get the label name of the shipping class.
    In the 4.x version I’ve used the following function :

    $profileManager = \WBS_Profile_Manager::instance();
    $profile = $profileManager->profile()->name;

    Those files are no more existing.

    I’m only able to get the shipping class title in 5.x with:
    $method->get_label();

    Any clue?

    Thanks,
    Pascal

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Dan

    (@dangoodman)

    Hi Pascal,

    I believe you can use WooCommerce functions to get a title of the selected shipping option. Something like WC()->session->get('chosen_shipping_methods') or get_shipping_methods().

    • This reply was modified 5 years, 4 months ago by Dan.
    Thread Starter pascalransch

    (@pascalransch)

    Hi,
    Thanks for your reply. I know this function but this object gives me only the rule title, I need to get the Rule Label.
    Thanks,
    Pascal

    Plugin Author Dan

    (@dangoodman)

    Hi Pascal,

    I doubt it can be done with the 5.x version due to its internal organization.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Get Shipping class Label’ is closed to new replies.