follow this guide
https://rudrastyh.com/woocommerce/checkout-block-payment-method-integration.html
be carefull
check this code is run?
if not we cannot see custom payment method
public function get_payment_method_script_handles() {
wp_register_script(
'wc-shop_as_client-blocks-integration',
plugin_dir_url(FILE) . 'js/checkout.js',
[
'wc-blocks-registry',
'wc-settings',
'wp-element',
'wp-html-entities'
],
null,
true
);
return [ 'wc-shop_as_client-blocks-integration' ];
}
check this file
plugin_dir_url(FILE) . 'js/checkout.js',
and add alert("test payment") to test
Top comments (0)