Leave a Reply

1 comment

  1. If the plugin works the way I think it does, you could try changing the priority of your gateway_set_post_format function being added to the save_post action.

    Your plugin may have a larger priority number which would make it fire later than yours.

    If the plugin does not change the custom field value until after your function is run, then that could explain the current behavior.

    add_action('save_post', 'gateway_set_post_format',999, 1);
    

    I hope you get it sorted out.