Viewing 1 post (of 1 total)
  • Author
    Posts
  • #40059
    Profile photo of Pavel Egorov
    Pavel Egorov
    Participant

    Hi! I want to programmatically replace the license for the purpose of additional image processing while saving the order.
    I do through Hook:
    add_action(‘woocommerce_checkout_order_processed’, ‘epe_change_lic_for_wc_order’, 10, 1 );
    Actually, I am trying to change the license to the desired one –
    update_post_meta($p, ‘attribute_pa_license’, ‘smallimage’);
    After that I keep an order:
    $order->save_meta_data();
    $order->save();

    However, the license does not change.
    Tell me, please, how to properly replace the license programmatically?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.