• Resolved mmarshall1993

    (@mmarshall1993)


    Hi there again,

    Following on from my other post. I have a few feature requests.

    1) I have created a couple of my own custom status via functions.php. Is there a hook I can use, so I can have your action button Mark order ready for pickup showing? At the moment it doesn’t show for those status.

    2) The ability to add one-off days to the Business Hours section of the Pickup Instructions table, for example, Valentine’s Day Sunday 14th February 11:00 AM – 2:00 PM?

    3) Under the Pickup Locations tab, I have the business hours set to 12 hour. It is current shown as Wednesday: 11:00am – 2:00pm, is it possible to add different formatting options, like to display it as Wednesday: 11:00 AM – 2:00 PM and maybe change the “-” to the word “to”.

    4) How can I change the name displayed of your custom status so that it also changes the text shown for bulk actions drop down, actions button hover text and status in the admin order screen.
    For example:
    Ready for pickup > Ready for Collection
    Picked up > Collected

    Many thanks.

    Kind Regards,
    Mark

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Zorem

    (@zorem)

    Hi
    1. To add the “mark as ready to pickup” action for custom statuses, you can add it to the code snippet you created or use a custom order numbers plugin, then you can control which action buttons will be available for every status. We offer Custom Order Statuses plugin that will allow you to import the one you created (and then you can remove the custom code) and to manage/customize all your statuses and to send emails.
    2, 3 and 4 – you can ask for this features on the ALP features board
    Thanks ??

    Thread Starter mmarshall1993

    (@mmarshall1993)

    Hi,

    Thanks for the reply.

    For no 1. I wasn’t sure how to do it, so I googled it and found a woocommerce_admin_order_actions. I searched through your plugin php code and found the code you used and copied it and adapted to my needs. Below is what I have done, it seems to work. I just wanted to check to make sure this won’t interfere with your code?

    add_filter( ‘woocommerce_admin_order_actions’, ‘add_custom_order_status_actions_button’, 100, 2 );

    function add_custom_order_status_actions_button($actions, $order){

    // Iterating through order shipping items
    foreach( $order->get_items( ‘shipping’ ) as $item_id => $shipping_item_obj ){
    $shipping_method = $shipping_item_obj->get_method_id();
    }

    //IF dshipping method is not local pickup then @return;
    if( !isset($shipping_method ) ) return $actions;
    if( isset($shipping_method ) && $shipping_method != ‘local_pickup’ ) return $actions;

    ?>
    <style>
    <?php
    $ready_for_pickup = get_option( “wclp_status_ready_pickup”, 0);
    if($ready_for_pickup == true){ ?>
    .widefat .column-wc_actions a.ready_for_pickup_icon.button::after{
    content: “”;
    width: 20px;
    height: 20px;
    background: url(“<?php echo wc_local_pickup()->plugin_dir_url()?>assets/images/rady_for_pickup_icon.png”) no-repeat;
    background-size: contain;
    top: 3px;
    left: 2px;
    }
    <?php } ?>
    </style>
    <?php
    $ready_for_pickup = get_option( “wclp_status_ready_pickup”, 0);
    if($ready_for_pickup == true){
    if ( $order->has_status( array( ‘picked’,’picked-balloon’ ) ) ) {
    // Get Order ID (compatibility all WC versions)
    $order_id = method_exists( $order, ‘get_id’ ) ? $order->get_id() : $order->id;
    // Set the action button
    $actions[‘ready_for_pickup’] = array(
    ‘url’ => wp_nonce_url( admin_url( ‘admin-ajax.php?action=woocommerce_mark_order_status&status=ready-pickup&order_id=’ . $order_id ), ‘woocommerce-mark-order-status’ ),
    ‘name’ => __( ‘Mark order as ready for pickup’, ‘advanced-local-pickup-for-woocommerce’ ),
    ‘action’ => “ready_for_pickup_icon”, // keep “view” class for a clean button CSS
    );
    unset($actions[‘complete’]);
    }
    }

    return $actions;
    }

    I’ll put the others on the features board.

    Many thanks.

    Kind Regards,
    Mark

    Plugin Author Zorem

    (@zorem)

    Hi, not sure, but this is custom development, you will have to monitor and check if there are any issues..
    I look forward for your new feature requests ??
    Thanks

    Thread Starter mmarshall1993

    (@mmarshall1993)

    Hi,

    Just to let you know I have put the feature requests on that page now.

    Kind Regards,
    Mark

    Plugin Author Zorem

    (@zorem)

    Ok, thanks, you will get updates by email on any status change.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Feature Requests’ is closed to new replies.