Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter cimita

    (@cimita)

    Hi,

    Thank you very much for your help.

    I have been looking at the info @gabrielfuentes attached but something I must be doing wrong… because I can’t achieve to make it work. I’ll leave the steps I followed below maybe I did something wrong.

    I added this code in my functions.php, then tested by going to: Analytics->Orders->Date Rage(today)->Show Advanced Filters->Add a filter(Order status Is Completed).

    But I must be missing some step. It causes no change at all and shows 0 orders even tough I modified an order today by changing it from Processing to Completed…

    Could you please share how did you achieved to do it @keithdjbsp?

    Thank you very much.

    add_filter( 'woocommerce_rest_prepare_order_object', 'last_modified_update', 10, 3 ); 
    function last_modified_update( $response, $object, $request ) { 
    	if (!isset($request->get_params()['last_modified'])) return $response;
    	if (strtotime($response->data['date_modified']) > strtotime($request->get_params()['last_modified'])){
    	return $response;
    	}
        //return $response;
        }
    
    • This reply was modified 5 years, 3 months ago by cimita.
    Thread Starter cimita

    (@cimita)

    I have been investigating further and I understand that I need to add a new advanced filter and a new column, right? Do you think I am on the right track?

    It doesn’t work though… so something I am doing wrong…

    Thank you.

    add_filter( 'woocommerce_admin_orders_report_advanced_filters', 'column_filter_by_order_status_date' );
    function column_filter_by_order_status_date( $columns ) {
        $columns['modified_date'] = 'Modified Date';
        return $columns;
    }
    add_action( 'woocommerce_admin_orders_report_advanced_filters', 'filter_by_order_status_date' );
    function filter_by_order_status_date( $column ) {
        global $post;
        if ( 'modified_date' === $column ) {
            $order = wc_get_order( $order_id );
            $modified_date = get_the_modified_date( $order );
            echo $modified_date;
        }
    }
    Thread Starter cimita

    (@cimita)

    Hi, issue fixed. No worries. The code above works for me. In order for it to work I had to comment some code in buttons.php.

    Great plugin btw!!

    Thread Starter cimita

    (@cimita)

    I can see in google dev tools that it displays the link to the anchor correctly in its place but when I click the button is not taking me to that anchor.

    Can you please advise? I must be missing something.

    Thread Starter cimita

    (@cimita)

    Hi Three Sons

    Thank you for your help and for the link, happily the issue has been solved. I don’t exactly know what has been done though as this time it was someone else that fixed it.

    Regards

    Thread Starter cimita

    (@cimita)

    Hi, ok, thank you.

    Thread Starter cimita

    (@cimita)

    I’m not using any plugin to customize the emails, and in the email_order_items template the only modification that has is a simple column that I added. But it does not have any br tags nor anything.

    This is the only modification that has been made to the template (I don’t think it has nothing to do with those br tags appearing from nowhere), everything else has not been touched. Thank you so much.

    
    <td class="td" style="text-align:left; vertical-align:middle; border: 1px solid #eee; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;">
    <?php
    if ( ! $short_description || $_product->is_type('variation')) {
    $_product = wc_get_product( $item->get_product_id() );
    echo wp_kses_post( apply_filters( 'woocommerce-product-details__short-description', $_product->get_short_description(), $cart_item, $cart_item_key ) . '&nbsp;' );
    } 
    else {
    echo wp_kses_post( apply_filters( 'woocommerce-product-details__short-description', sprintf('woocommerce-product-details__short-description', esc_url ( $short_description ), $_product->get_short_description()), $cart_item, $cart_item_key ) );
    };
    ?>	
    </td>
    
    Thread Starter cimita

    (@cimita)

    Hi, thank you for answering, I’ll look at all that and get back to you.

    It only happens when using a certain email provider as ‘sender’, it adds many many br tags automatically only to emails, leaving a huge space between title and body etc.

    But, this does not happens at all with other email providers. They work and displays the email perfectly fine.

    Do you think that maybe the issue could come from the provider side and they need to fix it from there?

    Thank you!

    Thread Starter cimita

    (@cimita)

    Hi,

    Thank you for the links. I changed the order but it still showing up double.

    
    add_action( 'woocommerce_before_variations_form', array( $GLOBALS['Product_Addon_Display'], 'display' ), 10 );
    remove_action( 'woocommerce_before_add_to_cart_button', array( $GLOBALS['Product_Addon_Display'], 'display' ), 10 );

    I also tried with this, but it doesn’t work at all:

    add_action( 'woocommerce_before_variations_form', array( $GLOBALS['Product_Addon_Display'], 'reposition_display_for_variable_product' ), 10 );
    remove_action( 'woocommerce_before_add_to_cart_button', array( $GLOBALS['Product_Addon_Display'], 'reposition_display_for_variable_product' ), 10 );
    Thread Starter cimita

    (@cimita)

    Hi,

    I’m trying to do it with hooks because I want to do it in functions.php:

    With this is shows up good on top of the variations but the problem is that it shows up below the variations too.

    add_action( ‘woocommerce_before_variations_form’, array( $GLOBALS[‘Product_Addon_Display’], ‘display’ ), 10 );

    I know I have to add a remove_action to remove it from below the variations, so I tried with this remove_action but it doesn’t work (and also it removes the addons from the simple products):

    remove_action( ‘woocommerce_before_add_to_cart_button’, array( $GLOBALS[‘Product_Addon_Display’], ‘display’ ), 10 );

    I don’t know exactly why the remove action doesn’t work…

    Thank you

    Thread Starter cimita

    (@cimita)

    Hi, thank you for the links. Very useful.

    Thread Starter cimita

    (@cimita)

    Hi. Ok. Thank you for your help.

    Thread Starter cimita

    (@cimita)

    Hi kellymetal,

    Thank you so much for your help. It worked with the second link!!

    Best,

    Thread Starter cimita

    (@cimita)

    Ok, thank you.

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