bug in get_card_method()
-
Hi,
When get_card_methods_from_api() returns empty array the returned data is not cached in get_card_method() method due to the way if statement is written:
if ( ! $methods ) { // ! $methods -> ! array() -> true
To address this issue a strict boolean check must be made (see get_transient documentation for more details):
if ( false === $methods ) {
It would be probably wise to add delete_transient() when plugin settings are saved.
- You must be logged in to reply to this topic.