PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.3.0
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.3.0
3.3.0 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.1 trunk 1.0.4 1.1.0 1.1.0.1 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 All 162 releases
← All changes | classes/class-cartflows-helper.php +1 -68 3.2.0 → 3.3.0 View file →
@@ -881,75 +881,8 @@
881 881 return self::$snapchat;
882 882 }
883 883
884 884 /**
885 - * Prepare response data for facebook.
886 - *
887 - * @todo Remove this function in 1.6.18 as it is added in cartflows-tracking file.
888 - * @param int $order_id order_id.
889 - * @param array $offer_data offer data.
890 - * @return void
891 - */
892 - public static function send_fb_response_if_enabled( $order_id, $offer_data = array() ) {
893 -
894 - _deprecated_function( __METHOD__, '1.6.15' );
895 -
896 - // Stop Execution if WooCommerce is not installed & don't set the cookie.
897 - if ( ! Cartflows_Loader::get_instance()->is_woo_active ) {
898 - return;
899 - }
900 -
901 - // @Since 1.6.15 It will only trigger offer purchase event.
902 - $fb_settings = self::get_facebook_settings();
903 - if ( 'enable' === $fb_settings['facebook_pixel_tracking'] ) {
904 - setcookie( 'wcf_order_details', wp_json_encode( self::prepare_purchase_data_fb_response( $order_id, $offer_data ) ), strtotime( '+1 year' ), '/', COOKIE_DOMAIN, CARTFLOWS_HTTPS, true ); //phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie
905 - }
906 - }
907 -
908 - /**
909 - * Prepare purchase response for facebook purcase event.
910 - *
911 - * @todo Remove this function in 1.6.18 as it is added in cartflows-tracking file.
912 - *
913 - * @param integer $order_id order id.
914 - * @param array $offer_data offer data.
915 - * @return mixed
916 - */
917 - public static function prepare_purchase_data_fb_response( $order_id, $offer_data ) {
918 -
919 - _deprecated_function( __METHOD__, '1.6.15' );
920 -
921 - $purchase_data = array();
922 -
923 - if ( empty( $offer_data ) ) {
924 - return $purchase_data;
925 - }
926 -
927 - if ( ! Cartflows_Loader::get_instance()->is_woo_active ) {
928 - return $purchase_data;
929 - }
930 -
931 - $order = wc_get_order( $order_id );
932 -
933 - if ( ! $order ) {
934 - return $purchase_data;
935 - }
936 -
937 - $purchase_data['content_type'] = 'product';
938 - $purchase_data['currency'] = wcf()->options->get_checkout_meta_value( $order_id, '_order_currency' );
939 - $purchase_data['userAgent'] = wcf()->options->get_checkout_meta_value( $order_id, '_customer_user_agent' );
940 - $purchase_data['plugin'] = 'CartFlows-Offer';
941 -
942 - $purchase_data['content_ids'][] = (string) $offer_data['id'];
943 - $purchase_data['content_names'][] = $offer_data['name'];
944 - $purchase_data['content_category'][] = wp_strip_all_tags( wc_get_product_category_list( $offer_data['id'] ) );
945 - $purchase_data['value'] = $offer_data['total'];
946 - $purchase_data['transaction_id'] = $order_id;
947 -
948 - return $purchase_data;
949 - }
950 -
951 - /**
952 885 * Get the image url of size.
953 886 *
954 887 * @param int $post_id post id.
955 888 * @param array $key key.
@@ -1996,9 +1929,9 @@
1996 1929 *
1997 1930 * @return array<string> Allowed file extensions.
1998 1931 */
1999 1932 public static function get_allowed_file_extensions() {
2000 - return array( 'jpg', 'jpeg', 'png', 'gif', 'webp', 'ico', 'pdf', 'mp3', 'm4a', 'wav', 'mp4', 'm4v', 'mov' );
1933 + return array( 'jpg', 'jpeg', 'png', 'gif', 'webp', 'pdf', 'mp3', 'm4a', 'wav', 'mp4', 'm4v', 'mov' );
2001 1934 }
2002 1935
2003 1936 /**
2004 1937 * Sanitize accepted file types input against the master allowlist.