• Resolved jolangoburdhun

    (@jolangoburdhun)


    I am implementing a custom payment plugin that extends Woocommerce. When the user clicks on the checkout button, I need to fetch a QR code and display it in a modal.

    public function process_payment() {
             ...
             try {
                $response = json_decode($this->getQr('url'));
             }
             catch (Exception $e) {
                echo $e->getMessage();
                die();
             }
    
             $url = $response->url;
             $qr  = $response->qr_code;
        }

    I am getting the response but have no idea how to make the popup appear since I have limited knowledge of WordPress and Woocommerce

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi @jolangoburdhun,

    From what you’ve described you would need to be familiar with JavaScript coding techniques to create a custom modal popup to display the content your site requires. If you’re not personally familiar with JavaScript coding techniques it may be possible to have a developer write some custom code that could achieve this for you.

    If you would like to investigate that possibility further, you could reach out to some of the official WooCommerce development partners via the link below.

    https://woocommerce.com/customizations/

    Thread Starter jolangoburdhun

    (@jolangoburdhun)

    Hello @stuartduff,

    I am familiar with JavaScript but I just need some help to figure out how to proceed in the process_payment function or do I need to capture the button click before that function is called?

    Plugin Support Thu P. a11n

    (@thup90)

    Hi there,

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Woocommerce open popup in process_payment’ is closed to new replies.