Plugin Directory

Changeset 2697831


Ignore:
Timestamp:
03/22/2022 04:36:02 PM (4 years ago)
Author:
Genoo
Message:

Release 1.7.31

Location:
wpmktgengine-extension-woocommerce
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wpmktgengine-extension-woocommerce/tags/1.7.31/readme.txt

    r2697800 r2697831  
    66License: GPLv2 or later
    77License URI: http://www.gnu.org/licenses/gpl-2.0.html
    8 Stable tag: 1.7.30
     8Stable tag: 1.7.31
    99
    1010Understand how your leads and customers are participating with your ecommerce.
  • wpmktgengine-extension-woocommerce/tags/1.7.31/wpmktgengine-woocommerce.php

    r2697800 r2697831  
    66    Author URI: http://www.genoo.com/
    77    Author Email: info@genoo.com
    8     Version: 1.7.30
     8    Version: 1.7.31
    99    License: GPLv2
    1010    WC requires at least: 3.0.0
     
    402402                        }
    403403                    }
    404                     echo '<script type="text/javascript">
    405                     var ajaxwoocommerceurl = "' .admin_url("admin-ajax.php") .'";
    406                   </script>';
    407                     wp_enqueue_style(
    408                         'activitystyle',
    409                         plugins_url('/includes/activitystreamtypes.css', __FILE__)
    410                     );
    411                
    412                     wp_enqueue_script(
    413                         'activity-script',
    414                         plugins_url('/includes/activitystream.js', __FILE__, [], '1.0.0', true)
    415                     );
     404             
    416405                },
    417406                10,
     
    35443533
    35453534
    3546 add_action('wp_ajax_woocommerce_activity_stream_types','woocommerce_activity_stream_types');
    3547 add_action('wp_ajax_woocommerce_delete_plugin_options','woocommerce_delete_plugin_options');
    3548 function woocommerce_activity_stream_types()
    3549 {
    3550     if (
    3551         class_exists("\WPME\ApiFactory") &&
    3552         class_exists("\WPME\RepositorySettingsFactory")
    3553     ) {
    3554         $activate = true;
    3555         $repo = new \WPME\RepositorySettingsFactory();
    3556         $api = new \WPME\ApiFactory($repo);
    3557         if (class_exists("\Genoo\Api")) {
    3558             $isGenoo = true;
    3559         }
    3560     } elseif (
    3561         class_exists("\Genoo\Api") &&
    3562         class_exists("\Genoo\RepositorySettings")
    3563     ) {
    3564         $activate = true;
    3565         $repo = new \Genoo\RepositorySettings();
    3566         $api = new \Genoo\Api($repo);
    3567         $isGenoo = true;
    3568     } elseif (
    3569         class_exists("\WPMKTENGINE\Api") &&
    3570         class_exists("\WPMKTENGINE\RepositorySettings")
    3571     ) {
    3572         $activate = true;
    3573         $repo = new \WPMKTENGINE\RepositorySettings();
    3574         $api = new \WPMKTENGINE\Api($repo);
    3575     }
    3576     try {
    3577         $api->setStreamTypes([
    3578 
    3579             [
    3580 
    3581                 'name' => 'viewed product',
    3582 
    3583                 'description' => '',
    3584 
    3585             ],
    3586 
    3587             [
    3588 
    3589                 'name' => 'added product to cart',
    3590 
    3591                 'description' => '',
    3592 
    3593             ],
    3594 
    3595             [
    3596 
    3597                 'name' => 'order completed',
    3598 
    3599                 'description' => '',
    3600 
    3601             ],
    3602 
    3603             [
    3604 
    3605                 'name' => 'order canceled',
    3606 
    3607                 'description' => '',
    3608 
    3609             ],
    3610 
    3611             [
    3612 
    3613                 'name' => 'cart emptied',
    3614 
    3615                 'description' => '',
    3616 
    3617             ],
    3618 
    3619             [
    3620 
    3621                 'name' => 'order refund full',
    3622 
    3623                 'description' => '',
    3624 
    3625             ],
    3626 
    3627             [
    3628 
    3629                 'name' => 'order refund partial',
    3630 
    3631                 'description' => '',
    3632 
    3633             ],
    3634 
    3635             [
    3636 
    3637                 'name' => 'new cart',
    3638 
    3639                 'description' => '',
    3640 
    3641             ],
    3642 
    3643             [
    3644 
    3645                 'name' => 'new order',
    3646 
    3647                 'description' => '',
    3648 
    3649             ],
    3650 
    3651             [
    3652 
    3653                 'name' => 'order cancelled',
    3654 
    3655                 'description' => '',
    3656 
    3657             ],
    3658 
    3659             [
    3660 
    3661                 'name' => 'order refund full',
    3662 
    3663                 'description' => '',
    3664 
    3665             ],
    3666 
    3667             [
    3668 
    3669                 'name' => 'order refund partial',
    3670 
    3671                 'description' => '',
    3672 
    3673             ],
    3674 
    3675 
    3676 
    3677             [
    3678 
    3679                 'name' => 'upsell purchased',
    3680 
    3681                 'description' => 'Upsell Purchased',
    3682 
    3683             ],
    3684 
    3685             [
    3686 
    3687                 'name' => 'order payment declined',
    3688 
    3689                 'description' => '',
    3690 
    3691             ],
    3692 
    3693             [
    3694 
    3695                 'name' => 'completed order',
    3696 
    3697                 'description' => '',
    3698 
    3699             ],
    3700 
    3701             [
    3702 
    3703                 'name' => 'subscription started',
    3704 
    3705                 'description' => '',
    3706 
    3707             ],
    3708 
    3709             [
    3710 
    3711                 'name' => 'subscription payment',
    3712 
    3713                 'description' => '',
    3714 
    3715             ],
    3716 
    3717             [
    3718 
    3719                 'name' => 'subscription renewal',
    3720 
    3721                 'description' => '',
    3722 
    3723             ],
    3724 
    3725             [
    3726 
    3727                 'name' => 'subscription reactivated',
    3728 
    3729                 'description' => '',
    3730 
    3731             ],
    3732 
    3733             [
    3734 
    3735                 'name' => 'subscription payment declined',
    3736 
    3737                 'description' => '',
    3738 
    3739             ],
    3740 
    3741             [
    3742 
    3743                 'name' => 'subscription payment cancelled',
    3744 
    3745                 'description' => '',
    3746 
    3747             ],
    3748 
    3749             [
    3750 
    3751                 'name' => 'subscription expired',
    3752 
    3753                 'description' => '',
    3754 
    3755             ],
    3756 
    3757             [
    3758 
    3759                 'name' => 'sub renewal failed',
    3760 
    3761                 'description' => '',
    3762 
    3763             ],
    3764 
    3765             [
    3766 
    3767                 'name' => 'sub payment failed',
    3768 
    3769                 'description' => '',
    3770 
    3771             ],
    3772 
    3773             [
    3774 
    3775                 'name' => 'subscription on hold',
    3776 
    3777                 'description' => '',
    3778 
    3779             ],
    3780 
    3781             [
    3782 
    3783                 'name' => 'cancelled order',
    3784 
    3785                 'description' => '',
    3786 
    3787             ],
    3788 
    3789             [
    3790 
    3791                 'name' => 'subscription cancelled',
    3792 
    3793                 'description' => '',
    3794 
    3795             ],
    3796 
    3797             [
    3798 
    3799                 'name' => 'Subscription Pending Cancellation',
    3800 
    3801                 'description' => '',
    3802 
    3803             ],
    3804 
    3805         ]);
    3806 
    3807     } catch (\Exception $e) {
    3808         // Decide later Sub Renewal Failed
    3809     }
    3810 }
    3811 add_action("plugins_loaded", "woocommerce_update_db_check");
    3812 function woocommerce_update_db_check()
    3813 {
    3814     $option_value = get_option("plugin_file_updated");
    3815     if ($option_value == "yes") {
    3816         add_action("admin_notices", "sample_admin_notice_woocommerce_success");
    3817     }
    3818 }
    3819 function woocommerce_delete_plugin_options()
    3820 {
    3821     delete_option('plugin_file_updated');
    3822 }
    3823 
    3824        
    3825    
    3826     function woocommerce_wp_upgrade_completed( $upgrader_object, $options ) {
    3827         // The path to our plugin's main file
    3828         $our_plugin = plugin_basename( __FILE__ );
    3829         // If an update has taken place and the updated type is plugins and the plugins element exists
    3830         if( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {
    3831          // Iterate through the plugins being updated and check if ours is there
    3832          foreach( $options['plugins'] as $plugin ) {
    3833           if( $plugin == $our_plugin ) {
    3834            // Your action if it is your plugin
    3835            update_option("plugin_file_updated", "yes");
    3836           }
    3837          }
    3838         }
    3839        }
    3840        add_action( 'upgrader_process_complete', 'woocommerce_wp_upgrade_completed', 10, 2 );
    3841        function sample_admin_notice_woocommerce_success()
    3842        {
    3843          ?>
    3844        <div class="notice notice-success is-dismissible woo-extension-notification">
    3845               <span><p><b>WooCommerce - WPMktgEngine | Genoo Extension update required</b></p> <p>WooCommerce extension has been updated. Update the woocommerce extension activity stream types.</p></span>
    3846            <span class="action-button-area">
    3847        <a class="clickoption button button-primary">Update Database</a>
    3848        </span>
    3849        </div>
    3850            <?php
    3851        }
  • wpmktgengine-extension-woocommerce/trunk/readme.txt

    r2697800 r2697831  
    66License: GPLv2 or later
    77License URI: http://www.gnu.org/licenses/gpl-2.0.html
    8 Stable tag: 1.7.30
     8Stable tag: 1.7.31
    99
    1010Understand how your leads and customers are participating with your ecommerce.
  • wpmktgengine-extension-woocommerce/trunk/wpmktgengine-woocommerce.php

    r2697800 r2697831  
    66    Author URI: http://www.genoo.com/
    77    Author Email: info@genoo.com
    8     Version: 1.7.30
     8    Version: 1.7.31
    99    License: GPLv2
    1010    WC requires at least: 3.0.0
     
    402402                        }
    403403                    }
    404                     echo '<script type="text/javascript">
    405                     var ajaxwoocommerceurl = "' .admin_url("admin-ajax.php") .'";
    406                   </script>';
    407                     wp_enqueue_style(
    408                         'activitystyle',
    409                         plugins_url('/includes/activitystreamtypes.css', __FILE__)
    410                     );
    411                
    412                     wp_enqueue_script(
    413                         'activity-script',
    414                         plugins_url('/includes/activitystream.js', __FILE__, [], '1.0.0', true)
    415                     );
     404             
    416405                },
    417406                10,
     
    35443533
    35453534
    3546 add_action('wp_ajax_woocommerce_activity_stream_types','woocommerce_activity_stream_types');
    3547 add_action('wp_ajax_woocommerce_delete_plugin_options','woocommerce_delete_plugin_options');
    3548 function woocommerce_activity_stream_types()
    3549 {
    3550     if (
    3551         class_exists("\WPME\ApiFactory") &&
    3552         class_exists("\WPME\RepositorySettingsFactory")
    3553     ) {
    3554         $activate = true;
    3555         $repo = new \WPME\RepositorySettingsFactory();
    3556         $api = new \WPME\ApiFactory($repo);
    3557         if (class_exists("\Genoo\Api")) {
    3558             $isGenoo = true;
    3559         }
    3560     } elseif (
    3561         class_exists("\Genoo\Api") &&
    3562         class_exists("\Genoo\RepositorySettings")
    3563     ) {
    3564         $activate = true;
    3565         $repo = new \Genoo\RepositorySettings();
    3566         $api = new \Genoo\Api($repo);
    3567         $isGenoo = true;
    3568     } elseif (
    3569         class_exists("\WPMKTENGINE\Api") &&
    3570         class_exists("\WPMKTENGINE\RepositorySettings")
    3571     ) {
    3572         $activate = true;
    3573         $repo = new \WPMKTENGINE\RepositorySettings();
    3574         $api = new \WPMKTENGINE\Api($repo);
    3575     }
    3576     try {
    3577         $api->setStreamTypes([
    3578 
    3579             [
    3580 
    3581                 'name' => 'viewed product',
    3582 
    3583                 'description' => '',
    3584 
    3585             ],
    3586 
    3587             [
    3588 
    3589                 'name' => 'added product to cart',
    3590 
    3591                 'description' => '',
    3592 
    3593             ],
    3594 
    3595             [
    3596 
    3597                 'name' => 'order completed',
    3598 
    3599                 'description' => '',
    3600 
    3601             ],
    3602 
    3603             [
    3604 
    3605                 'name' => 'order canceled',
    3606 
    3607                 'description' => '',
    3608 
    3609             ],
    3610 
    3611             [
    3612 
    3613                 'name' => 'cart emptied',
    3614 
    3615                 'description' => '',
    3616 
    3617             ],
    3618 
    3619             [
    3620 
    3621                 'name' => 'order refund full',
    3622 
    3623                 'description' => '',
    3624 
    3625             ],
    3626 
    3627             [
    3628 
    3629                 'name' => 'order refund partial',
    3630 
    3631                 'description' => '',
    3632 
    3633             ],
    3634 
    3635             [
    3636 
    3637                 'name' => 'new cart',
    3638 
    3639                 'description' => '',
    3640 
    3641             ],
    3642 
    3643             [
    3644 
    3645                 'name' => 'new order',
    3646 
    3647                 'description' => '',
    3648 
    3649             ],
    3650 
    3651             [
    3652 
    3653                 'name' => 'order cancelled',
    3654 
    3655                 'description' => '',
    3656 
    3657             ],
    3658 
    3659             [
    3660 
    3661                 'name' => 'order refund full',
    3662 
    3663                 'description' => '',
    3664 
    3665             ],
    3666 
    3667             [
    3668 
    3669                 'name' => 'order refund partial',
    3670 
    3671                 'description' => '',
    3672 
    3673             ],
    3674 
    3675 
    3676 
    3677             [
    3678 
    3679                 'name' => 'upsell purchased',
    3680 
    3681                 'description' => 'Upsell Purchased',
    3682 
    3683             ],
    3684 
    3685             [
    3686 
    3687                 'name' => 'order payment declined',
    3688 
    3689                 'description' => '',
    3690 
    3691             ],
    3692 
    3693             [
    3694 
    3695                 'name' => 'completed order',
    3696 
    3697                 'description' => '',
    3698 
    3699             ],
    3700 
    3701             [
    3702 
    3703                 'name' => 'subscription started',
    3704 
    3705                 'description' => '',
    3706 
    3707             ],
    3708 
    3709             [
    3710 
    3711                 'name' => 'subscription payment',
    3712 
    3713                 'description' => '',
    3714 
    3715             ],
    3716 
    3717             [
    3718 
    3719                 'name' => 'subscription renewal',
    3720 
    3721                 'description' => '',
    3722 
    3723             ],
    3724 
    3725             [
    3726 
    3727                 'name' => 'subscription reactivated',
    3728 
    3729                 'description' => '',
    3730 
    3731             ],
    3732 
    3733             [
    3734 
    3735                 'name' => 'subscription payment declined',
    3736 
    3737                 'description' => '',
    3738 
    3739             ],
    3740 
    3741             [
    3742 
    3743                 'name' => 'subscription payment cancelled',
    3744 
    3745                 'description' => '',
    3746 
    3747             ],
    3748 
    3749             [
    3750 
    3751                 'name' => 'subscription expired',
    3752 
    3753                 'description' => '',
    3754 
    3755             ],
    3756 
    3757             [
    3758 
    3759                 'name' => 'sub renewal failed',
    3760 
    3761                 'description' => '',
    3762 
    3763             ],
    3764 
    3765             [
    3766 
    3767                 'name' => 'sub payment failed',
    3768 
    3769                 'description' => '',
    3770 
    3771             ],
    3772 
    3773             [
    3774 
    3775                 'name' => 'subscription on hold',
    3776 
    3777                 'description' => '',
    3778 
    3779             ],
    3780 
    3781             [
    3782 
    3783                 'name' => 'cancelled order',
    3784 
    3785                 'description' => '',
    3786 
    3787             ],
    3788 
    3789             [
    3790 
    3791                 'name' => 'subscription cancelled',
    3792 
    3793                 'description' => '',
    3794 
    3795             ],
    3796 
    3797             [
    3798 
    3799                 'name' => 'Subscription Pending Cancellation',
    3800 
    3801                 'description' => '',
    3802 
    3803             ],
    3804 
    3805         ]);
    3806 
    3807     } catch (\Exception $e) {
    3808         // Decide later Sub Renewal Failed
    3809     }
    3810 }
    3811 add_action("plugins_loaded", "woocommerce_update_db_check");
    3812 function woocommerce_update_db_check()
    3813 {
    3814     $option_value = get_option("plugin_file_updated");
    3815     if ($option_value == "yes") {
    3816         add_action("admin_notices", "sample_admin_notice_woocommerce_success");
    3817     }
    3818 }
    3819 function woocommerce_delete_plugin_options()
    3820 {
    3821     delete_option('plugin_file_updated');
    3822 }
    3823 
    3824        
    3825    
    3826     function woocommerce_wp_upgrade_completed( $upgrader_object, $options ) {
    3827         // The path to our plugin's main file
    3828         $our_plugin = plugin_basename( __FILE__ );
    3829         // If an update has taken place and the updated type is plugins and the plugins element exists
    3830         if( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {
    3831          // Iterate through the plugins being updated and check if ours is there
    3832          foreach( $options['plugins'] as $plugin ) {
    3833           if( $plugin == $our_plugin ) {
    3834            // Your action if it is your plugin
    3835            update_option("plugin_file_updated", "yes");
    3836           }
    3837          }
    3838         }
    3839        }
    3840        add_action( 'upgrader_process_complete', 'woocommerce_wp_upgrade_completed', 10, 2 );
    3841        function sample_admin_notice_woocommerce_success()
    3842        {
    3843          ?>
    3844        <div class="notice notice-success is-dismissible woo-extension-notification">
    3845               <span><p><b>WooCommerce - WPMktgEngine | Genoo Extension update required</b></p> <p>WooCommerce extension has been updated. Update the woocommerce extension activity stream types.</p></span>
    3846            <span class="action-button-area">
    3847        <a class="clickoption button button-primary">Update Database</a>
    3848        </span>
    3849        </div>
    3850            <?php
    3851        }
Note: See TracChangeset for help on using the changeset viewer.