Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Make sure the domain and slug are renamed from tornevalls-resurs-bank-payment-gateway-for-woocommerce to resurs-bank-payment-gateway-for-woocommerce.
  • This plugin has a prefix for all actions, filters and data it uses: trbwc. This has to be reviewed and changed to match Resurs Bank, so that data is properly linked to the correct version.
    Make sure you verify that correct data is changed here as filters also are running under the short name "rbwc".
    The prefix itself is set in the initialization script of the plugin as a constant, so to change this part you should instead use the filter rbwc_get_plugin_prefix.  At least if you want to keep this forged and make it possible to import and export features between your own release and this.
    The trbwc and rbwc are also used in frontend scripts so keep in mind that it cannot be changed in ALL places.
  • The internal prefix for getResursOption and several features used for saving data is not affected by other slugs way of setting their own prefixes. This question was initially added here, as a part of the tests with different slugs/prefixes. A discovery that we could not change the prefix without breaking the database storage made me realize that the plugin should be transparent in its data saving. Example: If you run a forked edition of the plugin, but the decides to switch to the original codebase, data should not be entirely reset between the changes, but be transparent. 
    Jira Legacy
    serverTornevall Networks
    columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverIdef1f2374-e58a-319f-9d38-10348dbac859
    keyRWC-339
    covers the same question.
  • For this plugin repository, make sure that no forks delivers the entire tree of older plugins.

Smart developing

  • If you are not happy with how parts of this plugin is built, before you start rewriting large blocks of code, check if there is a filter to handle what you want to change or build it based on filters; create a new applyFIlter (or action) and start build your own plugin part (there is plenty of space fo this). The create a pull request so that it can be imported if the idea behind the change could be an improvement for the official release.
  • Take a look at the merged commit, for an example of how to do "smart implementions". The example covers how to move a set of configuration from one tab to another without destroying the original codebase. This task is based on 
    Jira Legacy
    serverTornevall Networks
    columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverIdef1f2374-e58a-319f-9d38-10348dbac859
    keyRWC-332
    where a config setting was supposed to move around configuration data. With this extra plugin, this setting could be enforced into a permanent state by changing private $forcePaymentMethodsToFirstTab = false; to true. As long as the slug belongs to the original codebase, this setting will not be fully enabled. In a fork, the intentions of this example (and fix) is to override the "slug rules". By doing this "smart", the original codebase and slugs can remain untouched and your fork can be entirely customized.

...