Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter volmohammed

    (@volmohammed)

    Thank you @tograczyk

    Thread Starter volmohammed

    (@volmohammed)

    public?function?create_shipping_for_order_and_cart($order,?$cart)

    ????{???

    ????????global?$fs_package_id;

    ????????//?Check?if?the?cart?is?null?and?log?an?error?if?it?is.

    ????????if?(is_null($cart))?{

    ????????????error_log('Cart?is?null.?Cannot?proceed?with?creating?shipping?for?order.');

    ????????????return;?//?Exit?the?function?if?the?cart?is?null

    ????????}

    ????????//?Get?shipping?methods?from?the?order

    ????????$order_shipping_methods?=?$order->get_shipping_methods();

    ????????//?Get?shipping?packages?from?the?cart

    ????????$packages?=?$cart->get_shipping_packages();

    ????????$current_package?=?-1;

    ????????foreach?($order_shipping_methods?as?$shipping_id?=>?$shipping_method)?{

    ????????????$current_package++;

    ????????????//?Get?the?package?ID?based?on?the?current?package?index

    ????????????$package_id?=?array_keys($packages)[$current_package];

    ????????????$fs_package_id?=?$package_id;

    ????????????//?Retrieve?the?shipping?method?details

    ????????????$fs_method?=?$this->get_fs_method_from_order_shipping_method($shipping_method);

    ????????????if?(!empty($fs_method['method_integration']))?{

    ????????????????$integration?=?$fs_method['method_integration'];

    ????????????????//?Check?if?the?shipment?integration?exists?and?is?supported?by?the?order?type

    ????????????????if?(fs_shipment_integration_exists($integration)?&&?$this->is_order_type_supported_by_integration($order->get_type(),?$integration))?{

    ????????????????????//?Create?a?shipment?for?the?order?and?the?shipping?method

    ????????????????????$shipment?=?$this->create_shipment_for_order_and_fs_shipping_method($order,?$fs_method,?$shipping_id,?$shipping_method,?$packages,?$package_id);

    ????????????????????/**

    ????????????????????*?Do?actions?when?shipment?is?created?via?checkout.

    ????????????????????*

    ????????????????????*?@param?\WPDesk_Flexible_Shipping_Shipment?$shipment?Created?shipment.

    ????????????????????*/

    ????????????????????do_action('flexible_shipping_checkout_shipment_created',?$shipment);

    ????????????????}

    ????????????}

    ????????}

    ????}

    i change this function and working successfully

    Thread Starter volmohammed

    (@volmohammed)

    i see custom validation but this working in inputs but i’m working in file upload please help to resolve this problem

    Thread Starter volmohammed

    (@volmohammed)

    i sent problem to wpml and support me to solve problem in analytics->Categories in side menu page but in Leaderboards widget?“Top categories – Items sold” not solved

    can you send me hook filter to change Number of rows in Leaderboards widget?“Top categories – Items sold” i found function get_categories_leaderboard but i can’t edit this orginal files in woo commerce

    I have same problem

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