I’m trying to add a section in the Settings > Payments dashboard.
Adding the section works, but populating it doesn’t. The filter doesn’t seem to trigger/work.
/classic-commerce/includes/admin/settings/class-wc-settings-payment-gateways:71 is not triggered when my plugin does:
add_filter('woocommerce_get_settings_checkout', 'ajdg_paypal_surcharge_settings', 10, 2);
I’ve been poking around in the code and can’t find a cause. It’s like the filter doesn’t exist in CC.
But it does in the above mentioned file.
For comparison, this works fine:
Both work in WooCommerce 2.2.2 and up. and the code seems the same enough even in WC 3.x-5.6 to imply that it should work on CC too. Seeing that it works half in CC, I imagine it’s a bug in Classic Commerce.
I can’t find any errors in any logs. Nor does ClassicPress/ClassicCommerce seem to acknowledge the filter.
Other than the missing dashboard, the plugin works fine. All other hooks/filters and everything works. Just the settings hook doesn’t work - Further suggesting there is a bug in CC.