|
603 | 603 | }, |
604 | 604 | "args": 3 |
605 | 605 | }, |
606 | | - { |
607 | | - "name": "woocommerce_rest_checkout_process_payment_with_context", |
608 | | - "file": "StoreApi/Routes/V1/Checkout.php", |
609 | | - "type": "action_reference", |
610 | | - "doc": { |
611 | | - "description": "Process payment with context.", |
612 | | - "long_description": "", |
613 | | - "tags": [ |
614 | | - { |
615 | | - "name": "hook", |
616 | | - "content": "woocommerce_rest_checkout_process_payment_with_context" |
617 | | - }, |
618 | | - { |
619 | | - "name": "throws", |
620 | | - "content": "If there is an error taking payment, an \\Exception object can be thrown with an error message.", |
621 | | - "types": [ |
622 | | - "\\Exception" |
623 | | - ] |
624 | | - }, |
625 | | - { |
626 | | - "name": "param", |
627 | | - "content": "Holds context for the payment, including order ID and payment method.", |
628 | | - "types": [ |
629 | | - "\\Automattic\\WooCommerce\\StoreApi\\Payments\\PaymentContext" |
630 | | - ], |
631 | | - "variable": "$context" |
632 | | - }, |
633 | | - { |
634 | | - "name": "param", |
635 | | - "content": "Result object for the transaction.", |
636 | | - "types": [ |
637 | | - "\\Automattic\\WooCommerce\\StoreApi\\Payments\\PaymentResult" |
638 | | - ], |
639 | | - "variable": "$payment_result" |
640 | | - } |
641 | | - ], |
642 | | - "long_description_html": "" |
643 | | - }, |
644 | | - "args": 1 |
645 | | - }, |
646 | 606 | { |
647 | 607 | "name": "woocommerce_shop_loop", |
648 | 608 | "file": "BlockTypes/ClassicTemplate.php", |
|
813 | 773 | }, |
814 | 774 | "args": 2 |
815 | 775 | }, |
| 776 | + { |
| 777 | + "name": "woocommerce_store_api_checkout_order_processed", |
| 778 | + "file": "StoreApi/Routes/V1/CheckoutOrder.php", |
| 779 | + "type": "action", |
| 780 | + "doc": { |
| 781 | + "description": "Fires before an order is processed by the Checkout Block/Store API.", |
| 782 | + "long_description": "This hook informs extensions that $order has completed processing and is ready for payment.\n This is similar to existing core hook woocommerce_checkout_order_processed. We're using a new action: - To keep the interface focused (only pass $order, not passing request data). - This also explicitly indicates these orders are from checkout block/StoreAPI.", |
| 783 | + "tags": [ |
| 784 | + { |
| 785 | + "name": "since", |
| 786 | + "content": "7.2.0" |
| 787 | + }, |
| 788 | + { |
| 789 | + "name": "see", |
| 790 | + "content": "", |
| 791 | + "refers": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3238" |
| 792 | + }, |
| 793 | + { |
| 794 | + "name": "example", |
| 795 | + "content": "docs/examples/checkout-order-processed.md" |
| 796 | + }, |
| 797 | + { |
| 798 | + "name": "param", |
| 799 | + "content": "Order object.", |
| 800 | + "types": [ |
| 801 | + "\\WC_Order" |
| 802 | + ], |
| 803 | + "variable": "$order" |
| 804 | + } |
| 805 | + ], |
| 806 | + "long_description_html": "<p>This hook informs extensions that $order has completed processing and is ready for payment.</p> <p>This is similar to existing core hook woocommerce_checkout_order_processed. We're using a new action:</p> <ul> <li>To keep the interface focused (only pass $order, not passing request data).</li> <li>This also explicitly indicates these orders are from checkout block/StoreAPI.</li> </ul>" |
| 807 | + }, |
| 808 | + "args": 1 |
| 809 | + }, |
816 | 810 | { |
817 | 811 | "name": "woocommerce_store_api_checkout_order_processed", |
818 | 812 | "file": "StoreApi/Routes/V1/Checkout.php", |
|
849 | 843 | }, |
850 | 844 | { |
851 | 845 | "name": "woocommerce_store_api_checkout_update_customer_from_request", |
852 | | - "file": "StoreApi/Routes/V1/Checkout.php", |
| 846 | + "file": "StoreApi/Routes/V1/CheckoutOrder.php", |
853 | 847 | "type": "action", |
854 | 848 | "doc": { |
855 | 849 | "description": "Fires when the Checkout Block/Store API updates a customer from the API request data.", |
|
881 | 875 | "args": 2 |
882 | 876 | }, |
883 | 877 | { |
884 | | - "name": "woocommerce_store_api_checkout_update_order_from_request", |
| 878 | + "name": "woocommerce_store_api_checkout_update_customer_from_request", |
885 | 879 | "file": "StoreApi/Routes/V1/Checkout.php", |
886 | 880 | "type": "action", |
887 | 881 | "doc": { |
888 | | - "description": "Fires when the Checkout Block/Store API updates an order's from the API request data.", |
889 | | - "long_description": "This hook gives extensions the chance to update orders based on the data in the request. This can be used in conjunction with the ExtendSchema class to post custom data and then process it.", |
| 882 | + "description": "Fires when the Checkout Block/Store API updates a customer from the API request data.", |
| 883 | + "long_description": "", |
890 | 884 | "tags": [ |
891 | 885 | { |
892 | 886 | "name": "since", |
893 | | - "content": "7.2.0" |
| 887 | + "content": "8.2.0" |
894 | 888 | }, |
895 | 889 | { |
896 | 890 | "name": "param", |
897 | | - "content": "Order object.", |
| 891 | + "content": "Customer object.", |
898 | 892 | "types": [ |
899 | | - "\\WC_Order" |
| 893 | + "\\WC_Customer" |
900 | 894 | ], |
901 | | - "variable": "$order" |
| 895 | + "variable": "$customer" |
902 | 896 | }, |
903 | 897 | { |
904 | 898 | "name": "param", |
|
909 | 903 | "variable": "$request" |
910 | 904 | } |
911 | 905 | ], |
912 | | - "long_description_html": "<p>This hook gives extensions the chance to update orders based on the data in the request. This can be used in conjunction with the ExtendSchema class to post custom data and then process it.</p>" |
| 906 | + "long_description_html": "" |
913 | 907 | }, |
914 | 908 | "args": 2 |
915 | 909 | }, |
|
0 commit comments