Changeset 1045307
- Timestamp:
- 12/15/2014 10:47:59 PM (11 years ago)
- Location:
- woocommerce-autocomplete-order/tags/1.0
- Files:
-
- 2 edited
-
readme.txt (modified) (5 diffs)
-
woocommerce-autocomplete-order.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-autocomplete-order/tags/1.0/readme.txt
r1045306 r1045307 4 4 Tags: WooCommerce, order, complete, virtual, autocomplete 5 5 Requires at least: 3.3 6 Tested up to: 4.0. 17 Stable tag: 1. 16 Tested up to: 4.0.0 7 Stable tag: 1.0 8 8 License: GNU General Public License v3.0 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 21 21 == Installation == 22 22 23 1. Ensure you have WooCommerce 2.1 or higher installed and active24 23 1. Upload the plugin's folder to the `/wp-content/plugins/` directory 25 24 1. Activate the plugin through the 'Plugins' menu in WordPress 26 1. Open WooCommerce > Settings > Woo Extra Options 27 1. Pick an option from the dropdown within the section named "Autocomplete Orders" 25 1. Flag as "Virtual" all the products you want to be unlocked for users upon successful payment without any further (manual) action from you in the backoffice 28 26 29 27 == Screenshots == … … 35 33 36 34 = The plugin is not working = 37 Please verify the following: 38 * Ensure that WooCommerce is installed and active 39 * Ensure that you picked from the list the mode that fits your needs 35 Please ensure that you picked the right mode from the list. 40 36 41 37 = Uh-uh, still not working! = … … 45 41 Please deactivate my plugin (or select mode "Off"), test with a product marked as "virtual" and "downloadable". If it still doesn't work, then there's something wrong in your WooCommerce configuration or in your payment gateway. If it does work, please write me through the forum! 46 42 47 = How can I make it work with WooCommerce Product Bundles? =48 If you want to use mode "Virtual Paid Products Only" ensure that the bundle has the flag "Non-bundles Shipping" checked49 50 43 == Changelog == 51 44 52 = 1.1 =53 * Added compatibility with WooCommerce Product Bundles54 * Fixed PHP Warning and Notices55 56 45 = 1.0 = 46 * Plugin completely rewritten to comply with WordPress 4.0 and WooCommerce 2.0. 47 * Added 3 different modes to ativate the plugin: 48 * Virtual Paid Products Only: order for products marked as "Virtual" will be turned to "Completed" upon successfull payment. 49 * All Paid Products: orders for any product are turned to "Completed" upon successfull payment. 50 * All Products: each and every order is turned to "Completed" irrespective for the payment method and whether or not the payment happened. 51 * Added a settings page (in WooCommerce dashboard) to select the mode we want to activate (under WooCommerce > Settings > Woo Extra Options). 57 52 58 53 = v0.1.2 = … … 70 65 == Upgrade notice == 71 66 67 The plugin has been completely rewritten to meet requirements for WP4 and WooCommerce 2.0. 68 A new tab has been added to WooCommerce settings in the Dashboard to select in which mode you want the plugin to work: 69 * autocomplete only orders for virtual product 70 * autocomplete every order once paid 71 * autocomplete every order even if not paid 72 Enjoy! -
woocommerce-autocomplete-order/tags/1.0/woocommerce-autocomplete-order.php
r1045306 r1045307 4 4 Plugin URI: 5 5 Description: Do you hate WooCommerce for obliging you to manually approve every order placed for non-downloadable goods? This plugin is the answer, since allows to automatically mark orders for **virtual** products as Completed after a successful payment (e.g. with PayPal or Credit Card). 6 Version: 1. 16 Version: 1.0 7 7 Author: Mirko Grewing 8 8 Author URI: http://www.mirkogrewing.it … … 25 25 * @copyright 2014 Mirko Grewing 26 26 * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 27 * @version 1. 127 * @version 1.0 28 28 * @link http://www.nitelab.org/ 29 29 * @since Class available since Release 0.1 … … 45 45 function __construct() 46 46 { 47 if (is_admin()) { 48 //add settings tab 49 add_filter('woocommerce_settings_tabs_array', array($this,'woocommerce_settings_tabs_array'), 50); 50 //show settings tab 51 add_action('woocommerce_settings_tabs_'.$this->id, array($this,'show_settings_tab')); 52 //save settings tab 53 add_action('woocommerce_update_options_'.$this->id, array($this,'update_settings_tab')); 54 //add tabs select field 55 add_action('woocommerce_admin_field_'.$this->id,array($this, 'show_'.$this->id.'_field'), 10); 56 //save tabs select field 57 add_action('woocommerce_update_option_'.$this->id,array($this, 'save_'.$this->id.'_field'), 10); 58 } 47 //add settings tab 48 add_filter('woocommerce_settings_tabs_array', array($this,'woocommerce_settings_tabs_array'), 50); 49 //show settings tab 50 add_action('woocommerce_settings_tabs_'.$this->id, array($this,'show_settings_tab')); 51 //save settings tab 52 add_action('woocommerce_update_options_'.$this->id, array($this,'update_settings_tab')); 53 //add tabs select field 54 add_action('woocommerce_admin_field_'.$this->post_type,array($this, 'show_'.$this->post_type.'_field'), 10); 55 //save tabs select field 56 add_action('woocommerce_update_option_'.$this->post_type,array($this, 'save_'.$this->post_type.'_field'), 10); 59 57 //ajax search handler 60 58 //add_action('wp_ajax_woocommerce_json_custom_tabs', array($this,'woocommerce_json_custom_tabs')); … … 106 104 ), 107 105 'title' => array( 108 'name' => __( 'Mode', 'wooExtraOptions'),106 'name' => __( 'Mode', 'wooExtraOptions' ), 109 107 'type' => 'select', 110 'desc' => __( 'Select the type of autocompletion you want to activate.', 'wooExtraOptions'),108 'desc' => __( 'Select the type of autocompletion you want to activate.', 'wooExtraOptions' ), 111 109 'desc_tip' => true, 112 110 'default' => 'off', … … 152 150 } 153 151 } elseif ($mode == 'paid') { 154 add_filter( 'woocommerce_payment_complete_order_status', 'autocompletePaidOrders', 10, 2);152 add_filter( 'woocommerce_payment_complete_order_status', 'autocompletePaidOrders', 10, 2 ); 155 153 /** 156 154 * autocompletePaidOrders … … 167 165 } 168 166 } elseif ($mode == 'virtual') { 169 add_filter( 'woocommerce_payment_complete_order_status', 'autocompleteVirtualOrders', 10, 2);167 add_filter( 'woocommerce_payment_complete_order_status', 'autocompleteVirtualOrders', 10, 2 ); 170 168 /** 171 169 * autocompleteVirtualOrders … … 202 200 new MG_Woo_Extra_Options(); 203 201 } 204 } elseif (defined('WOOCOMMERCE_VERSION') && version_compare(WOOCOMMERCE_VERSION, '2.1', '<')) {205 wc_add_notice(sprintf(__("This plugin requires WooCommerce 2.1 or higher!", "wooExtraOptions" ), 'error'));206 202 } else { 207 203 /**
Note: See TracChangeset
for help on using the changeset viewer.