Changeset 1045306
- Timestamp:
- 12/15/2014 10:45:45 PM (11 years ago)
- Location:
- woocommerce-autocomplete-order/tags/1.0
- Files:
-
- 2 edited
-
readme.txt (modified) (4 diffs)
-
woocommerce-autocomplete-order.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-autocomplete-order/tags/1.0/readme.txt
r1025646 r1045306 4 4 Tags: WooCommerce, order, complete, virtual, autocomplete 5 5 Requires at least: 3.3 6 Tested up to: 4.0. 07 Stable tag: 1. 06 Tested up to: 4.0.1 7 Stable tag: 1.1 8 8 License: GNU General Public License v3.0 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 14 14 15 15 WooCommerce by design allows to automatically mark as "Compelted" only orders for products marked as both "Virtual" and "Downloadable". This plugin actually extend this feature through 3 different modes: 16 17 * Virtual Paid Products Only: order for products marked as "Virtual" will be turned to "Completed" upon successfull payment. 18 * All Paid Products: orders for any product are turned to "Completed" upon successfull payment. 19 * All Products: each and every order is turned to "Completed" irrespective for the payment method and whether or not the payment happened. 16 * Virtual Paid Products Only: order for products marked as "Virtual" will be turned to "Completed" upon successfull payment. 17 * All Paid Products: orders for any product are turned to "Completed" upon successfull payment. 18 * All Products: each and every order is turned to "Completed" irrespective for the payment method and whether or not the payment happened. 20 19 Please be aware that the third mode allows the customer to immediately access the product (if downloadable, for example) whether or not the payment was performed. 21 20 22 21 == Installation == 23 22 23 1. Ensure you have WooCommerce 2.1 or higher installed and active 24 24 1. Upload the plugin's folder to the `/wp-content/plugins/` directory 25 25 1. Activate the plugin through the 'Plugins' menu in WordPress 26 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 26 1. Open WooCommerce > Settings > Woo Extra Options 27 1. Pick an option from the dropdown within the section named "Autocomplete Orders" 27 28 28 29 == Screenshots == … … 34 35 35 36 = The plugin is not working = 36 Please ensure that you picked the right mode from the list. 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 37 40 38 41 = Uh-uh, still not working! = … … 42 45 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! 43 46 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" checked 49 44 50 == Changelog == 45 51 52 = 1.1 = 53 * Added compatibility with WooCommerce Product Bundles 54 * Fixed PHP Warning and Notices 55 46 56 = 1.0 = 47 * Plugin completely rewritten to comply with WordPress 4.0 and WooCommerce 2.0.48 * Added 3 different modes to ativate the plugin:49 ** Virtual Paid Products Only: order for products marked as "Virtual" will be turned to "Completed" upon successfull payment.50 ** All Paid Products: orders for any product are turned to "Completed" upon successfull payment.51 ** All Products: each and every order is turned to "Completed" irrespective for the payment method and whether or not the payment happened.52 * Added a settings page (in WooCommerce dashboard) to select the mode we want to activate (under WooCommerce > Settings > Woo Extra Options).53 57 54 58 = v0.1.2 = 55 * Updated compatibility.56 * Added localization support.57 * Added Italian localization.58 * Added Spanish localization.59 * Updated compatibility. 60 * Added localization support. 61 * Added Italian localization. 62 * Added Spanish localization. 59 63 60 64 = v0.1.1 = 61 * Added links to support and the official page.65 * Added links to support and the official page. 62 66 63 67 = v0.1 = 64 * First release.68 * First release. 65 69 66 70 == Upgrade notice == 67 71 68 The plugin has been completely rewritten to meet requirements for WP4 and WooCommerce 2.0.69 A new tab has been added to WooCommerce settings in the Dashboard to select in which mode you want the plugin to work:70 * autocomplete only orders for virtual product71 * autocomplete every order once paid72 * autocomplete every order even if not paid73 Enjoy! -
woocommerce-autocomplete-order/tags/1.0/woocommerce-autocomplete-order.php
r1025567 r1045306 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. 06 Version: 1.1 7 7 Author: Mirko Grewing 8 8 Author URI: http://www.mirkogrewing.it … … 14 14 15 15 if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { 16 load_plugin_textdomain('wooExtraOptions', false, dirname(plugin_basename(__FILE__)) . '/languages/'); 17 if (!class_exists('MG_Woo_Extra_Options')) { 18 /** 19 * MG_Woo_Extra_Options 20 */ 21 class MG_Woo_Extra_Options 22 { 23 /** 24 * $id 25 * holds settings tab id 26 * @var string 27 */ 28 public $id = 'mg_woo_eo'; 29 30 /** 31 * __construct 32 * class constructor will set the needed filter and action hooks 33 */ 34 function __construct() 35 { 36 //add settings tab 37 add_filter( 'woocommerce_settings_tabs_array', array($this,'woocommerce_settings_tabs_array'), 50 ); 38 //show settings tab 39 add_action( 'woocommerce_settings_tabs_'.$this->id, array($this,'show_settings_tab' )); 40 //save settings tab 41 add_action( 'woocommerce_update_options_'.$this->id, array($this,'update_settings_tab' )); 42 //add tabs select field 43 add_action('woocommerce_admin_field_'.$this->post_type,array($this,'show_'.$this->post_type.'_field' ),10); 44 //save tabs select field 45 add_action( 'woocommerce_update_option_'.$this->post_type,array($this,'save_'.$this->post_type.'_field' ),10); 46 //ajax search handler 47 //add_action('wp_ajax_woocommerce_json_custom_tabs', array($this,'woocommerce_json_custom_tabs')); 48 //register_post_type 49 add_action( 'init', array($this,'autocompleteOrders'), 0 ); 50 } 16 load_plugin_textdomain('wooExtraOptions', false, dirname(plugin_basename(__FILE__)) . '/languages/'); 17 if (!class_exists('MG_Woo_Extra_Options')) { 18 /** 19 * Main Loader Class 20 * Used to extend WooCommerce settings. 21 * 22 * @category Class 23 * @package Woocommerce_Autocomplete_Order 24 * @author Mirko Grewing <mirko@grewing.co.uk> 25 * @copyright 2014 Mirko Grewing 26 * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 27 * @version 1.1 28 * @link http://www.nitelab.org/ 29 * @since Class available since Release 0.1 30 * 31 */ 32 class MG_Woo_Extra_Options 33 { 34 /** 35 * $id 36 * holds settings tab id 37 * @var string 38 */ 39 public $id = 'mg_woo_eo'; 40 41 /** 42 * __construct 43 * class constructor will set the needed filter and action hooks 44 */ 45 function __construct() 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 } 59 //ajax search handler 60 //add_action('wp_ajax_woocommerce_json_custom_tabs', array($this,'woocommerce_json_custom_tabs')); 61 //register_post_type 62 add_action('init', array($this,'autocompleteOrders'), 0); 63 } 51 64 52 65 /** … … 93 106 ), 94 107 'title' => array( 95 'name' => __( 'Mode', 'wooExtraOptions'),108 'name' => __('Mode', 'wooExtraOptions'), 96 109 'type' => 'select', 97 'desc' => __( 'Select the type of autocompletion you want to activate.', 'wooExtraOptions'),110 'desc' => __('Select the type of autocompletion you want to activate.', 'wooExtraOptions'), 98 111 'desc_tip' => true, 99 112 'default' => 'off', … … 139 152 } 140 153 } elseif ($mode == 'paid') { 141 add_filter( 'woocommerce_payment_complete_order_status', 'autocompletePaidOrders', 10, 2);154 add_filter('woocommerce_payment_complete_order_status', 'autocompletePaidOrders', 10, 2); 142 155 /** 143 156 * autocompletePaidOrders … … 154 167 } 155 168 } elseif ($mode == 'virtual') { 156 add_filter( 'woocommerce_payment_complete_order_status', 'autocompleteVirtualOrders', 10, 2);169 add_filter('woocommerce_payment_complete_order_status', 'autocompleteVirtualOrders', 10, 2); 157 170 /** 158 171 * autocompleteVirtualOrders … … 189 202 new MG_Woo_Extra_Options(); 190 203 } 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')); 191 206 } else { 192 207 /**
Note: See TracChangeset
for help on using the changeset viewer.