Skip to content

Instantly share code, notes, and snippets.

@webdados
Last active July 18, 2020 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webdados/74d45a652ab36b9dcd7bfdaeb34046b4 to your computer and use it in GitHub Desktop.
Save webdados/74d45a652ab36b9dcd7bfdaeb34046b4 to your computer and use it in GitHub Desktop.
<?php
//You need this plugin: https://www.webdados.pt/wordpress/plugins/dpd-portugal-para-woocommerce-wordpress/
//Monitor the result (success) and do whatver you want with it - Needs to be set before running it
add_action( 'woo_dpd_portugal_requested_pickup', function( $pickup_request ) {
var_dump( $pickup_request ); //You should email it, or log it, or... whatever
} );
//Monitor the result (error) and do whatver you want with it - Needs to be set before running it
add_action( 'woo_dpd_portugal_request_pickup_error', function( $error_message ) {
var_dump( $error_message ); //You should email it, or log it, or... whatever
}, 10, 1 );
//Do it
do_action( 'woo_dpd_portugal_request_pickup' );
//More information: https://www.webdados.pt/wordpress/plugins/dpd-portugal-para-woocommerce-wordpress/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment