Changeset 2749139
- Timestamp:
- 06/28/2022 01:42:11 PM (4 years ago)
- Location:
- chirpyweb
- Files:
-
- 4 edited
-
tags/1.2/includes/class-chirpyweb-init.php (modified) (4 diffs)
-
tags/1.2/readme.txt (modified) (1 diff)
-
trunk/includes/class-chirpyweb-init.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
chirpyweb/tags/1.2/includes/class-chirpyweb-init.php
r2748450 r2749139 404 404 $wpurl = get_bloginfo( 'wpurl' ); 405 405 $settings = get_option( 'cw-settings' ); 406 if( !empty( $settings ) ) { 406 407 $tokan = $settings['token']; 408 } 407 409 global $woocommerce; 408 $currency = get_ woocommerce_currency_symbol();410 $currency = get_option('woocommerce_currency'); 409 411 if ( ( ! empty( $settings['token'] ) ) ) { 410 412 if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { … … 499 501 $response_code = json_decode( wp_remote_retrieve_body( $response ) ); 500 502 501 echo '<pre>';502 print_r($response);503 echo '</pre>';504 503 $price_drop = $response_code->is_price_drop; 505 504 $back_in_stock = $response_code->is_back_in_stock; … … 591 590 $tokan = $settings['token']; 592 591 $cart_url = wc_get_cart_url(); 593 $sub_id = sanitize_text_field( $_COOKIE['subscription_id'] ); // phpcs:ignore 592 if ( isset( $_COOKIE['subscription_id'] ) ) { 593 $sub_id = sanitize_text_field( $_COOKIE['subscription_id'] ); 594 // phpcs:ignore 595 } 594 596 if ( empty( $cart_session ) ) { 595 597 $cart_session = WC()->session->set( 'cw_cart_token', bin2hex( random_bytes( 20 ) ) ); … … 699 701 */ 700 702 public function chirpyweb_revenue_cookie() { 701 $alert = sanitize_text_field( ! empty( isset( $_GET['alert'] ) ) ); 702 $id = sanitize_text_field( ! empty( isset( $_GET['id'] ) ) ); 703 if( isset( $_GET['alert'] ) ) { 704 $alert = $_GET['alert']; 705 } 706 if( isset( $_GET['id'] ) ) { 707 $id = $_GET['id']; 708 } 703 709 if ( isset( $alert ) && isset( $id ) ) { 704 710 if ( ! isset( $_COOKIE['cw_revenue_alert'] ) && ! isset( $_COOKIE['cw_revenue_id'] ) && !empty( $alert ) && !empty( $id ) ) { -
chirpyweb/tags/1.2/readme.txt
r2748488 r2749139 4 4 Tags: Web Push Notifications, Owned audience marketing, Chrome Push Notifications, Mobile Web Notifications, Chrome, Firefox, Safari, Opera, Edge, Firefox push notifications, Notification drip, Safari push notifications, Web Push, Chrome push, Desktop Push Notifications, iZooto, Android Chrome Notifications, OneSignal, GoRoost, Wordpress Notifications, Blog Notifications, RSS Feed, Email Notifications, Subscribers, Subscription, Personalization, User Profiling, Geo-targetting, Segmentation,Abandoned Cart Notifications,Price Drop Notifications,Back In Stock Notifications, 5 5 Shipping Notifications 6 Tested up to: 5.96 Tested up to: 6.0 7 7 Stable tag: 1.2 8 8 License: GPLv2 or later -
chirpyweb/trunk/includes/class-chirpyweb-init.php
r2748450 r2749139 404 404 $wpurl = get_bloginfo( 'wpurl' ); 405 405 $settings = get_option( 'cw-settings' ); 406 if( !empty( $settings ) ) { 406 407 $tokan = $settings['token']; 408 } 407 409 global $woocommerce; 408 $currency = get_ woocommerce_currency_symbol();410 $currency = get_option('woocommerce_currency'); 409 411 if ( ( ! empty( $settings['token'] ) ) ) { 410 412 if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { … … 499 501 $response_code = json_decode( wp_remote_retrieve_body( $response ) ); 500 502 501 echo '<pre>';502 print_r($response);503 echo '</pre>';504 503 $price_drop = $response_code->is_price_drop; 505 504 $back_in_stock = $response_code->is_back_in_stock; … … 591 590 $tokan = $settings['token']; 592 591 $cart_url = wc_get_cart_url(); 593 $sub_id = sanitize_text_field( $_COOKIE['subscription_id'] ); // phpcs:ignore 592 if ( isset( $_COOKIE['subscription_id'] ) ) { 593 $sub_id = sanitize_text_field( $_COOKIE['subscription_id'] ); 594 // phpcs:ignore 595 } 594 596 if ( empty( $cart_session ) ) { 595 597 $cart_session = WC()->session->set( 'cw_cart_token', bin2hex( random_bytes( 20 ) ) ); … … 699 701 */ 700 702 public function chirpyweb_revenue_cookie() { 701 $alert = sanitize_text_field( ! empty( isset( $_GET['alert'] ) ) ); 702 $id = sanitize_text_field( ! empty( isset( $_GET['id'] ) ) ); 703 if( isset( $_GET['alert'] ) ) { 704 $alert = $_GET['alert']; 705 } 706 if( isset( $_GET['id'] ) ) { 707 $id = $_GET['id']; 708 } 703 709 if ( isset( $alert ) && isset( $id ) ) { 704 710 if ( ! isset( $_COOKIE['cw_revenue_alert'] ) && ! isset( $_COOKIE['cw_revenue_id'] ) && !empty( $alert ) && !empty( $id ) ) { -
chirpyweb/trunk/readme.txt
r2748488 r2749139 4 4 Tags: Web Push Notifications, Owned audience marketing, Chrome Push Notifications, Mobile Web Notifications, Chrome, Firefox, Safari, Opera, Edge, Firefox push notifications, Notification drip, Safari push notifications, Web Push, Chrome push, Desktop Push Notifications, iZooto, Android Chrome Notifications, OneSignal, GoRoost, Wordpress Notifications, Blog Notifications, RSS Feed, Email Notifications, Subscribers, Subscription, Personalization, User Profiling, Geo-targetting, Segmentation,Abandoned Cart Notifications,Price Drop Notifications,Back In Stock Notifications, 5 5 Shipping Notifications 6 Tested up to: 5.96 Tested up to: 6.0 7 7 Stable tag: 1.2 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.