@@ -520,6 +520,7 @@ execute on the checkout.
520
520
521
521
Usage:
522
522
523
+ <code>
523
524
add_filter('woo_solo_api_overwrite_request_on_checkout', 'my_payment_processor_overwrite', 10, 2);
524
525
525
526
function my_payment_processor_overwrite($sendControl, $order) {
@@ -537,9 +538,12 @@ function my_payment_processor_overwrite($sendControl, $order) {
537
538
// Default fallback.
538
539
return $sendControl;
539
540
}
541
+ </code>
540
542
543
+ <code>
541
544
@param string $sendControl Type of send control. Can be 'checkout' or 'status_change'.
542
545
@param WC_Order $order Order object.
546
+ </code>
543
547
544
548
--------------
545
549
@@ -559,8 +563,10 @@ function my_customer_filter($customerNote, $order) {
559
563
}
560
564
</code>
561
565
566
+ <code>
562
567
@param string $customerNote Existing customer note.
563
568
@param WC_Order $order Order object
569
+ </code>
564
570
565
571
--------------
566
572
@@ -571,14 +577,18 @@ you can just hook to this filter and modify the request body.
571
577
572
578
Usage:
573
579
580
+ <code>
574
581
add_filter('woo_solo_api_modify_request_body', 'my_customer_filter', 10, 2);
575
582
576
583
function my_customer_filter($requestBody, $order) {
577
584
// (maybe) modify $requestBody.
578
585
return $requestBody;
579
586
}
587
+ </code>
580
588
589
+ <code>
581
590
@param array $requestBody Existing customer note.
591
+ </code>
582
592
583
593
--------------
584
594
@@ -598,9 +608,11 @@ function my_message_filter($emailMessage, $orderId, $email) {
598
608
}
599
609
</code>
600
610
611
+ <code>
601
612
@param string $emailMessage Email message from options to filter.
602
613
@param int $orderId Order ID.
603
614
@param string $email Email address of the person for whom this message needs to be send to.
615
+ </code>
604
616
605
617
--------------
606
618
@@ -619,9 +631,11 @@ function my_message_filter($defaultMessage, $orderId, $email) {
619
631
}
620
632
</code>
621
633
634
+ <code>
622
635
@param string $defaultMessage Email message to filter.
623
636
@param int $orderId Order ID.
624
637
@param string $email Email address of the person for whom this message needs to be send to.
638
+ </code>
625
639
626
640
--------------
627
641
@@ -641,8 +655,10 @@ function my_title_filter($emailTitle, $orderId) {
641
655
}
642
656
</code>
643
657
658
+ <code>
644
659
@param string $emailTitle Email title.
645
660
@param int $orderId Order ID.
661
+ </code>
646
662
647
663
--------------
648
664
@@ -662,8 +678,10 @@ function my_title_filter($defaultTitle, $orderId) {
662
678
}
663
679
</code>
664
680
681
+ <code>
665
682
@param string $emailTitle Email title.
666
683
@param int $orderId Order ID.
684
+ </code>
667
685
668
686
--------------
669
687
@@ -673,10 +691,12 @@ When email to customer is sent, maybe you want to add something more. In that
673
691
case you'll probably need to modify the headers sent with the email.
674
692
Default ones are
675
693
694
+ <code>
676
695
[
677
696
'MIME-Version: 1.0',
678
697
'Content-Type: text/html',
679
698
];
699
+ </code>
680
700
681
701
You can add to that list.
682
702
@@ -691,11 +711,13 @@ function my_custom_email_headers($headers) {
691
711
}
692
712
</code>
693
713
714
+ <code>
694
715
@param array $headers Email headers to pass to wp_mail.
716
+ </code>
695
717
696
718
--------------
697
719
698
- Filter the from name set from the options
720
+ Filter the ' from' name set from the options
699
721
700
722
Usage:
701
723
@@ -708,7 +730,9 @@ function my_custom_from_name($name) {
708
730
}
709
731
</code>
710
732
733
+ <code>
711
734
@param string $name Name to change in the "From" field.
735
+ </code>
712
736
713
737
--------------
714
738
@@ -730,7 +754,9 @@ function my_global_discount($globalDiscount) {
730
754
}
731
755
</code>
732
756
757
+ <code>
733
758
@param int $globalDiscount The value of the global discount to apply to every item.
759
+ </code>
734
760
735
761
--------------
736
762
@@ -751,6 +777,8 @@ function my_tax_rate($taxRate, $itemData, $taxRates) {
751
777
}
752
778
</code>
753
779
780
+ <code>
754
781
@param float $taxRate The value of the tax rate for the current order item.
755
782
@param array $itemData The data for the current order item.
756
783
@param array $taxRates The value of the tax rates for the current order item.
784
+ </code>
0 commit comments