• Hello,

    Howo do I access crowdfunding data for a product id directly from php.
    I am trying to make a custom thermometer widget using the crowdfunding data.

    I have tried using do_shortcode() but I get nothing:
    $project_goal = do_shortcode(‘[product_crowdfunding_goal product_id=”$id”]’);
    $project_received = do_shortcode(‘[product_total_orders_sum product_id=”$id”]’);
    $project_deadline = do_shortcode(‘[product_crowdfunding_deadline product_id=”$id”]’);
    $project_goal_to_go = do_shortcode(‘[product_crowdfunding_goal_remaining product_id=”$id”]’);

Viewing 1 replies (of 1 total)
  • Hi Daniel,

    Sorry for the delay. You are correct – it’s probably the easiest way to access data via do_shortcode and product_id attribute. Not sure why you are not getting anything, except maybe one note – crowdfunding data is updated via crons (that is not in real time), so maybe you just had to wait till data is updated? Update period can be set in plugin’s “General” settings. Please let me know if it’s still not good – I will try to think of some other solution.

    Best regards,
    Tom

Viewing 1 replies (of 1 total)
  • The topic ‘PHP function access for custom widget’ is closed to new replies.