• Hi, I’m happily using your plugin.
    I have successfully removed php notice changing 3 things in your code.
    In wc-customer-source.php file, row 331 and 332 I have changed $order->id to $order->get_id()
    In wccs-source-report-table.php file, row 160 I have changed $order->billing_first_name to $order->get_billing_first_name() and $order->billing_last_name to $order->get_billing_last_name()
    Now I have no more php notice.
    Can you confirm that this is working four you too? If yes can you update your plugin? Thanx

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author wooassist

    (@wooassist)

    @karesz Hi, sorry but we don’t get PHP notices on our end. WHat version of PHP are you running? We are testing using PHP 7.2.18

    Hi

    I’m on php 7.1 and query monitor shows me that notice

    Plugin Author wooassist

    (@wooassist)

    @karesz I will do some testing on this and will give you an update within the week

    Thanks

    Plugin Author wooassist

    (@wooassist)

    @karesz Hi, we have tested some more but still could not replicate the PHP notices. We will keep a look out for this though and consider it on our next update though. Thanks for letting us know.

    Hi @wooassist,

    I can confirm I see the same notices appearing and have applied the same fixes as @karesz (as well as some additional fixes to the wccs-admin-export.php file). Perhaps it would be possible to update the plugin with the changes proposed assuming they do not cause any problems?

    Here is an example of the notice:

    Notice: id was called <strong>incorrectly</strong>. Order properties should not be accessed directly. Backtrace: include('wp-admin/edit-form-advanced.php'), do_meta_boxes, WC_Meta_Box_Order_Data::output, do_action('woocommerce_admin_order_data_after_billing_address'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Customer_Source->display_fields_order_edit, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong

    Aside from the property updates I also had to add array_key_exists checks to $_POST[‘date[ssd]’] and $_POST[‘date[eed]’] to remove notices on export (which ultimately broke NGINX). i.e.

    
    if( ( array_key_exists('date[ssd]', $_POST) && $_POST['date[ssd]'] ) ) {
    	$ssd = $_POST['date[ssd]'];
    	$StartDate = strtotime($ssd);
    }
    if( ( array_key_exists('date[eed]', $_POST) && $_POST['date[eed]'] ) ) {
    	$eed = $_POST['date[eed]'];
    	$EndDate = strtotime($eed);
    }
    

    Hope that’s helpful.

    bbceg

    (@bbceg)

    Just wondered whether you’d had a chance to look into this any further @wooassist ? You may need to turn on debugging and/or check your error logs to see the notices. Happy to provide a list of files and fixes required if it helps.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.