Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rotisoft/cca15cb69babf7dc1e6f94c8d206ef2c to your computer and use it in GitHub Desktop.
Save rotisoft/cca15cb69babf7dc1e6f94c8d206ef2c to your computer and use it in GitHub Desktop.
<?php
/*
* Plugin Name: Pont shipping for Woocommerce - Add custom Prefix
* Plugin URI: https://rotisoft.hu/bovitmenyek/
* Description: Szathmari Andor WC-PONT Sprinter rendszernel elotag hozzadasa, hogy SprinterPartnerPortalon egyes webshopok rendelesei elkulonithetoek legyenek.
* Version: 1.0
* Author: Rottenbacher RotiSoft Tamas
* Author URI: https://rotisoft.hu/
*
* Requires at least: 5.7
* Tested up to: 5.8
* WC requires at least: 5.0
* WC tested up to: 5.5
* Requires PHP: 7.4
* PHP tested up to: 8.0
* WC-PONT requires at least 7.4
*
* Copyright: ©2021 rotisoft.hu
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
add_action( 'woocommerce_wc_pont_export_sprinter_data', 'action_mod_sprinter_data', 10, 2 );
function action_mod_sprinter_data( $data, $order ){
$plusprefix = XXXX;
$ordernumber = $order->get_order_number();
$data->AutorizationCode = $plusprefix . $ordernumber;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment