Title: willgorham's Replies | WordPress.org

---

# willgorham

  [  ](https://wordpress.org/support/users/willgorham/)

 *   [Profile](https://wordpress.org/support/users/willgorham/)
 *   [Topics Started](https://wordpress.org/support/users/willgorham/topics/)
 *   [Replies Created](https://wordpress.org/support/users/willgorham/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/willgorham/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/willgorham/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/willgorham/engagements/)
 *   [Favorites](https://wordpress.org/support/users/willgorham/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/users/willgorham/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/willgorham/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Dynamic Pricing and Discount Rules for WooCommerce] Critical error in log](https://wordpress.org/support/topic/critical-error-in-log/)
 *  [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/critical-error-in-log/#post-11511035)
 * [@algolplus](https://wordpress.org/support/users/algolplus/) Thank you for the
   quick response – I’ll look forward to the update 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Dynamic Pricing and Discount Rules for WooCommerce] Critical error in log](https://wordpress.org/support/topic/critical-error-in-log/)
 *  [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/critical-error-in-log/#post-11509755)
 * I am seeing the same error:
 * WC 3.6.2
    WP 5.1.1
 *     ```
       Uncaught Error: Call to a member function get_id() on null in /www/wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/classes/class-wdp-frontend.php:753
   
       Stack trace:
       #0 /www/wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/classes/class-wdp-frontend.php(724): WDP_Frontend::make_wdp_cart_context_from_wc()
       #1 /www/wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/classes/class-wdp-frontend.php(572): WDP_Frontend::make_wdp_cart_from_wc()
       #2 /www/wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/classes/class-wdp-frontend.php(241): WDP_Frontend->get_initial_and_discounted_price(Object(WC_Product_Simple), 1)
       #3 /www/wp-includes/class-wp-hook.php(286): WDP_Frontend->woocommerce_get_price_html('<span class="wo...', Object(WC_Product_Simple))
       #4 /www/wp-includes/plugin.php(208): WP_Hook->apply_filters('<span class="wo...', Array)
       #5 /www/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(1740): apply_filters('woocommerce_get...', '<span class="wo...', Obj in /www/wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/classes/class-wdp-frontend.php on line 753
       ```
   
 * Any updates on this issue?
 * Thank you,
    Will
    -  This reply was modified 7 years, 1 month ago by [willgorham](https://wordpress.org/support/users/willgorham/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TaxJar - Sales Tax Automation for WooCommerce] Conflict with WC Smart Coupons](https://wordpress.org/support/topic/conflict-with-wc-smart-coupons/)
 *  Thread Starter [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/conflict-with-wc-smart-coupons/#post-11384221)
 * Thanks for the fast response here. The patch seems to work well in my testing–
   it would be great to get it released soon.
 * Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Cerber Security, Anti-spam & Malware Scan] COOKIEPATH & headers already sent by errors only on network](https://wordpress.org/support/topic/cookiepath-headers-already-sent-by-errors-only-on-network/)
 *  [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/cookiepath-headers-already-sent-by-errors-only-on-network/#post-10113261)
 * [@gioni](https://wordpress.org/support/users/gioni/) Awesome, thank you!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Cerber Security, Anti-spam & Malware Scan] COOKIEPATH & headers already sent by errors only on network](https://wordpress.org/support/topic/cookiepath-headers-already-sent-by-errors-only-on-network/)
 *  [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/cookiepath-headers-already-sent-by-errors-only-on-network/#post-10042924)
 * Just want to chime in that I’m seeing the same issue with the COOKIEPATH constant
   notices. Running a subdomain install on Cloudways.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TablePress - Tables in WordPress made easy] Issues running search-replace on URLs in table](https://wordpress.org/support/topic/issues-running-search-replace-on-multisite-urls-in-table/)
 *  Thread Starter [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/issues-running-search-replace-on-multisite-urls-in-table/#post-9866792)
 * Awesome, thank you! 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TablePress - Tables in WordPress made easy] Issues running search-replace on URLs in table](https://wordpress.org/support/topic/issues-running-search-replace-on-multisite-urls-in-table/)
 *  Thread Starter [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/issues-running-search-replace-on-multisite-urls-in-table/#post-9859885)
 * Hi Tobias,
 * I just did a quick test for `json_decode()` to see if it behaves the same for
   escaped and unescaped slashes in JSON data – and it does! No difference, or need
   to change anything in the decoding process.
 * Here is a simple example:
 *     ```
       $data = array(
         "This is a plain string",
         "This is a URL: href=\"https://npr.org/\"",
       );
   
       $encoded_data = json_encode( $data );
       $encoded_data_unescaped_slashes = json_encode( $data, JSON_UNESCAPED_SLASHES );
       $decoded_data = json_decode( $encoded_data );
       $decoded_data_unescaped_slashes = json_decode( $encoded_data_unescaped_slashes );
       // Same json_decode function for both types of encoded data
   
       print_r( $encoded_data );
       //-> ["This is a plain string","This is a URL: href=\"https:\/\/npr.org\/\""]
       print_r( $decoded_data );
       //-> Array ( [0] => This is a plain string [1] => This is a URL: href="https://npr.org/" )
   
       print_r( $encoded_data_unescaped_slashes );
       //-> ["This is a plain string","This is a URL: href=\"https://npr.org/\""]
       // Notice no escaped slashes here ^
       print_r( $decoded_data_unescaped_slashes );
       //-> Array ( [0] => This is a plain string [1] => This is a URL: href="https://npr.org/" )
       // Same decoded data as before
       ```
   
 * If you want me to test anything else for you I’d be happy to.
 * Thanks,
    Will
    -  This reply was modified 8 years, 5 months ago by [willgorham](https://wordpress.org/support/users/willgorham/).
    -  This reply was modified 8 years, 5 months ago by [willgorham](https://wordpress.org/support/users/willgorham/).
      Reason: Code formatting
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Just-In-Time Sales Offers] Is this plugin dead?](https://wordpress.org/support/topic/is-this-plugin-dead-53/)
 *  Thread Starter [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/is-this-plugin-dead-53/#post-9849556)
 * Ah, never mind – I just saw the notice on your website. Best of luck with new
   things!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TablePress - Tables in WordPress made easy] Issues running search-replace on URLs in table](https://wordpress.org/support/topic/issues-running-search-replace-on-multisite-urls-in-table/)
 *  Thread Starter [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/issues-running-search-replace-on-multisite-urls-in-table/#post-9848538)
 * My understanding is that json_decode will handle it either way, no need to add
   any options there. However, I will give it a quick test in the next day and let
   you know what I find.
 * Thanks,
    Will
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TablePress - Tables in WordPress made easy] Issues running search-replace on URLs in table](https://wordpress.org/support/topic/issues-running-search-replace-on-multisite-urls-in-table/)
 *  Thread Starter [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/issues-running-search-replace-on-multisite-urls-in-table/#post-9848118)
 * Hi,
 * I totally understand the concern with compatibility. What if you added a filter
   that defaulted to the current behavior, but could optionally be changed to allow
   for unescaped slashes?
 * For example, in models/model-table.php line 240 (I think this is where you would
   do it):
 * Currently: `'post_content' => wp_json_encode( $table['data'] )`
 * You could change to:
 * `'post_content' => wp_json_encode( $table['data'], apply_filters( 'tablepress_table_json_encode_unescaped_slashes',
   false ) ? JSON_UNESCAPED_SLASHES : 0 )`
 * This would default to 0, the default second parameter of wp_json_encode(), and
   allow a user to enable the option if needed, e.g.
 * `add_filter( 'tablepress_table_json_encode_unescaped_slashes', '__return_true');`
 * Another option, if you wanted to make it more flexible:
 * `'post_content' => wp_json_encode( $table['data'], apply_filters( 'tablepress_table_json_encode_options',
   0 ) )`
 * This would allow a user to add different options, e.g.
 *     ```
       add_filter( 'tablepress_table_json_encode_options', 'example_json_options', 10, 1 );
       function example_json_options( $options ) {
         return JSON_UNESCAPED_SLASHES;
       }
       ```
   
 * I could repeat the search-replace, but the initial search-replace is done by 
   the NS Cloner plugin and I have a client that clones sites often. I’d rather 
   not have to tell my client to do a manual search-replace after each clone, ideally.
 * Thanks for your consideration,
    Will
    -  This reply was modified 8 years, 5 months ago by [willgorham](https://wordpress.org/support/users/willgorham/).
    -  This reply was modified 8 years, 5 months ago by [willgorham](https://wordpress.org/support/users/willgorham/).
    -  This reply was modified 8 years, 5 months ago by [willgorham](https://wordpress.org/support/users/willgorham/).
    -  This reply was modified 8 years, 5 months ago by [willgorham](https://wordpress.org/support/users/willgorham/).
    -  This reply was modified 8 years, 5 months ago by [willgorham](https://wordpress.org/support/users/willgorham/).
    -  This reply was modified 8 years, 5 months ago by [willgorham](https://wordpress.org/support/users/willgorham/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TablePress - Tables in WordPress made easy] Issues running search-replace on URLs in table](https://wordpress.org/support/topic/issues-running-search-replace-on-multisite-urls-in-table/)
 *  Thread Starter [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/issues-running-search-replace-on-multisite-urls-in-table/#post-9845691)
 * Hi,
 * Thanks for the fast response here. It looks like this is an issue with PHP’s 
   json_encode function. When using wp_json_encode(), would it be possible to add
   a filter to add a second options parameter, maybe just for the JSON_UNESCAPED_SLASHES
   option?
 * For reference:
    [https://developer.wordpress.org/reference/functions/wp_json_encode/](https://developer.wordpress.org/reference/functions/wp_json_encode/)
   [http://php.net/manual/en/function.json-encode.php](http://php.net/manual/en/function.json-encode.php)
   [https://bugs.php.net/bug.php?id=49366](https://bugs.php.net/bug.php?id=49366)
 * Thanks,
    Will
    -  This reply was modified 8 years, 5 months ago by [willgorham](https://wordpress.org/support/users/willgorham/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[NS Cloner - Site Copier] Tablepress support](https://wordpress.org/support/topic/tablepress-support-2/)
 *  Thread Starter [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/tablepress-support-2/#post-9837386)
 * Hi Andrew,
 * Thanks for the detailed and quick response! Your argument makes complete sense
   to me, I’ll bring it up with Tablepress and see where I can get there.
 * Thanks again!
    Will
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Jilt for WooCommerce] Breaks checkout shipping recalculation](https://wordpress.org/support/topic/breaks-checkout-shipping-recalculation/)
 *  Thread Starter [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/breaks-checkout-shipping-recalculation/#post-9589754)
 * Thanks Max! 👍
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce Hear About Us] Dropdown visible only for users NOT logged in](https://wordpress.org/support/topic/dropdown-visible-only-for-users-not-logged-in/)
 *  [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/dropdown-visible-only-for-users-not-logged-in/#post-9309427)
 * Hey,
 * Actually, the field only shows if the user hasn’t already answered the question.
   Doesn’t make much sense to ask them twice I don’t think (though I don’t know 
   your exact use-case).
 * Right now there isn’t a way to change this without editing the plugin files directly–
   maybe the author can add a filter to turn this on/off if needed.
    -  This reply was modified 8 years, 11 months ago by [willgorham](https://wordpress.org/support/users/willgorham/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Just-In-Time Sales Offers] WooCommerce 3.0 Compatibility with Product Bundles](https://wordpress.org/support/topic/woocommerce-3-0-compatibility-with-product-bundles/)
 *  Thread Starter [willgorham](https://wordpress.org/support/users/willgorham/)
 * (@willgorham)
 * [9 years ago](https://wordpress.org/support/topic/woocommerce-3-0-compatibility-with-product-bundles/#post-9200014)
 * Hi Okky,
 * Thanks for the response. It’s only a deprecated notice, so no problem on my end,
   I just figured I’d bring it up so it can be fixed in the future.
 * For what it’s worth, the replacement for `product->product_type` is `product-
   >get_type()`.
 * Thanks,
    Will
    -  This reply was modified 9 years ago by [willgorham](https://wordpress.org/support/users/willgorham/).

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/users/willgorham/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/willgorham/replies/page/2/?output_format=md)