newfold-labs / wp-module-ecommerce

Next-generation eCommerce Experience for WordPress sites at Newfold Digital.
GNU General Public License v2.0
9 stars 3 forks source link

PRESS4-329 | Offline Payments section greys out for regular intervals and then get back to normal #125

Closed sumathi3399 closed 1 year ago

sumathi3399 commented 1 year ago

jira ticket:- https://jira.newfold.com/browse/PRESS4-329

problem:-

offline payments api is not working after updating the woocommerce version. earlier we were using the /wc-admin/options api(which is failing one)

issue:-

now we are using the existing api which is wp/v2/settings api. here need to add the options for getting/updating the property values.

'woocommerce_bacs_settings'
'woocommerce_cod_settings'
'woocommerce_cheque_settings'

Request Body (POST):

 {
    "woocommerce_cheque_settings":{
        "gateway_id":"cheque",
        "enabled": "yes",
        "action":"woocommerce_toggle_gateway_enabled",
        "security":"ccca7ecd89"
    }
} 

Response (GET):

Screenshot 2023-09-05 at 1 13 41 PM

After getting enabled the offline payments in the bluehost ecommerce, All the three options will be enabled in the woocommerce->settings->payments. cod,cheque,bank transfer:

Screenshot 2023-09-05 at 1 15 37 PM