WordPress Backup & Security Plugin – BlogVault - Version 4.25

Version Description

  • Woocommerce Compatibility upto version 4.0
Download this release

Release Info

Developer ritesh.soni36
Plugin Icon 128x128 WordPress Backup & Security Plugin – BlogVault
Version 4.25
Comparing to
See all releases

Code changes from version 4.22 to 4.25

Files changed (5) hide show
  1. blogvault.php +2 -2
  2. callback/wings/misc.php +34 -2
  3. info.php +2 -2
  4. readme.txt +4 -1
  5. wp_dynsync.php +86 -2
blogvault.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://blogvault.net
5
  Description: Easiest way to backup & secure your WordPress site
6
  Author: Backup by BlogVault
7
  Author URI: https://blogvault.net
8
- Version: 4.22
9
  Network: True
10
  */
11
 
@@ -142,4 +142,4 @@ if ((array_key_exists('bvplugname', $_REQUEST)) && ($_REQUEST['bvplugname'] == "
142
  $dynsync->init();
143
  }
144
 
145
- }
5
  Description: Easiest way to backup & secure your WordPress site
6
  Author: Backup by BlogVault
7
  Author URI: https://blogvault.net
8
+ Version: 4.25
9
  Network: True
10
  */
11
 
142
  $dynsync->init();
143
  }
144
 
145
+ }
callback/wings/misc.php CHANGED
@@ -16,6 +16,38 @@ class BVMiscCallback extends BVCallbackBase {
16
  $this->bvinfo = new BVInfo($callback_handler->settings);
17
  }
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  public function process($request) {
20
  $bvinfo = $this->bvinfo;
21
  $settings = $this->settings;
@@ -53,10 +85,10 @@ class BVMiscCallback extends BVCallbackBase {
53
  $resp = array("unsetdynplug" => $settings->getOption('bvdynplug'));
54
  break;
55
  case "wpupplgs":
56
- $resp = array("wpupdateplugins" => wp_update_plugins());
57
  break;
58
  case "wpupthms":
59
- $resp = array("wpupdatethemes" => wp_update_themes());
60
  break;
61
  case "wpupcre":
62
  $resp = array("wpupdatecore" => wp_version_check());
16
  $this->bvinfo = new BVInfo($callback_handler->settings);
17
  }
18
 
19
+ public function refreshPluginUpdates() {
20
+ global $wp_current_filter;
21
+ $wp_current_filter[] = 'load-update-core.php';
22
+ if (function_exists('wp_clean_update_cache')) {
23
+ wp_clean_update_cache();
24
+ }
25
+
26
+ wp_update_plugins();
27
+
28
+ array_pop($wp_current_filter);
29
+
30
+ wp_update_plugins();
31
+
32
+ return array("wpupdateplugins" => true);
33
+ }
34
+
35
+ public function refreshThemeUpdates() {
36
+ global $wp_current_filter;
37
+ $wp_current_filter[] = 'load-update-core.php';
38
+ if (function_exists('wp_clean_update_cache')) {
39
+ wp_clean_update_cache();
40
+ }
41
+
42
+ wp_update_themes();
43
+
44
+ array_pop($wp_current_filter);
45
+
46
+ wp_update_themes();
47
+
48
+ return array("wpupdatethemes" => true);
49
+ }
50
+
51
  public function process($request) {
52
  $bvinfo = $this->bvinfo;
53
  $settings = $this->settings;
85
  $resp = array("unsetdynplug" => $settings->getOption('bvdynplug'));
86
  break;
87
  case "wpupplgs":
88
+ $resp = $this->refreshPluginUpdates();
89
  break;
90
  case "wpupthms":
91
+ $resp = $this->refreshThemeUpdates();
92
  break;
93
  case "wpupcre":
94
  $resp = array("wpupdatecore" => wp_version_check());
info.php CHANGED
@@ -9,7 +9,7 @@ if (!class_exists('BVInfo')) :
9
  public $badgeinfo = 'bvbadge';
10
  public $ip_header_option = 'bvipheader';
11
  public $brand_option = 'bvbrand';
12
- public $version = '4.22';
13
  public $webpage = 'https://blogvault.net';
14
  public $appurl = 'https://app.blogvault.net';
15
  public $slug = 'blogvault-real-time-backup/blogvault.php';
@@ -99,4 +99,4 @@ if (!class_exists('BVInfo')) :
99
  );
100
  }
101
  }
102
- endif;
9
  public $badgeinfo = 'bvbadge';
10
  public $ip_header_option = 'bvipheader';
11
  public $brand_option = 'bvbrand';
12
+ public $version = '4.25';
13
  public $webpage = 'https://blogvault.net';
14
  public $appurl = 'https://app.blogvault.net';
15
  public $slug = 'blogvault-real-time-backup/blogvault.php';
99
  );
100
  }
101
  }
102
+ endif;
readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link: https://app.blogvault.net/home/signup
6
  Requires at least: 4.0
7
  Tested up to: 5.4
8
  Requires PHP: 5.4.0
9
- Stable tag: 4.22
10
  License: GPLv2 or later
11
  License URI: [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
12
 
@@ -240,6 +240,9 @@ Thank you. We really appreciate these kind words, and it makes our day. We would
240
  9. We power WordPress migration for WPEngine, Pantheon, FlyWheel, LiquidWeb, Cloudways, Savvii and many more. Need we say more?
241
 
242
  == CHANGELOG ==
 
 
 
243
  = 4.22 =
244
  * Sending plugname in request to backend servers
245
 
6
  Requires at least: 4.0
7
  Tested up to: 5.4
8
  Requires PHP: 5.4.0
9
+ Stable tag: 4.25
10
  License: GPLv2 or later
11
  License URI: [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
12
 
240
  9. We power WordPress migration for WPEngine, Pantheon, FlyWheel, LiquidWeb, Cloudways, Savvii and many more. Need we say more?
241
 
242
  == CHANGELOG ==
243
+ = 4.25 =
244
+ * Woocommerce Compatibility upto version 4.0
245
+
246
  = 4.22 =
247
  * Sending plugname in request to backend servers
248
 
wp_dynsync.php CHANGED
@@ -427,6 +427,67 @@ class BVWPDynSync {
427
  $this->add_db_event('woocommerce_attribute_taxonomies', array('attribute_id' => $id));
428
  }
429
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
430
 
431
  /* ADDING ACTION AND LISTENERS FOR CAPTURING EVENTS. */
432
  public function add_actions_and_listeners() {
@@ -555,7 +616,6 @@ class BVWPDynSync {
555
  add_action('updated_payment_token_meta', array($this, 'woocommerce_payment_token_meta_handler'), 10, 4);
556
  add_action('deleted_payment_token_meta', array($this, 'woocommerce_payment_token_meta_handler'), 10, 4);
557
 
558
-
559
  add_action('woocommerce_shipping_zone_method_added', array($this, 'woocommerce_shipping_zone_method_added_handler'), 10, 3);
560
  add_action('woocommerce_shipping_zone_method_status_toggled', array($this, 'woocommerce_shipping_zone_method_status_toggled_handler'), 10, 4);
561
  add_action('woocommerce_shipping_zone_method_deleted', array($this, 'woocommerce_shipping_zone_method_deleted_handler'), 10, 3);
@@ -565,7 +625,31 @@ class BVWPDynSync {
565
 
566
  add_action('woocommerce_api_create_product_attribute', array($this, 'woocommerce_api_product_attribute_handler'), 10, 2);
567
  add_action('woocommerce_api_edit_product_attribute', array($this, 'woocommerce_api_product_attribute_handler'), 10, 2);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
568
  }
569
  }
570
  }
571
- endif;
427
  $this->add_db_event('woocommerce_attribute_taxonomies', array('attribute_id' => $id));
428
  }
429
 
430
+ function woocommerce_note_created_handler($note_id) {
431
+ $this->add_db_event('wc_admin_notes', array('note_id' => $note_id));
432
+ $this->add_db_event('wc_admin_note_actions', array('note_id' => $note_id));
433
+ }
434
+
435
+ function woocommerce_note_modification_handler($note_id) {
436
+ if (current_filter() == 'wooocommerce_note_deleted')
437
+ $msg_type = 'delete';
438
+ else
439
+ $msg_type = 'edit';
440
+ $this->add_db_event('wc_admin_notes', array('note_id' => $note_id, 'msg_type' => $msg_type));
441
+ $this->add_db_event('wc_admin_note_actions', array('note_id' => $note_id, 'msg_type' => $msg_type));
442
+ }
443
+
444
+ function woocommerce_analytics_order_stats_modification_handler($order_id) {
445
+ if (current_filter() == 'woocommerce_analytics_delete_order_stats')
446
+ $msg_type = 'delete';
447
+ else
448
+ $msg_type = 'edit';
449
+ $this->add_db_event('wc_order_stats', array('order_id' => $order_id, 'msg_type' => $msg_type));
450
+ }
451
+
452
+ function woocommerce_analytics_product_update_handler($order_item_id, $order_id) {
453
+ $this->add_db_event('wc_order_product_lookup', array('order_item_id' => $order_item_id, 'msg_type' => 'edit'));
454
+ }
455
+
456
+ function woocommerce_analytics_product_delete_handler($order_item_id, $order_id) {
457
+ $this->add_db_event('wc_order_product_lookup', array('order_id' => $order_id, 'msg_type' => 'delete'));
458
+ }
459
+
460
+ function woocommerce_analytics_new_customer_handler($customer_id) {
461
+ $this->add_db_event('wc_customer_lookup', array('customer_id' => $customer_id));
462
+ }
463
+
464
+ function woocommerce_analytics_customer_modification_handler($customer_id) {
465
+ if (current_filter() == 'woocommerce_analytics_delete_customer')
466
+ $msg_type = 'delete';
467
+ else
468
+ $msg_type = 'edit';
469
+ $this->add_db_event('wc_customer_lookup', array('customer_id' => $customer_id, 'msg_type' => $msg_type));
470
+ }
471
+
472
+ function woocommerce_analytics_coupon_update_handler($coupon_id, $order_id) {
473
+ $this->add_db_event('wc_order_coupon_lookup', array('coupon_id' => $coupon_id, 'order_id' => $order_id, 'msg_type' => 'edit'));
474
+ }
475
+
476
+ function woocommerce_analytics_coupon_delete_handler($coupon_id, $order_id) {
477
+ $this->add_db_event('wc_order_coupon_lookup', array('order_id' => $order_id, 'msg_type' => 'delete'));
478
+ }
479
+
480
+ function woocommerce_analytics_tax_update_handler($tax_rate_id, $order_id) {
481
+ $this->add_db_event('wc_order_tax_lookup', array('tax_rate_id' => $tax_rate_id, 'order_id' => $order_id, 'msg_type' => 'edit'));
482
+ }
483
+
484
+ function woocommerce_analytics_tax_delete_handler($tax_rate_id, $order_id) {
485
+ $this->add_db_event('wc_order_tax_lookup', array('order_id' => $order_id, 'msg_type' => 'delete'));
486
+ }
487
+
488
+ function woocommerce_product_update_handler($product_id) {
489
+ $this->add_db_event('wc_product_meta_lookup', array('product_id' => $product_id, 'msg_type' => 'edit'));
490
+ }
491
 
492
  /* ADDING ACTION AND LISTENERS FOR CAPTURING EVENTS. */
493
  public function add_actions_and_listeners() {
616
  add_action('updated_payment_token_meta', array($this, 'woocommerce_payment_token_meta_handler'), 10, 4);
617
  add_action('deleted_payment_token_meta', array($this, 'woocommerce_payment_token_meta_handler'), 10, 4);
618
 
 
619
  add_action('woocommerce_shipping_zone_method_added', array($this, 'woocommerce_shipping_zone_method_added_handler'), 10, 3);
620
  add_action('woocommerce_shipping_zone_method_status_toggled', array($this, 'woocommerce_shipping_zone_method_status_toggled_handler'), 10, 4);
621
  add_action('woocommerce_shipping_zone_method_deleted', array($this, 'woocommerce_shipping_zone_method_deleted_handler'), 10, 3);
625
 
626
  add_action('woocommerce_api_create_product_attribute', array($this, 'woocommerce_api_product_attribute_handler'), 10, 2);
627
  add_action('woocommerce_api_edit_product_attribute', array($this, 'woocommerce_api_product_attribute_handler'), 10, 2);
628
+
629
+ add_action('woocommerce_note_created', array($this, 'woocommerce_note_created_handler'), 10, 1);
630
+ add_action('woocommerce_note_updated', array($this, 'woocommerce_note_modification_handler'), 10, 1);
631
+ add_action('woocommerce_note_deleted', array($this, 'woocommerce_note_modification_handler'), 10, 1);
632
+
633
+ add_action('woocommerce_analytics_update_order_stats', array($this, 'woocommerce_analytics_order_stats_modification_handler'), 10, 1);
634
+ add_action('woocommerce_analytics_delete_order_stats', array($this, 'woocommerce_analytics_order_stats_modification_handler'), 10, 1);
635
+
636
+ add_action('woocommerce_analytics_update_product', array($this, 'woocommerce_analytics_product_update_handler'), 10, 2);
637
+ add_action('woocommerce_analytics_delete_product', array($this, 'woocommerce_analytics_product_delete_handler'), 10, 2);
638
+
639
+ add_action('woocommerce_analytics_new_customer', array($this, 'woocommerce_analytics_new_customer_handler'), 10, 1);
640
+ add_action('woocommerce_analytics_update_customer', array($this, 'woocommerce_analytics_customer_modification_handler'), 10, 1);
641
+ add_action('woocommerce_analytics_delete_customer', array($this, 'woocommerce_analytics_customer_modification_handler'), 10, 1);
642
+
643
+ add_action('woocommerce_analytics_update_coupon', array($this, 'woocommerce_analytics_coupon_update_handler'), 10, 2);
644
+ add_action('woocommerce_analytics_delete_coupon', array($this, 'woocommerce_analytics_coupon_delete_handler'), 10, 2);
645
+
646
+ add_action('woocommerce_analytics_update_tax', array($this, 'woocommerce_analytics_tax_update_handler'), 10, 2);
647
+ add_action('woocommerce_analytics_delete_tax', array($this, 'woocommerce_analytics_tax_delete_handler'), 10, 2);
648
+
649
+ add_action('woocommerce_updated_product_stock', array($this, 'woocommerce_product_update_handler'), 10, 1);
650
+ add_action('woocommerce_updated_product_sales', array($this, 'woocommerce_product_update_handler'), 10, 1);
651
+ add_action('woocommerce_updated_product_price', array($this, 'woocommerce_product_update_handler'), 10, 1);
652
  }
653
  }
654
  }
655
+ endif;