Skip to content

Commit

Permalink
New: Github Updater
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmigf committed Jan 8, 2025
1 parent 731d7cc commit a6e2be4
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
.gitmodules
composer.json
composer.lock

!/github-updater/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "github-updater"]
path = github-updater
url = [email protected]:wpovernight/github-updater.git
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Changelog

### v1.0.2 (2024-12-17)

- Fix: Invalid XML entities in item title by ensuring UTF-8 compliance

### v1.0.1 (2024-12-17)

- Fix: `paypal` and `stripe` payment codes
- Fix: Includes `cod` payment method code
- Fix: Customer PartyTaxScheme being included while empty
- Fix: Shop country code

### v1.0.0 (2024-12-16)

- First release
11 changes: 0 additions & 11 deletions changelog.txt

This file was deleted.

1 change: 1 addition & 0 deletions github-updater
Submodule github-updater added at b27321
24 changes: 23 additions & 1 deletion wpo-ips-xrechnung.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
/**
* Plugin Name: PDF Invoices & Packing Slips for WooCommerce - XRechnung
* Requires Plugins: woocommerce-pdf-invoices-packing-slips
* Plugin URI: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/
* Plugin URI: https://github.com/wpovernight/wpo-ips-xrechnung
* Description: XRechnung add-on for PDF Invoices & Packing Slips for WooCommerce plugin.
* Version: 1.0.3-beta-3
* Update URI: https://github.com/wpovernight/wpo-ips-xrechnung
* Author: WP Overnight
* Author URI: https://wpovernight.com
* License: GPLv3
Expand Down Expand Up @@ -55,6 +56,13 @@ class WPO_IPS_XRechnung {
*/
public $root_element = 'ubl:Invoice';

/**
* Plugin path
*
* @var string
*/
public $plugin_path;

/**
* Plugin instance
*
Expand All @@ -78,6 +86,20 @@ public static function instance() {
* Constructor
*/
public function __construct() {
$this->plugin_path = plugin_dir_path( __FILE__ );
$plugin_file = basename( $this->plugin_path ) . '/wpo-ips-xrechnung.php';
$github_updater_file = $this->plugin_path . 'github-updater/GitHubUpdater.php';

if ( ! class_exists( '\\WPO\\GitHubUpdater\\GitHubUpdater' ) && file_exists( $github_updater_file ) ) {
require_once $github_updater_file;
}

if ( class_exists( '\\WPO\\GitHubUpdater\\GitHubUpdater' ) ) {
$gitHubUpdater = new \WPO\GitHubUpdater\GitHubUpdater( $plugin_file );
$gitHubUpdater->setChangelog( 'CHANGELOG.md' );
$gitHubUpdater->add();
}

if ( class_exists( 'WPO_WCPDF' ) && version_compare( WPO_WCPDF()->version, $this->base_plugin_version, '<' ) ) {
add_action( 'admin_notices', array( $this, 'base_plugin_dependency_notice' ) );
return;
Expand Down

0 comments on commit a6e2be4

Please sign in to comment.