Skip to content

Commit

Permalink
BB-3085: Remove autoloading.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmacarthur committed Sep 25, 2018
1 parent 76ceacb commit a5fac43
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 3,628 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
.DS_Store
vendor/*
!vendor/autoload.php
!vendor/composer
vendor/composer/installers
vendor
7 changes: 1 addition & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Send recurring email digests based on WooCommerce orders or subscriptions.",
"type": "wordpress-plugin",
"license": "GPL v3",
"version": "1.0.1",
"version": "1.0.2",
"authors": [
{
"name": "Philip Downer",
Expand All @@ -20,11 +20,6 @@
"phpunit/phpunit": "^7.3",
"mockery/mockery": "^1.1"
},
"autoload": {
"psr-4": {
"WCEmailDigest\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"WCEmailDigestTests\\": "tests/"
Expand Down
4 changes: 2 additions & 2 deletions src/DigestEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function trigger() {
$startTime = $this->schedule == 'daily' ? '-24 hours' : '-1 week';

if( ENV == 'dev' ) $startTime = '-10 years';

$this->subscribers = new Subscribers($this->subscriberStatus, $startTime);
if( !$this->subscribers->hasSubscribers() ) {
return;
Expand Down Expand Up @@ -206,4 +206,4 @@ public function unschedule() {
if( !$scheduledTimestamp ) return;
return wp_unschedule_event($scheduledTimestamp, static::$cronHook);
}
}
}
6 changes: 3 additions & 3 deletions src/NewSubscriptionsDigestEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace WCEmailDigest;

class NewSubscriptionsDigestEmail extends DigestEmail {

/**
* Cron hook name
* @var string
Expand All @@ -28,9 +28,9 @@ public function __construct() {
$this->template_plain = 'emails/plain/new-subscriptions-digest.php';

$this->subscriberStatus = ['active'];

parent::__construct();

add_action('woocommerce_update_options_email_' . $this->id, [$this, 'process_admin_options']);
}
}
}
7 changes: 0 additions & 7 deletions vendor/autoload.php

This file was deleted.

Loading

0 comments on commit a5fac43

Please sign in to comment.