• Hi,

    I want to change the position of the service point button on the checkout page. I could use this code snippet to change the position but since $sendcloud->service_point_checkout_handler is a private method I cant access it outside the class.

    $plugins_dir = WP_PLUGIN_DIR . 'sendcloud-shipping/sendcloud-shipping.php';
    $sendcloud   = Sendcloud\Shipping\Sendcloud::init( $plugins_dir );
    add_action( 'woocommerce_checkout_order_review', array( $sendcloud->service_point_checkout_handler, 'add_service_point_to_checkout' ), 11 );
    

    Would you be able to make it public or provide any other API function to call the add_service_point_to_checkout function from outside the plugin?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sendcloud

    (@sendcloudbv)

    Hi Pramod Jodhani,

    Thank you for posting your question.

    Please note that the result you wish to achieve is not possible unfortunately.

    Although there are no considerations at the moment to alter the existing WooCommerce plugin to allow customizing where the Select service point button is injected, I will submit a feature request based on your feedback.

    Best regards,

    Sendcloud Team

    Thread Starter Pramod Jodhani

    (@promz)

    Hello Sendcloud,

    Thank you for your reply.

    The change that I’m requesting is only a single line change and would help not only our plugin but also other third plugins to create compatibility with your plugins.

    It would be great if you could pass my message to the development team. I’m sure it won’t be an issue for them to change access of service_point_checkout_handler from private to public.

    Also, there was a service_point_checkout_handler function previously that would do that same work but it doesn’t work with the new versions. With the latest updates, you have made your plugin less extendable which looks like a step backward to me.

    I look forward to your reply.

    Thanks,
    Pramod

    Plugin Author Sendcloud

    (@sendcloudbv)

    Hi Pramod,

    Thank you for your feedback.

    Your question was discussed directly with the team responsible for developing our Service Point Module and the conclusion was that this would be a feature request to take into consideration in the future.

    Please note the feature requests are being handled based on customer´s demand, value and effort.

    You can check our releases here: https://releaselog.sendcloud.com/changelog

    Have a nice day.

    Best regards,

    Sendcloud Team

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Access `add_service_point_to_checkout()` from outside the plugin’ is closed to new replies.