Changeset 2400799
- Timestamp:
- 10/16/2020 09:33:11 AM (5 years ago)
- Location:
- woorule/trunk
- Files:
-
- 4 edited
-
README.md (modified) (1 diff)
-
README.txt (modified) (2 diffs)
-
includes/admin/settings/class-wc-admin-settings-woorule.php (modified) (7 diffs)
-
woorule.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woorule/trunk/README.md
r2354434 r2400799 75 75 ### 1.2 76 76 Bugfixes 77 78 ### 1.3 79 Bugfixes -
woorule/trunk/README.txt
r2360956 r2400799 1 === WooRule === 2 Contributors: lurig, neevalex 3 Tags: rulemailer, woocommerce, newsletter 4 Requires at least: 5.0.0 5 Tested up to: 5.5.0 6 License: MIT 7 License URI: http://opensource.org/licenses/MIT 1 # WooRule 8 2 9 A [Rule Mailer](https://www.rule.se/) integration with WooCommerce.3 A [Rule Communication](https://www.rule.se/) integration with WooCommerce. 10 4 11 == Description == 5 ## Requirements 12 6 13 Subscribe your customers on various order events. 14 Supports multiple and different events. 7 - Wordpress >= 5.1 8 - WooCommerce >= 3.5 15 9 16 == Installation == 10 ## Installation 17 11 18 1. Upload and extract to your `/wp-content/plugins/` directory and activate it from Wordpress Admin panel. 19 Or upload and activate it from wordpress catalog. 12 1. Either download the latest release and upload it to your `/wp-content/plugins/` 13 directory or grab it from [Wordpress Plugin 14 Directory](http://wordpress.org/plugins/woorule/). 20 15 21 2. Go to Woocommerce -> Settings -> Integration -> RuleMailer and fill in an `API Key`, and click 'save' button. You can find your RULE API key inside developer tab in [user account settings](http://app.rule.io/#/settings/developer)16 2. Activate the plugin under the _Plugins_ from Wordpress Admin panel. 22 17 23 == Shortcode == 18 3. Go to _Woocommerce_ -> _Settings_ -> _Integration_ -> _RuleMailer_, fill in your `API Key`, and click the 'save' button. You can find your RULE API key on the developer tab in your [Rule account settings](http://app.rule.io/#/settings/developer). 24 19 25 You can embed a Newsletter sign-up form in your posts, or on any page with a simple shortcode [woorule] 20 ## Usage 21 22 _NOTE: By default WooRule will create the "Defaul Rule" that will trigger the data sync for all new orders, tagged as "New Order"_ 23 24 1. Go to the _RuleMailer tab_ and click _Add new_ and a new Rule appears in the 25 list. 26 27 2. Press _Edit_ on the new Rule. 28 29 3. Give it a good name and fill in the rest according to your _RuleMailer_ setup. 30 31 ### Shortcode 32 33 You can embed a Newsletter sign-up form in your posts, or on any page with a simple shortcode `[woorule]` 26 34 27 You can also customise the subscribe form with the shor code options:28 [woorule text="This is a new title text" button="New submit button text!" success="New Success message"] 35 You can also customise the subscribe form with the shortcode options: 36 `[woorule text="This is a new title text" button="New submit button text!" success="New Success message"]` 29 37 30 38 31 = Usage =32 NOTE: By default WooRule will create the "Defaul Rule" that will trigger the data sync for all new orders, tagged as "New Order"33 1. Enable your plugin34 2. Go to WooCommerce -> Settings -> Integrations -> RuleMailer and submit an API key and URL.35 3. A new tab should appear in the WooCommerce Settings called WooRule (if not, try refresh the page).36 39 37 == Changelog == 40 ### Resources 38 41 39 = 0.0.1 = 40 * Non-public release.42 - [Rule documentation](https://docs.rule.se/). 43 - [WooCommerce](http://docs.woothemes.com/documentation/plugins/woocommerce/). 41 44 42 = 0.2 = 43 * New Version public release 45 ## License 44 46 45 = 0.3 = 46 * Bugfixes 47 Please see [LICENSE.txt](/LICENSE.txt). 47 48 48 = 0.4 = 49 * Bugfix. Missing assets. 49 ## Changelog 50 50 51 = 0.5 = 52 * New features. Bugfixes. Newest WP support 51 ### 0.0.1 52 - Not yet released 53 53 54 = 0.6 = 55 * New features. Bugfixes. 54 ### 0.2 55 New Version public release. (New API, Shortcode, Settings) 56 56 57 = 1.1 = 57 ### 0.3 58 Bugfixes 59 60 ### 0.4 61 Missing Assets 62 63 ### 0.5 64 New features. Bugfixes. Newest WP support 65 66 ### 0.6 67 New features. Bugfixes. 68 69 ### 1.1 58 70 User\order meta fields. 59 71 Default data improvements … … 61 73 Visual Adjustments 62 74 63 = 1.2 = 75 ### 1.2 64 76 Bugfixes 77 78 ### 1.3 79 Bugfixes -
woorule/trunk/includes/admin/settings/class-wc-admin-settings-woorule.php
r2354434 r2400799 42 42 public static function save_checkout_fields($order_id) 43 43 { 44 // @TODO: fix, this is st0pid45 44 foreach ($_POST as $k => $v) { 46 45 if (substr($k, 0, 15) === 'woorule_opt_in_') { … … 125 124 ); 126 125 127 // this is bullshit128 126 $categoriesString = strip_tags(wc_get_product_category_list( 129 127 $item['product_id'], … … 147 145 148 146 $order_data = $order->get_data(); 149 $phone = $order->get_billing_phone();150 147 151 148 // I feel bad for this, but no other methods was working. … … 173 170 174 171 'email' => $order->get_billing_email(), 175 'phone_number' => $order_data['billing']['phone'] ,172 'phone_number' => $order_data['billing']['phone'] ?? '', 176 173 'language' => $language, 177 174 … … 227 224 array( 228 225 'key' => 'Order.Date', 229 'value' => date_format($order->get_date_completed(), "Y/m/d H:i:s") 226 'value' => $order->get_date_completed() 227 ? date_format($order->get_date_completed(), "Y/m/d H:i:s") : '' 230 228 ), 231 229 array( … … 251 249 array( 252 250 'key' => 'Order.Currency', 253 'value' => $order_data['currency'] 251 'value' => $order_data['currency'] ?? '' 254 252 ), 255 253 array( 256 254 'key' => 'Order.PaymentMethod', 257 'value' => $order_data['payment_method'] ,255 'value' => $order_data['payment_method'] ?? '', 258 256 "type" => "multiple" 259 257 ), 260 258 array( 261 259 'key' => 'Order.DeliveryMethod', 262 'value' => $order_data['delivery_method'] ,260 'value' => $order_data['delivery_method'] ?? '', 263 261 "type" => "multiple" 264 262 ), 265 263 array( 266 264 'key' => 'Order.BillingFirstname', 267 'value' => $order_data['billing']['first_name'] 265 'value' => $order_data['billing']['first_name'] ?? '' 268 266 ), 269 267 array( 270 268 'key' => 'Order.BillingLastname', 271 'value' => $order_data['billing']['last_name'] 269 'value' => $order_data['billing']['last_name'] ?? '' 272 270 ), 273 271 array( 274 272 'key' => 'Order.BillingStreet', 275 'value' => $order_data['billing']['address_1'] 273 'value' => $order_data['billing']['address_1'] ?? '' 276 274 ), 277 275 array( 278 276 'key' => 'Order.BillingCity', 279 'value' => $order_data['billing']['city'] 277 'value' => $order_data['billing']['city'] ?? '' 280 278 ), 281 279 array( 282 280 'key' => 'Order.BillingZipcode', 283 'value' => $order_data['billing']['postcode'] 281 'value' => $order_data['billing']['postcode'] ?? '' 284 282 ), 285 283 array( 286 284 'key' => 'Order.BillingState', 287 'value' => $order_data['billing']['state'] 285 'value' => $order_data['billing']['state'] ?? '' 288 286 ), 289 287 array( 290 288 'key' => 'Order.BillingCountry', 291 'value' => $order_data['billing']['country'] 289 'value' => $order_data['billing']['country'] ?? '' 292 290 ), 293 291 array( 294 292 'key' => 'Order.BillingTele', 295 'value' => $order_data['billing']['phone'] 293 'value' => $order_data['billing']['phone'] ?? '' 296 294 ), 297 295 array( 298 296 'key' => 'Order.BillingCompany', 299 'value' => $order_data['billing']['company'] 297 'value' => $order_data['billing']['company'] ?? '' 300 298 ) 301 299 ) … … 622 620 623 621 } 622 -
woorule/trunk/woorule.php
r2354481 r2400799 9 9 * Plugin URI: http://github.com/rulecom/woorule 10 10 * Description: RuleMailer integration for WooCommerce. 11 * Version: 1. 211 * Version: 1.3 12 12 * Author: RuleMailer, Neevalex 13 13 * Author URI: http://rule.se … … 159 159 exit; 160 160 } 161
Note: See TracChangeset
for help on using the changeset viewer.