Closed vedanshujain closed 6 years ago
Couple of things:
I'm not sure that "checkout form" is the best name, semantically, since it doesn't include all the fields you would normally fill out when doing a checkout. I'd probably go with something more specific, like "payment options".
apply_filters
is generally used to modify a value that is given as one of the parameters. In this case, we're not modifying $total
, we're just using it to render HTML. So do_action
would probably be more appropriate.
That said, another way to approach this might be to store the output buffer of the rendered HTML in a variable, and then feed that into an apply_filters
call before echoing it.
… filter.
This will allow us to add customize the checkout form if needed.