• Resolved lhcaparelli

    (@lhcaparelli)


    first I would like to thank you for the plugin that is amazing.

    I would like to use your plugin to receive url’s via api. How can I do this, in another topic, you mentioned using an internal function, I didn’t quite understand how to do it, how can I use this plugin with an API?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,

    Thank you for reaching out to us.

    May I know which end you want to receive URL? WordPress’s end or your app’s end?

    Best regards.

    Thread Starter lhcaparelli

    (@lhcaparelli)

    The application will send the products, title, price, description and url of the images to woocomerce, but it happens that wordpress downloads the images, I would like to use your plugin in the same way that I use in mass import or add individually

    I see. Please find hook at the position where WooCommerce receives the image, then stop it from downloading and use our code to create image as external link.

    if ( class_exists( 'EXMAGE_WP_IMAGE_LINKS' ) ) {
    				$url            = 'https://ps.w.org/exmage-wp-image-links/assets/icon-128x128.jpg';//image url
    				$post_parent    = 0;//ID of the post that you want this image to be attached to
    				$external_image = EXMAGE_WP_IMAGE_LINKS::add_image( $url, $image_id, $post_parent );
    			}
    Thread Starter lhcaparelli

    (@lhcaparelli)

    Thanks a lot for the support.
    Unfortunately I tried to add a custom code with the parameters that you informed, but it didn’t work correctly.

    Would it be possible to create a custom code? with a separate payment? if so do you have an email to contact?

    Thanks

    Thank you for the updates. May I know which code you use to push image?

    Thread Starter lhcaparelli

    (@lhcaparelli)

    The API sends the products in the standard fields of woocommerce

    As for the code I used to intercept the hook, I admit that after numerous failed attempts I decided to throw it away and look for a new approach.

    Thank you for the updates, and… I’m sorry I wasn’t able to help further with the request. Hopefully you’d find a solution. Have a great day!

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

The topic ‘API REST’ is closed to new replies.