• gulinma

    (@gulinma)


    I’ve a custom plugin that adds an extra field to the course price settings page in Learnpress (I’m using the Eduma theme) and it was working fine but after upgrade Learnpress from version 3.2.8 to 4.2.5.5 the callback associated with the filter hook is not running anymore.

    The hook code is:

    add_filter(‘learn_press_course_payment_meta_box_args’, ‘my_callback_function’, 10, 1);

    Any help would be appreciated, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support brianvu-tp

    (@briantp)

    Hi,

    Because you use our premium Eduma theme, please create a ticket on our forum, and our developer will check for you. This forum only supports for LearnPress plugin, not for the premium theme.

    Thanks

    Thread Starter gulinma

    (@gulinma)

    Thank you Brian! But I think my problem is not related to the theme but to Learnpress itself.

    According to Thimpress developer guide (https://docs.thimpress.com/learnpress/developer-guide/) the hook ‘learn_press_course_payment_meta_box_args’ available in LP3 in inc/custom-post-types/course.php is in a folder that have skipped when upgraded to LP4.

    What I’m trying to do is to add a checkbox to the course price (edit) page, so the question is which is the right hook to use en LP4? This code was working fine in LP3:

    add_filter('learn_press_course_payment_meta_box_args', 'show_dollar_price_checkbox', 10, 1);
    
    function show_dollar_price_checkbox($meta_box) {
      $meta_box['fields'][] = array(
        'name' => 'Show in dollars',
        'type' => 'yes_no',
        'desc' => 'Show price in dollars'),
        'std' => 'no',
      );
      return $meta_box;
    }

    Thank you again!

    • This reply was modified 12 months ago by gulinma.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hook issue after upgrade from v3.2.8 to v4.2.5.5’ is closed to new replies.