Good morning, thank you very much for your answer.
Adding echo do_shortcode('[cwginstock_subscribe_form product_id=’304′]');
we manage to show the form but we don’t get what we need because that form is shown in some products and not in others, depending on the conditions selected in the plugin configuration page.
Since we need to display the form depending on the attribute this doesn’t work for us.
The ideal for us is to be able to display the form according to the following conditions without other plugin conditions affecting:
$attributes = $product->get_attributes();
if (!empty($attributes)) {
foreach ($attributes as $attribute_name => $attribute) {
if ($attribute_name == 'pa_delivery') {
$attribute_value = $product->get_attribute($attribute_name);
if ($attribute_value == 'Check stock') {
//Display subscribe form....
//...............
}
}
}
}
It seems that the plugin sets the conditions in the display_subscribe_box function of the CWG_Instock_Notifier_Product class (class-product.php file)
How can we override that function from our theme to change the conditional rules?
Thank you very much,
Carlos