title: generate invoice & shipment programmatically if extension is enable in store->configuration
body: <p>I want to generate invoice and shipment automatically when store->configuration Enable Invoice option is enabled ... I've already generated invoice and shipment automatically but now i need to generate it only when that option is enable and i've to check whether active payment method and my payment option is true. like following:
  <a href="https://i.stack.imgur.com/gIged.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>Any option is there!?with which i can add this condition in my observer!?</p>