Title: Variable Product Issue
Last modified: April 29, 2022

---

# Variable Product Issue

 *  Resolved [dblinks](https://wordpress.org/support/users/dblinks/)
 * (@dblinks)
 * [4 years ago](https://wordpress.org/support/topic/variable-product-issue-8/)
 * I’m looking forward to using this plugin on all our charitable client pages.
 * I’m not exactly sure if the “Variable Product” used with your plugin and the 
   Avada theme is conflicted by the templates in Avada or another issue.
 * Findings:
 * > [Variable Woo Product Issue](https://imgur.com/a/neizVZJ)
 * `3591263#0: *100733 FastCGI sent in stderr: "PHP message: PHP Warning: Trying
   to access array offset on value of type bool in /var/www/vhosts/mydomain.org/
   httpdocs/wp-content/themes/Avada/templates/wc-after-single-product-summary.php
   on line 37" while reading response header from upstream`
 * I understand if my client needs further customization not available through your
   support we can make adjustments based on your recommendations.
 * Separate Issue: We are finding with your shortcodes when trying to render checkouts
   in (for instance) a 1/3 column the Avada theme is too wide because of it’s intended
   layout printing 2 columns in the name/address area.
 * I can certainly reachout to Avada for assistance but wanted to start here for
   your expert opinion regarding our variable product issue.
 * Thank you Jonas,
    Stuart
    -  This topic was modified 4 years ago by [dblinks](https://wordpress.org/support/users/dblinks/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fvariable-product-issue-8%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Jonas](https://wordpress.org/support/users/flinnn/)
 * (@flinnn)
 * [4 years ago](https://wordpress.org/support/topic/variable-product-issue-8/#post-15604121)
 * Hi Stuart,
    thanks for using Donation Platform for WooCommerce. Unfortunately,
   since the Avada theme is a premium theme, I have no way to test compatibility.
   However, the problems are relatively easy to explain: Both Donation Platform 
   for WooCommerce and the Avada theme use the hooks provided by WooCommerce to 
   customize the functionality and design of the shop. Apparently, Avada uses a 
   higher priority and thus overwrites the changes from the donation plugin. You
   can try the following code, it should ensure that the template overwrite works
   properly:
 *     ```
       add_filter( 'wc_get_template', function(string $template, string $template_name, $args, string $template_path, string $default_path) {
       	$path = WCDP_DIR . 'includes/wc-templates/';
       	switch ($template_name) {
       		case 'single-product/add-to-cart/simple.php' :
       		case 'single-product/add-to-cart/variable.php' :
       		case 'single-product/add-to-cart/grouped.php' :
       			if(WCDP_Form::is_donable(get_queried_object_id())) {
       				$template = $path . 'single-product/add-to-cart/product.php';
       			}
       		default:
       			break;
       	}
       	return $template;
       }, 100, 5 );
       ```
   
 * You can also take a look at all the hooks used by Donation Platform for WooCommerce:
   [https://github.com/jonas-hoebenreich/wc-donation-platform/blob/69b7ad61fa64f2fdea2b535e55526d71d6a66043/includes/class-wcdp-hooks.php](https://github.com/jonas-hoebenreich/wc-donation-platform/blob/69b7ad61fa64f2fdea2b535e55526d71d6a66043/includes/class-wcdp-hooks.php)
 * The problem with the columns is probably due to conflicting CSS. There is nothing
   else to do than to find the problems in the console and overwrite the wrong styles
   of Avada.
 * Best,
    Jonas
 *  Thread Starter [dblinks](https://wordpress.org/support/users/dblinks/)
 * (@dblinks)
 * [4 years ago](https://wordpress.org/support/topic/variable-product-issue-8/#post-15604656)
 * Hi Jonas,
 * This worked perfectly. Thanks for taking the time to sort it out so efficiently&
   accurately.
 * Have a great weekend.
 * Stuart

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

The topic ‘Variable Product Issue’ is closed to new replies.

 * ![](https://ps.w.org/wc-donation-platform/assets/icon.svg?rev=2611888)
 * [Donation Platform for WooCommerce: Fundraising & Donation Management](https://wordpress.org/plugins/wc-donation-platform/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wc-donation-platform/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wc-donation-platform/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-donation-platform/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-donation-platform/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-donation-platform/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [dblinks](https://wordpress.org/support/users/dblinks/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/variable-product-issue-8/#post-15604656)
 * Status: resolved