Changeset 2054619
- Timestamp:
- 03/21/2019 02:28:17 PM (7 years ago)
- Location:
- apollo
- Files:
-
- 104 added
- 5 edited
-
tags/1.0.2 (added)
-
tags/1.0.2/admin (added)
-
tags/1.0.2/admin/css (added)
-
tags/1.0.2/admin/css/costum.css (added)
-
tags/1.0.2/admin/css/custom.css (added)
-
tags/1.0.2/admin/images (added)
-
tags/1.0.2/admin/js (added)
-
tags/1.0.2/admin/js/custom.js (added)
-
tags/1.0.2/apollo.php (added)
-
tags/1.0.2/includes (added)
-
tags/1.0.2/includes/admin (added)
-
tags/1.0.2/includes/admin/invoice.php (added)
-
tags/1.0.2/includes/admin/settings (added)
-
tags/1.0.2/includes/admin/settings/general.php (added)
-
tags/1.0.2/includes/admin/settings/main-settings.php (added)
-
tags/1.0.2/includes/apollo.php (added)
-
tags/1.0.2/languages (added)
-
tags/1.0.2/languages/apollo.pot (added)
-
tags/1.0.2/readme.txt (added)
-
tags/1.0.2/vendor (added)
-
tags/1.0.2/vendor/spaceinvoices (added)
-
tags/1.0.2/vendor/spaceinvoices/composer.json (added)
-
tags/1.0.2/vendor/spaceinvoices/composer.lock (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/autoload.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/composer (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/composer/ClassLoader.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/composer/LICENSE (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/composer/autoload_classmap.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/composer/autoload_namespaces.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/composer/autoload_psr4.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/composer/autoload_real.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/composer/autoload_static.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/composer/installed.json (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/.gitignore (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/.travis.yml (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/LICENSE.txt (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/README.md (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/bootstrap.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/build (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/composer.json (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/examples (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/examples/freebase.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/examples/github.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/examples/override.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/examples/showclix.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Bootstrap.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Exception (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Exception/ConnectionErrorException.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Handlers (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Handlers/CsvHandler.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Handlers/FormHandler.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Handlers/JsonHandler.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Handlers/MimeHandlerAdapter.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Handlers/README.md (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Handlers/XHtmlHandler.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Handlers/XmlHandler.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Http.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Httpful.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Mime.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Proxy.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Request.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Response (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Response.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/src/Httpful/Response/Headers.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/tests (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/tests/Httpful (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/tests/Httpful/HttpfulTest.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/tests/Httpful/requestTest.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/tests/bootstrap-server.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/tests/phpunit.xml (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/tests/static (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/tests/static/test.json (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/nategood/httpful/tests/test_image.jpg (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/.gitignore (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/README.md (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/composer.json (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/composer.lock (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/init.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/Accounts.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/ApiOperations (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/ApiOperations/Create.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/ApiOperations/Delete.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/ApiOperations/Edit.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/ApiOperations/Find.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/ApiOperations/GetById.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/ApiResource.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/Clients.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/Companies.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/Currencies.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/Documents.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/Items.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/Organizations.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/Payments.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/Recurrences.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/Spaceinvoices.php (added)
-
tags/1.0.2/vendor/spaceinvoices/vendor/space-invoices/space-invoices-php/lib/Taxes.php (added)
-
trunk/apollo.php (modified) (2 diffs)
-
trunk/includes/admin/invoice.php (modified) (2 diffs)
-
trunk/includes/admin/settings/main-settings.php (modified) (1 diff)
-
trunk/includes/apollo.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
apollo/trunk/apollo.php
r2020670 r2054619 4 4 * Plugin URI: https://wordpress.org/plugins/apollo 5 5 * Description: Manually or automatically generate invoices and send PDFs as attachments for WooCommerce orders. 6 * Version: 1.0. 16 * Version: 1.0.2 7 7 * Author: Studio404 8 8 * Text Domain: apollo … … 12 12 defined( 'ABSPATH' ) or exit; 13 13 14 define( 'APOLLO_VERSION', '1.0. 1' );14 define( 'APOLLO_VERSION', '1.0.2' ); 15 15 16 16 function apollo_load_plugin() { -
apollo/trunk/includes/admin/invoice.php
r2020650 r2054619 11 11 12 12 if ($type === 'invoice' && $invoice_exsists) { 13 $invoice_exsists['exsists'] = true; 13 14 return $invoice_exsists; 14 15 } else if ($type === 'estimate' && $estimate_exsists) { 16 $estimate_exsists['exsists'] = true; 15 17 return $estimate_exsists; 16 18 } … … 118 120 119 121 $create = Spaceinvoices\Documents::create($organization_id, $order_data); 122 if(isset($create->error)) { 123 return array("error" => "Apollo error (".$create->error->statusCode."): ".$create->error->text); 124 } 120 125 $document_id = $create->id; 121 126 $document_number = $create->number; -
apollo/trunk/includes/admin/settings/main-settings.php
r2013244 r2054619 70 70 ?> 71 71 </h2> 72 <form method="post" action="options.php" enctype="multipart/form-data" <?php echo $width; ?>>72 <form method="post" action="options.php" enctype="multipart/form-data"> 73 73 <?php 74 74 settings_fields( $current_tab ); -
apollo/trunk/includes/apollo.php
r2013244 r2054619 17 17 18 18 private function __construct() { 19 $this->errorMsg = "Apollo error"; 20 $this->successMsg = "Apollo success"; 19 21 20 22 // check if user admin … … 27 29 add_filter( 'plugin_action_links_' . plugin_basename( APOLLO_FILE ), array($this,'add_action_links') ); 28 30 31 Apollo_Main_Settings::init_hooks(); 32 33 add_action( 'add_meta_boxes', array( $this, 'add_apollo_boxes' ) ); 34 add_filter( 'plugin_row_meta', array( $this, 'add_plugin_row_meta' ), 10, 2 ); 35 add_action( 'admin_init', array( $this, 'admin_pdf_callback' ) ); 36 add_action( 'admin_enqueue_scripts', array( $this, 'my_admin_scripts' ) ); 37 38 } 39 40 public function my_admin_scripts() { 29 41 //css 30 42 wp_register_style( 'apollo_settings_css', APOLLO_URL . '/admin/css/custom.css'); … … 34 46 wp_register_script( 'apollo_settings_js', APOLLO_URL . '/admin/js/custom.js' ); 35 47 wp_enqueue_script( 'apollo_settings_js' ); 36 37 Apollo_Main_Settings::init_hooks(); 38 39 add_action( 'add_meta_boxes', array( $this, 'add_apollo_boxes' ) ); 40 add_filter( 'plugin_row_meta', array( $this, 'add_plugin_row_meta' ), 10, 2 ); 41 add_action( 'admin_init', array( $this, 'admin_pdf_callback' ) ); 42 43 } 48 } 49 44 50 45 51 public function admin_pdf_callback() { … … 55 61 wp_die( 'Invalid request.' ); 56 62 } 57 Apollo_invoice::create($order_id, $type); 63 $callback = Apollo_invoice::create($order_id, $type); 64 if (isset($callback['error'])) { 65 $this->errorMsg = $callback['error']; 66 add_action( 'admin_notices', array( $this, 'apollo_error_notice' )); 67 } else if (!isset($callback['exsists'])) { 68 $this->successMsg = "Successfully created Apollo $type."; 69 add_action( 'admin_notices', array( $this, 'apollo_success_notice' )); 70 } 58 71 59 72 } else if ($action === 'pdf' && $apollo_document_id) { … … 67 80 } 68 81 82 function apollo_error_notice() { 83 ?> 84 <div class="notice notice-error is-dismissible"> 85 <p><?= $this->errorMsg ?></p> 86 </div> 87 <?php 88 } 89 90 function apollo_success_notice() { 91 ?> 92 <div class="notice notice-success is-dismissible"> 93 <p><?= $this->successMsg ?></p> 94 </div> 95 <?php 96 } 97 69 98 function add_apollo_boxes() { 70 add_meta_box( 'apollo_invoice', __( 'Apollo - invoice', 'apollo-invoices' ), array( $this, 'display_apollo_invoice_box' ), 'shop_order', 'normal', 'high' );71 99 add_meta_box( 'apollo_estimate', __( 'Apollo - estimate', 'apollo-invoices' ), array( $this, 'display_apollo_estimate_box' ), 'shop_order', 'side', 'high' ); 100 add_meta_box( 'apollo_invoice', __( 'Apollo - invoice', 'apollo-invoices' ), array( $this, 'display_apollo_invoice_box' ), 'shop_order', 'side', 'high' ); 72 101 } 73 102 -
apollo/trunk/readme.txt
r2020670 r2054619 4 4 Requires at least: 4.9 5 5 Stable tag: trunk 6 Tested up to: 5. 0.36 Tested up to: 5.1.1 7 7 8 8 == Description == … … 41 41 ### How To Use 42 42 For the extension to work, you will need to provide the Apollo token and the Apollo organization ID. You can find those on our [Apollo page](https://getapollo.io), under extensions tab. 43 44 ### Errors 45 - If you get Apollo error 401 when creating documents, it is most likely that Apollo token or Organization ID are set incorrectly in Apollo settings. 43 46 44 47 Apollo is proudly powered by the [Space invoices API](https://spaceinvoices.com/). For further information on extension implementation, please feel free to check out our Space invoices API PHP documentation](https://docs.spaceinvoices.com/?php) for developers. … … 80 83 == Changelog == 81 84 85 = 1.0.2 - March 21, 2019 = 86 87 - Fixed: JS and CSS script adding error 88 - Added: Extra error handling 89 - Show some extra details when error occurs 90 - Minor bug fixes 91 82 92 = 1.0.1 - January 28, 2019 = 83 93
Note: See TracChangeset
for help on using the changeset viewer.