payfort / woocommerce-payfort

MIT License
10 stars 22 forks source link

Conflict with woocommerce version 8.5.2 #47

Open adeelwebmaster opened 9 months ago

adeelwebmaster commented 9 months ago

Payfort is calling the address in the wrong way when we try to place an order on the cart page. It displays the following error: 2024-01-24T13:45:32+00:00 CRITICAL Uncaught TypeError: Argument 1 passed to WC_Order::set_shipping_address() must be of the type array, string given, called in /home/homebtsi/public_html/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-order.php on line 338 and defined in /home/homebtsi/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php:1152 Stack trace:

0 /home/homebtsi/public_html/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-order.php(338): WC_Order->set_shipping_address('')

1 /home/homebtsi/public_html/wp-content/plugins/woocommerce-payfort-master/includes/class-aps-ajax.php(404): WC_Abstract_Legacy_Order->set_address(Array, 'shipping')

2 /home/homebtsi/public_html/wp-includes/class-wp-hook.php(324): APS_Ajax->create_cart_order('')

3 /home/homebtsi/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)

4 /home/homebtsi/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)

5 /home/homebtsi/public_html/wp-admin/admin-ajax.php(203): do_actio in /home/homebtsi/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php on line 1152

I have fixed the issue by updating the code in woocommerce but it should be fixed in woocommerce payfort plugin /**