movidita

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: License number #23624
    movidita
    Participant

    Hi, the problem was mine…

    I am sorry

    in reply to: get lafkaa-addons from code #23493
    movidita
    Participant

    Hi, I have it working.

    thankyou.

    in reply to: get lafkaa-addons from code #23294
    movidita
    Participant

    if I do: lafka_get_product_addons($item->get_product_id())

    I get all options of products but no what options a customer has choosen of the products in the order.

    Thank you.

    in reply to: get lafkaa-addons from code #23293
    movidita
    Participant

    $addons = [];
    foreach ( $the_order->get_items() as $item ) {

    $addons[] = $item->get_id();

    }

    foreach ( $addons as $add ) {
    var_dump($add);
    var_dump(lafka_get_product_addons($add));
    }

    int(227)
    Fatal error: Uncaught Error: Call to a member function get_id() on bool in /var/www/vhosts/pepeentucasa.es/httpdocs/wp-content/plugins/lafka-plugin/incl/addons/lafka-product-addons.php:97 Stack trace: #0 /var/www/vhosts/pepeentucasa.es/httpdocs/wp-content/themes/lafka-child/lafka-child/functions.php(173): lafka_get_product_addons(227) #1 /var/www/vhosts/pepeentucasa.es/httpdocs/wp-includes/class-wp-hook.php(287): custom_orders_list_column_content(‘my-column1’, 4965) #2 /var/www/vhosts/pepeentucasa.es/httpdocs/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #3 /var/www/vhosts/pepeentucasa.es/httpdocs/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #4 /var/www/vhosts/pepeentucasa.es/httpdocs/wp-admin/includes/class-wp-posts-list-table.php(1265): do_action(‘manage_shop_ord…’, ‘my-column1’, 4965) #5 /var/www/vhosts/pepeentucasa.es/httpdocs/wp-admin/includes/class-wp-list-table.php(1361): WP_Posts_List_Table->column_default(Object(WP_Post), ‘my-column1’) #6 /var/www/vhosts/pepeentucasa.es/httpd in /var/www/vhosts/pepeentucasa.es/httpdocs/wp-content/plugins/lafka-plugin/incl/addons/lafka-product-addons.php on line 97

    in reply to: get lafkaa-addons from code #23276
    movidita
    Participant

    Hi, I have this but no works:

    global $the_order, $post;

    $addons = [];

    // Loop through order items
    foreach ( $the_order->get_items() as $item ) {
    $addons[] = $item->get_id();
    }

    foreach ( $addons as $add ) {
    //var_dump($add);
    //var_dump(lafka_get_product_addons($add));
    }

    i get an error and wordpress chash.

    Could you help me?

    Thankyou.

Viewing 5 posts - 1 through 5 (of 5 total)