Title: php error
Last modified: May 17, 2025

---

# php error

 *  Resolved [Darren Ellis](https://wordpress.org/support/users/dazsmodels/)
 * (@dazsmodels)
 * [1 year ago](https://wordpress.org/support/topic/php-error-691/)
 * hi we are getting the following errors
 * Attempt to read property “slug” on null-
    1.  wp-content/plugins/woocommerce/includes/wc-product-functions.php:336
    2.  `wc_product_post_type_link()`
        wp-includes/class-wp-hook.php:326
    3.  `apply_filters('post_type_link')`
        wp-includes/link-template.php:375
    4.  `get_post_permalink()`
        wp-includes/link-template.php:201
    5.  `get_permalink()`
        wp-admin/includes/post.php:1494
    6.  `get_sample_permalink()`
        wp-content/plugins/squirrly-seo/view/Snippet/Snippet.
        php:56
    7.  `SQ_Classes_DisplayController->get_view()`
        wp-content/plugins/squirrly-seo/
        classes/FrontController.php:112
    8.  `SQ_Classes_FrontController->show_view()`
        wp-content/plugins/squirrly-seo/view/
        Assistant/Bulkseo.php:250
    9.  `SQ_Classes_DisplayController->get_view()`
        wp-content/plugins/squirrly-seo/
        classes/FrontController.php:112
    10. `SQ_Classes_FrontController->show_view()`
        wp-content/plugins/squirrly-seo/controllers/
        Assistant.php:36
    11. `SQ_Controllers_Assistant->init()`
        wp-includes/class-wp-hook.php:324
    12. `do_action('squirrly-seo_page_sq_assistant')`
        wp-admin/admin.php:260

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Support [Peter](https://wordpress.org/support/users/petersquirrly/)
 * (@petersquirrly)
 * [1 year ago](https://wordpress.org/support/topic/php-error-691/#post-18473828)
 * 👋 Hi Darren,
 * Please keep in mind that here we offer Squirrly SEO support, where the error 
   you shared is not on our end, and we believe an old version of WooCommerce is
   being used.
 * Squirrly correctly checks the permalink structure using the get_sample_permalink
   function on the post ID to see what permalink structure is applied.
 * As can be seen in the error, it’s a WooCommerce function that appears to be outdated
   and doesn’t check if the link is null.
 * Why it ends up with a null link from the post ID is something we can’t know, 
   because it depends on their site — maybe the products don’t have a slug set.
 * The best course of action is to update WooCommerce, check that the products have
   slugs, and under Settings > Permalink > Product Permalink, make sure a Custom
   Base is selected. ([screenshot here](https://drive.google.com/file/d/1EDUvRmaEhcL4WpcVJV1U4mBP_s_WB9H1/view?usp=sharing))
 * Note! For any additional questions on the subject which is unrelated to Squirrly
   SEO, please consult with WooCommerce Support, a developer that has knowledge 
   on the matter or you can use ChatGPT. Thank you for your understanding!
 *  Thread Starter [Darren Ellis](https://wordpress.org/support/users/dazsmodels/)
 * (@dazsmodels)
 * [1 year ago](https://wordpress.org/support/topic/php-error-691/#post-18473853)
 * peter
 * we are using latest elementor and woocommerce and wordpress.
 * we are using cutting ours is /shop/ rather than /product/
 * does this need to match
 * i had spoken woocommerce and a developer and they both advised to make you aware
   of the issue.
 * we haven’t blamed you but your very defensive and I don’t like the attitude you
   have taken .
 *  Plugin Support [Peter](https://wordpress.org/support/users/petersquirrly/)
 * (@petersquirrly)
 * [1 year ago](https://wordpress.org/support/topic/php-error-691/#post-18475772)
 * Thank you for your message, and we truly appreciate you taking the time to follow
   up.
 * First off, we want to sincerely apologize if our previous response came across
   as defensive—that was not our intention. We simply wanted to clarify that the
   issue doesn’t appear to be related to our plugin. As a team, we sometimes receive
   support requests for problems that originate outside our scope, and that can 
   be a bit frustrating on our end. Still, that’s no excuse for how it may have 
   come across, and we’re sorry if it felt dismissive in any way.
 * Regarding the permalink issue, from the information provided so far, the error
   still seems to be coming from WooCommerce itself. Unfortunately, without more
   detailed context or logs, it’s difficult for us to offer further insight—and 
   it does fall outside the scope of what we can support directly.
 * If you manage to gather more specific technical details or a reproducible scenario
   involving our plugin, we’d be happy to take another look.
 * Thanks again for your understanding.
 *  Plugin Support [Peter](https://wordpress.org/support/users/petersquirrly/)
 * (@petersquirrly)
 * [1 year ago](https://wordpress.org/support/topic/php-error-691/#post-18476807)
 * Even if this goes outside our support scope, we made an exception and tried to
   fix their problem from our end.
 * Please try the latest version 12.4.11 and give it another try. Let us know if
   that helped.
 *  Thread Starter [Darren Ellis](https://wordpress.org/support/users/dazsmodels/)
 * (@dazsmodels)
 * [1 year ago](https://wordpress.org/support/topic/php-error-691/#post-18476972)
 * hi , i am not sure what you did but amzing work as they have gone
 *  Plugin Support [Peter](https://wordpress.org/support/users/petersquirrly/)
 * (@petersquirrly)
 * [1 year ago](https://wordpress.org/support/topic/php-error-691/#post-18477315)
 * That’s good to hear, and glad to help!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘php error’ is closed to new replies.

 * ![](https://ps.w.org/squirrly-seo/assets/icon-256x256.png?rev=2724476)
 * [SEO Plugin by Squirrly SEO](https://wordpress.org/plugins/squirrly-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/squirrly-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/squirrly-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/squirrly-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/squirrly-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/squirrly-seo/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Peter](https://wordpress.org/support/users/petersquirrly/)
 * Last activity: [1 year ago](https://wordpress.org/support/topic/php-error-691/#post-18477315)
 * Status: resolved