Shortcode displaying even if empty
-
Hello,
I have added the shortcode [adp_product_bulk_rules_table] to run after_add_to_cart_form, but I’d like to create some conditions if the table does not exist for specific product.
So, I have tried
$dyn_price = do_shortcode("[adp_product_bulk_rules_table]");
if (!empty($dyn_price)) {
but it looks that your shortcode never returns empty since it always echoes
<span class="wdp_bulk_table_content" data-available-ids="' . json_encode( $available_products_ids ) . '"></span>
Any suggestion how to solve this? Thank you.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Shortcode displaying even if empty’ is closed to new replies.