-
Notifications
You must be signed in to change notification settings - Fork 43
Upgrade guides
Below are guides to each new version of the framework, detailing any extra steps needed or backwards incompatibilities to be aware of when upgrading a plugin. If no steps are listed, you can check the release's changelog entries for any changes you'll want to test after upgrading.
-
Update the
build_token()method in subclasses ofSV_WC_Payment_Gateway_Payment_Tokens_Handlerto accept an instance of\WC_Payment_Tokenor anarrayas the second parameter ($data) -
Update the constructor in subclasses of
SV_WC_Payment_Gateway_Payment_Tokento accept an instance of\WC_Payment_Tokenor anarrayas the second parameter ($data) -
Make sure that API response classes that implement
SV_WC_Payment_Gateway_API_Create_Payment_Token_ResponseorSV_WC_Payment_Gateway_API_Get_Tokenized_Payment_Methods_Responseinclude a value for each of the following keys in the token data:- Credit Card tokens
last_four-
exp_year(four characters) -
exp_month(two characters) cart_type
- eCheck tokens
last_four
If the API response doesn't include enough information, we may need to update
SV_WC_Payment_Gateway_Payment_Tokens_Handler::merge_token_data()or otherwise ensure those values are available before callingsave()on the core token. - Credit Card tokens
We removed the framework's table in favor of WooCommerce's table of payment methods. As a result, the following hooks were deprecated:
wc_{$plugin_id}_my_payment_methods_table_htmlwc_{$plugin_id}_my_payment_methods_table_head_html-
wc_{$plugin_id}_my_payment_methods_table_title(listed in Intuit Payments as a replacement for another hook) wc_{$plugin_id}_my_payment_methods_table_title_htmlwc_{$plugin_id}_my_payment_methods_table_row_htmlwc_{$plugin_id}_my_payment_methods_table_body_html-
wc_{$plugin_id}_my_payment_methods_table_body_row_data(used by Chase Paymentech) wc_{$plugin_id}_my_payment_methods_table_method_expiry_htmlwc_{$plugin_id}_my_payment_methods_table_actions_html
Make sure to remove usage of those hooks to avoid triggering deprecated notices.
Moving forward, the following core hooks could be used to customize some of the information displayed in the table:
- Use filter
woocommerce_payment_methods_list_itemto define custom actions for individual tokens - Use filter
woocommerce_account_payment_methods_columnsto define additional columns for the table - Use action
woocommerce_account_payment_methods_column_{custom_column_id}to render the content of a coulumn for an individual token
N/A
N/A
- For plugins extending
SV_WC_API_Base- If overriding
::require_tls_1_2(), move the method to the plugin's base class
- If overriding
N/A
See the list of deprecated methods that will throw a notice if used.
More legacy versions coming soon...
- Home
- General Usage
- Payment Gateways
- WooCommerce Blocks
- Updating
- Testing
- Workflow