Plugin Directory

Changeset 3490089


Ignore:
Timestamp:
03/24/2026 02:07:13 PM (10 days ago)
Author:
wanotifier
Message:

v1.0.2

Location:
order-notifications-for-woocommerce
Files:
8 edited
5 copied

Legend:

Unmodified
Added
Removed
  • order-notifications-for-woocommerce/tags/1.0.2/includes/class-wanowc.php

    r3486200 r3490089  
    2020
    2121    private function define_constants() {
    22         $this->define( 'WANOWC_VERSION', '1.0.1' );
     22        $this->define( 'WANOWC_VERSION', '1.0.2' );
    2323        $this->define( 'WANOWC_NAME', 'wanowc' );
    2424        $this->define( 'WANOWC_PREFIX', 'wanowc_' );
  • order-notifications-for-woocommerce/tags/1.0.2/includes/classes/integrations/class-wanowc-wcar.php

    r3485626 r3490089  
    126126                },
    127127            ),
     128            array(
     129                'id'            => 'wcar_first_item_name',
     130                'label'         => 'Abandoned cart first item name',
     131                'preview_value' => '',
     132                'return_type'   => 'text',
     133                'value'         => function ( $checkout_details ) {
     134                    $cart_contents = isset( $checkout_details['cart_contents'] ) ? maybe_unserialize( $checkout_details['cart_contents'] ) : array();
     135                    foreach ( $cart_contents as $item ) {
     136                        if ( ! isset( $item['product_id'] ) ) continue;
     137                        $product = wc_get_product( $item['product_id'] );
     138                        if ( $product ) return $product->get_name();
     139                    }
     140                    return '';
     141                },
     142            ),
     143            array(
     144                'id'            => 'wcar_first_item_price',
     145                'label'         => 'Abandoned cart first item price',
     146                'preview_value' => '',
     147                'return_type'   => 'text',
     148                'value'         => function ( $checkout_details ) {
     149                    $cart_contents = isset( $checkout_details['cart_contents'] ) ? maybe_unserialize( $checkout_details['cart_contents'] ) : array();
     150                    foreach ( $cart_contents as $item ) {
     151                        if ( ! isset( $item['product_id'] ) ) continue;
     152                        $product = wc_get_product( $item['product_id'] );
     153                        if ( $product ) return html_entity_decode( strip_tags( wc_price( $product->get_price() ) ) );
     154                    }
     155                    return '';
     156                },
     157            ),
     158            array(
     159                'id'            => 'wcar_first_item_quantity',
     160                'label'         => 'Abandoned cart first item quantity',
     161                'preview_value' => '',
     162                'return_type'   => 'text',
     163                'value'         => function ( $checkout_details ) {
     164                    $cart_contents = isset( $checkout_details['cart_contents'] ) ? maybe_unserialize( $checkout_details['cart_contents'] ) : array();
     165                    foreach ( $cart_contents as $item ) {
     166                        if ( ! isset( $item['product_id'] ) ) continue;
     167                        return (string) ( $item['quantity'] ?? '' );
     168                    }
     169                    return '';
     170                },
     171            ),
     172            array(
     173                'id'            => 'wcar_first_item_total',
     174                'label'         => 'Abandoned cart first item total',
     175                'preview_value' => '',
     176                'return_type'   => 'text',
     177                'value'         => function ( $checkout_details ) {
     178                    $cart_contents = isset( $checkout_details['cart_contents'] ) ? maybe_unserialize( $checkout_details['cart_contents'] ) : array();
     179                    foreach ( $cart_contents as $item ) {
     180                        if ( ! isset( $item['product_id'] ) ) continue;
     181                        return isset( $item['line_total'] ) ? html_entity_decode( strip_tags( wc_price( $item['line_total'] ) ) ) : '';
     182                    }
     183                    return '';
     184                },
     185            ),
     186            array(
     187                'id'            => 'wcar_first_item_image',
     188                'label'         => 'Abandoned cart first item image URL',
     189                'preview_value' => '',
     190                'return_type'   => 'image',
     191                'value'         => function ( $checkout_details ) {
     192                    $cart_contents = isset( $checkout_details['cart_contents'] ) ? maybe_unserialize( $checkout_details['cart_contents'] ) : array();
     193                    foreach ( $cart_contents as $item ) {
     194                        if ( ! isset( $item['product_id'] ) ) continue;
     195                        $product = wc_get_product( $item['product_id'] );
     196                        if ( $product ) {
     197                            $image_id = $product->get_image_id();
     198                            if ( $image_id ) return wp_get_attachment_url( $image_id );
     199                        }
     200                    }
     201                    return '';
     202                },
     203            ),
    128204        );
    129205
  • order-notifications-for-woocommerce/tags/1.0.2/includes/classes/integrations/class-wanowc-woocommerce.php

    r3485626 r3490089  
    761761                    $coupon_data = $cart_details ? maybe_unserialize($cart_details['coupon_data'] ?? '') : [];
    762762                    return $coupon_data ? implode(', ', $coupon_data) : '';
     763                }
     764            ),
     765            array(
     766                'id'            => 'wca_first_item_name',
     767                'label'         => 'Abandoned cart first item name',
     768                'preview_value' => '',
     769                'return_type'   => 'text',
     770                'value'         => function ($cart_details) {
     771                    $cart_data = $cart_details ? maybe_unserialize($cart_details['cart_data']) : [];
     772                    foreach ($cart_data as $item) {
     773                        if (!isset($item['product_id'])) continue;
     774                        $product = wc_get_product($item['product_id']);
     775                        if ($product) return $product->get_name();
     776                    }
     777                    return '';
     778                }
     779            ),
     780            array(
     781                'id'            => 'wca_first_item_price',
     782                'label'         => 'Abandoned cart first item price',
     783                'preview_value' => '',
     784                'return_type'   => 'text',
     785                'value'         => function ($cart_details) {
     786                    $cart_data = $cart_details ? maybe_unserialize($cart_details['cart_data']) : [];
     787                    foreach ($cart_data as $item) {
     788                        if (!isset($item['product_id'])) continue;
     789                        $product = wc_get_product($item['product_id']);
     790                        if ($product) return html_entity_decode( strip_tags( wc_price( $product->get_price() ) ) );
     791                    }
     792                    return '';
     793                }
     794            ),
     795            array(
     796                'id'            => 'wca_first_item_quantity',
     797                'label'         => 'Abandoned cart first item quantity',
     798                'preview_value' => '',
     799                'return_type'   => 'text',
     800                'value'         => function ($cart_details) {
     801                    $cart_data = $cart_details ? maybe_unserialize($cart_details['cart_data']) : [];
     802                    foreach ($cart_data as $item) {
     803                        if (!isset($item['product_id'])) continue;
     804                        return $item['quantity'] ?? '';
     805                    }
     806                    return '';
     807                }
     808            ),
     809            array(
     810                'id'            => 'wca_first_item_total',
     811                'label'         => 'Abandoned cart first item total',
     812                'preview_value' => '',
     813                'return_type'   => 'text',
     814                'value'         => function ($cart_details) {
     815                    $cart_data = $cart_details ? maybe_unserialize($cart_details['cart_data']) : [];
     816                    foreach ($cart_data as $item) {
     817                        if (!isset($item['product_id'])) continue;
     818                        return isset($item['line_total']) ? html_entity_decode( strip_tags( wc_price( $item['line_total'] ) ) ) : '';
     819                    }
     820                    return '';
     821                }
     822            ),
     823            array(
     824                'id'            => 'wca_first_item_image',
     825                'label'         => 'Abandoned cart first item image URL',
     826                'preview_value' => '',
     827                'return_type'   => 'image',
     828                'value'         => function ($cart_details) {
     829                    $cart_data = $cart_details ? maybe_unserialize($cart_details['cart_data']) : [];
     830                    foreach ($cart_data as $item) {
     831                        if (!isset($item['product_id'])) continue;
     832                        $product = wc_get_product($item['product_id']);
     833                        if ($product) {
     834                            $image_id = $product->get_image_id();
     835                            if ($image_id) return wp_get_attachment_url($image_id);
     836                        }
     837                    }
     838                    return '';
    763839                }
    764840            ),
  • order-notifications-for-woocommerce/tags/1.0.2/order-notifications-for-woocommerce.php

    r3486200 r3490089  
    44 * Plugin URI: https://wordpress.org/plugins/order-notifications-for-woocommerce/
    55 * Description: Send WhatsApp notifications for WooCommerce orders using WANotifier. Automated order updates, abandoned cart recovery, customer sync and more.
    6  * Version: 1.0.1
     6 * Version: 1.0.2
    77 * Author: WANotifier
    88 * Author URI: https://wanotifier.com
  • order-notifications-for-woocommerce/tags/1.0.2/readme.txt

    r3486200 r3490089  
    55Requires at least: 5.7
    66Tested up to: 6.9
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88Requires PHP: 7.4
    99Requires Plugins: woocommerce
     
    164164
    165165== Changelog ==
     166= 1.0.2 - 2026-03-24 =
     167* new merge tags for abandoned cart first item — name, price, quantity, total, and image URL
     168
    166169= 1.0.1 - 2026-03-19 =
    167170* fix: prevent duplicate trigger actions from being scheduled for the same event
  • order-notifications-for-woocommerce/trunk/includes/class-wanowc.php

    r3486200 r3490089  
    2020
    2121    private function define_constants() {
    22         $this->define( 'WANOWC_VERSION', '1.0.1' );
     22        $this->define( 'WANOWC_VERSION', '1.0.2' );
    2323        $this->define( 'WANOWC_NAME', 'wanowc' );
    2424        $this->define( 'WANOWC_PREFIX', 'wanowc_' );
  • order-notifications-for-woocommerce/trunk/includes/classes/integrations/class-wanowc-wcar.php

    r3485626 r3490089  
    126126                },
    127127            ),
     128            array(
     129                'id'            => 'wcar_first_item_name',
     130                'label'         => 'Abandoned cart first item name',
     131                'preview_value' => '',
     132                'return_type'   => 'text',
     133                'value'         => function ( $checkout_details ) {
     134                    $cart_contents = isset( $checkout_details['cart_contents'] ) ? maybe_unserialize( $checkout_details['cart_contents'] ) : array();
     135                    foreach ( $cart_contents as $item ) {
     136                        if ( ! isset( $item['product_id'] ) ) continue;
     137                        $product = wc_get_product( $item['product_id'] );
     138                        if ( $product ) return $product->get_name();
     139                    }
     140                    return '';
     141                },
     142            ),
     143            array(
     144                'id'            => 'wcar_first_item_price',
     145                'label'         => 'Abandoned cart first item price',
     146                'preview_value' => '',
     147                'return_type'   => 'text',
     148                'value'         => function ( $checkout_details ) {
     149                    $cart_contents = isset( $checkout_details['cart_contents'] ) ? maybe_unserialize( $checkout_details['cart_contents'] ) : array();
     150                    foreach ( $cart_contents as $item ) {
     151                        if ( ! isset( $item['product_id'] ) ) continue;
     152                        $product = wc_get_product( $item['product_id'] );
     153                        if ( $product ) return html_entity_decode( strip_tags( wc_price( $product->get_price() ) ) );
     154                    }
     155                    return '';
     156                },
     157            ),
     158            array(
     159                'id'            => 'wcar_first_item_quantity',
     160                'label'         => 'Abandoned cart first item quantity',
     161                'preview_value' => '',
     162                'return_type'   => 'text',
     163                'value'         => function ( $checkout_details ) {
     164                    $cart_contents = isset( $checkout_details['cart_contents'] ) ? maybe_unserialize( $checkout_details['cart_contents'] ) : array();
     165                    foreach ( $cart_contents as $item ) {
     166                        if ( ! isset( $item['product_id'] ) ) continue;
     167                        return (string) ( $item['quantity'] ?? '' );
     168                    }
     169                    return '';
     170                },
     171            ),
     172            array(
     173                'id'            => 'wcar_first_item_total',
     174                'label'         => 'Abandoned cart first item total',
     175                'preview_value' => '',
     176                'return_type'   => 'text',
     177                'value'         => function ( $checkout_details ) {
     178                    $cart_contents = isset( $checkout_details['cart_contents'] ) ? maybe_unserialize( $checkout_details['cart_contents'] ) : array();
     179                    foreach ( $cart_contents as $item ) {
     180                        if ( ! isset( $item['product_id'] ) ) continue;
     181                        return isset( $item['line_total'] ) ? html_entity_decode( strip_tags( wc_price( $item['line_total'] ) ) ) : '';
     182                    }
     183                    return '';
     184                },
     185            ),
     186            array(
     187                'id'            => 'wcar_first_item_image',
     188                'label'         => 'Abandoned cart first item image URL',
     189                'preview_value' => '',
     190                'return_type'   => 'image',
     191                'value'         => function ( $checkout_details ) {
     192                    $cart_contents = isset( $checkout_details['cart_contents'] ) ? maybe_unserialize( $checkout_details['cart_contents'] ) : array();
     193                    foreach ( $cart_contents as $item ) {
     194                        if ( ! isset( $item['product_id'] ) ) continue;
     195                        $product = wc_get_product( $item['product_id'] );
     196                        if ( $product ) {
     197                            $image_id = $product->get_image_id();
     198                            if ( $image_id ) return wp_get_attachment_url( $image_id );
     199                        }
     200                    }
     201                    return '';
     202                },
     203            ),
    128204        );
    129205
  • order-notifications-for-woocommerce/trunk/includes/classes/integrations/class-wanowc-woocommerce.php

    r3485626 r3490089  
    761761                    $coupon_data = $cart_details ? maybe_unserialize($cart_details['coupon_data'] ?? '') : [];
    762762                    return $coupon_data ? implode(', ', $coupon_data) : '';
     763                }
     764            ),
     765            array(
     766                'id'            => 'wca_first_item_name',
     767                'label'         => 'Abandoned cart first item name',
     768                'preview_value' => '',
     769                'return_type'   => 'text',
     770                'value'         => function ($cart_details) {
     771                    $cart_data = $cart_details ? maybe_unserialize($cart_details['cart_data']) : [];
     772                    foreach ($cart_data as $item) {
     773                        if (!isset($item['product_id'])) continue;
     774                        $product = wc_get_product($item['product_id']);
     775                        if ($product) return $product->get_name();
     776                    }
     777                    return '';
     778                }
     779            ),
     780            array(
     781                'id'            => 'wca_first_item_price',
     782                'label'         => 'Abandoned cart first item price',
     783                'preview_value' => '',
     784                'return_type'   => 'text',
     785                'value'         => function ($cart_details) {
     786                    $cart_data = $cart_details ? maybe_unserialize($cart_details['cart_data']) : [];
     787                    foreach ($cart_data as $item) {
     788                        if (!isset($item['product_id'])) continue;
     789                        $product = wc_get_product($item['product_id']);
     790                        if ($product) return html_entity_decode( strip_tags( wc_price( $product->get_price() ) ) );
     791                    }
     792                    return '';
     793                }
     794            ),
     795            array(
     796                'id'            => 'wca_first_item_quantity',
     797                'label'         => 'Abandoned cart first item quantity',
     798                'preview_value' => '',
     799                'return_type'   => 'text',
     800                'value'         => function ($cart_details) {
     801                    $cart_data = $cart_details ? maybe_unserialize($cart_details['cart_data']) : [];
     802                    foreach ($cart_data as $item) {
     803                        if (!isset($item['product_id'])) continue;
     804                        return $item['quantity'] ?? '';
     805                    }
     806                    return '';
     807                }
     808            ),
     809            array(
     810                'id'            => 'wca_first_item_total',
     811                'label'         => 'Abandoned cart first item total',
     812                'preview_value' => '',
     813                'return_type'   => 'text',
     814                'value'         => function ($cart_details) {
     815                    $cart_data = $cart_details ? maybe_unserialize($cart_details['cart_data']) : [];
     816                    foreach ($cart_data as $item) {
     817                        if (!isset($item['product_id'])) continue;
     818                        return isset($item['line_total']) ? html_entity_decode( strip_tags( wc_price( $item['line_total'] ) ) ) : '';
     819                    }
     820                    return '';
     821                }
     822            ),
     823            array(
     824                'id'            => 'wca_first_item_image',
     825                'label'         => 'Abandoned cart first item image URL',
     826                'preview_value' => '',
     827                'return_type'   => 'image',
     828                'value'         => function ($cart_details) {
     829                    $cart_data = $cart_details ? maybe_unserialize($cart_details['cart_data']) : [];
     830                    foreach ($cart_data as $item) {
     831                        if (!isset($item['product_id'])) continue;
     832                        $product = wc_get_product($item['product_id']);
     833                        if ($product) {
     834                            $image_id = $product->get_image_id();
     835                            if ($image_id) return wp_get_attachment_url($image_id);
     836                        }
     837                    }
     838                    return '';
    763839                }
    764840            ),
  • order-notifications-for-woocommerce/trunk/order-notifications-for-woocommerce.php

    r3486200 r3490089  
    44 * Plugin URI: https://wordpress.org/plugins/order-notifications-for-woocommerce/
    55 * Description: Send WhatsApp notifications for WooCommerce orders using WANotifier. Automated order updates, abandoned cart recovery, customer sync and more.
    6  * Version: 1.0.1
     6 * Version: 1.0.2
    77 * Author: WANotifier
    88 * Author URI: https://wanotifier.com
  • order-notifications-for-woocommerce/trunk/readme.txt

    r3486200 r3490089  
    55Requires at least: 5.7
    66Tested up to: 6.9
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88Requires PHP: 7.4
    99Requires Plugins: woocommerce
     
    164164
    165165== Changelog ==
     166= 1.0.2 - 2026-03-24 =
     167* new merge tags for abandoned cart first item — name, price, quantity, total, and image URL
     168
    166169= 1.0.1 - 2026-03-19 =
    167170* fix: prevent duplicate trigger actions from being scheduled for the same event
Note: See TracChangeset for help on using the changeset viewer.