[wp-trac] [WordPress Trac] #59748: Snap Integration Knocks my Website out

WordPress Trac noreply at wordpress.org
Thu Oct 26 15:58:33 UTC 2023


#59748: Snap Integration Knocks my Website out
--------------------------+----------------------
 Reporter:  kevchilton    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by sabernhardt):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Old description:

> I can't find an answer to this anywhere in your help/forums etc. When I
> attempt to integrate the Snap pixel via either of the two Snapchat
> plugins, once the process in completed I find my website is no longer
> visible on the web. In its place is a Fatal Error as follows:
>
> Fatal error: Uncaught Error: Call to undefined function wc_get_product()
> in /home/customer/www/kevchilton.com/public_html/wp-content/plugins/snap-
> pixel/includes/function.php:122 Stack trace: #0
> /home/customer/www/kevchilton.com/public_html/wp-includes/class-wp-
> hook.php(310):
> snapchat_pixel_functions->snapchat_pixel_code_everywhere('') #1
> /home/customer/www/kevchilton.com/public_html/wp-includes/class-wp-
> hook.php(334): WP_Hook->apply_filters(NULL, Array) #2
> /home/customer/www/kevchilton.com/public_html/wp-
> includes/plugin.php(517): WP_Hook->do_action(Array) #3
> /home/customer/www/kevchilton.com/public_html/wp-includes/general-
> template.php(3053): do_action('wp_head') #4
> /home/customer/www/kevchilton.com/public_html/wp-
> content/themes/astra/header.php(31): wp_head() #5
> /home/customer/www/kevchilton.com/public_html/wp-
> includes/template.php(785): require_once('/home/customer/...') #6
> /home/customer/www/kevchilton.com/public_html/wp-
> includes/template.php(720): load_template('/home/customer/...', true,
> Array) #7 /home/customer/www/ in
> /home/customer/www/kevchilton.com/public_html/wp-content/plugins/snap-
> pixel/includes/function.php on line 122
>
> Can you assist with this please?

New description:

 I can't find an answer to this anywhere in your help/forums etc. When I
 attempt to integrate the Snap pixel via either of the two Snapchat
 plugins, once the process in completed I find my website is no longer
 visible on the web. In its place is a Fatal Error as follows:

 {{{
 Fatal error: Uncaught Error: Call to undefined function wc_get_product()
 in /.../wp-content/plugins/snap-pixel/includes/function.php:122
 Stack trace:
 #0 /.../wp-includes/class-wp-hook.php(310):
 snapchat_pixel_functions->snapchat_pixel_code_everywhere('')
 #1 /.../wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL,
 Array)
 #2 /.../wp-includes/plugin.php(517): WP_Hook->do_action(Array)
 #3 /.../wp-includes/general-template.php(3053): do_action('wp_head')
 #4 /.../wp-content/themes/astra/header.php(31): wp_head()
 #5 /.../wp-includes/template.php(785): require_once('/home/customer/...')
 #6 /.../wp-includes/template.php(720): load_template('/home/customer/...',
 true, Array)
 #7 /home/customer/www/ in /home/customer/www/.../wp-content/plugins/snap-
 pixel/includes/function.php on line 122
 }}}

 Can you assist with this please?

--

Comment:

 Hi and welcome to WordPress Core Trac!

 The Snap Pixel plugin's `snapchat_pixel_code_everywhere()` function did
 not check whether WooCommerce is activated before calling
 `wc_get_product()`.

 The error needs to be reported on the plugin forum:
 https://wordpress.org/support/plugin/snap-pixel/

 Installing and activating WooCommerce might be a quick fix for your site,
 unless you can be more selective about where the pixel code is added.

 Because this is not a Core bug, 'invalid' is the most appropriate
 resolution for this ticket.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59748#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list