Coding standards and releases

Updated

Standards

  • WordPress PHP coding standards. Every output is escaped and every string is translatable in the wpinterface-paddle-for-woocommerce-pro text domain. Deliberate exceptions carry a phpcs:ignore with a reason.
  • Exception messages are HTML-escaped where they are thrown; Plugin::error_message() decodes them for notes, logs and AJAX responses.
  • PHP 7.4-compatible syntax only; no autoloader (add new files to the list in the main file).
  • All order access through WooCommerce CRUD APIs (HPOS); write meta with Orders::update_meta() (saves meta without re-saving the order).

Release steps

  1. Run php -l on every file and phpcs --standard=WordPress; review new findings.
  2. Regenerate the translation template (command below).
  3. Bump Version in the plugin header, WPINTERFACE_PADDLE_WOO_PRO_VERSION, Stable tag and the changelog in readme.txt; review WC tested up to and Tested up to.
  4. If Billing_Driver::EVENTS changes, existing stores are topped up automatically (the stored hash no longer matches).
  5. Sandbox smoke test (classic checkout and Checkout block, inline and overlay): a purchase with a coupon, fee and shipping; a subscription with a trial and sign-up fee, and a renewal; refunds via Paddle and in Paddle; cancel, suspend and reactivate from WooCommerce; cancel in Paddle.
  6. Build the zip without development files (.git, local test helpers), upload it to the store and raise the version there.
wp i18n make-pot . languages/wpinterface-paddle-for-woocommerce-pro.pot --domain=wpinterface-paddle-for-woocommerce-pro --exclude=docs,node_modules,vendor

Was this page helpful?