Στο παρακάτω παράδειγμα ορίζουμε μέγιστο βάρος τα 2 κιλά εάν είναι πάνω απο 2, διαφορετικά θα πάρει το βάρος που έχει αυτόματα υπολογιστεί από τα προϊόντα
function myweight($weight){ if ($weight > 2){ $newweight = 2; }else{ $newweight = $weight; } return $newweight; } add_filter( 'iben_acs_filter_weight_order_metabox', 'myweight' );
Εαν έχετε custom πεδίο στο checkout, πχ Κινητό και meta name είναι _billing_mobile κανένα πρόβλημα.
Σε άλλη περίπτωση εαν το custom πεδίο σας έχει διαφορετικό meta name τότε θα πρέπει να τρέξετε το παρακάτω κώδικα στο αρχείο chilld functions.php και απλά αλλάξτε το όνομα _billing_mobile με το δικό σας meta όνομα.
Η κάτω παύλα ( _ ) είναι απαραίτητη.
function mycustomphonefield(){ return '_billing_mobile'; } add_filter( 'iben_acs_filter_phone2_metafield_order_metabox', 'mycustomphonefield' );
iben_acs_filter_comments_order_metabox
Για τα σχόλια / παρατηρήσεις του voucher
iben_acs_filter_cashdelivery_order_metabox
Για την αντικαταβολή του voucher
Σε κάποιες περιπτώσεις που χρησιμοποιείται μέθοδο πληρωμής (αντικαταβολή) από κάποιο άλλο plugin ή custom. Σε αυτή την περίπτωση το plugin δεν γνωρίζει εαν είναι αντικαταβολή και να προστεθεί αυτόματα στο πεδίο.
alg_custom_gateway_1 = Είναι το ID της μεθόδου πληρωμής
function iben_cash_delivery_add_alg_custom1(){ return $payments = array('alg_custom_gateway_1'); } add_filter('iben_acs_filter_cashdelivery_payments_order_metabox', 'iben_cash_delivery_add_alg_custom1');
Η ACS ενώ δίνει το Reference_Key1 σαν πεδίο και ενώ εμείς της περνάμε το αρ. παραγγελίας, για κάποιο λόγω δεν το εκτυπώνει στο voucher.
Σε περίπτωση που θέλετε να εκτυπώνεται ο αρ. παραγγελίας μέσα στα σχόλια του voucher θα πρέπει να χρησιμοποιήσετε την παρακάτω function
function iben_acs_override_com_meta($comment, $order_id){ $order = wc_get_order($order_id); if (!is_object($order)){ return; } //GET ORDER COMMENTS $comments = $order->get_customer_note(); $order_number = $order->get_order_number(); return 'Παραγγελία ID:'.$order_number.' '.$comments; } add_filter('iben_acs_filter_comments_order_metabox', 'iben_acs_override_com_meta', 10, 2);
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 1 year | Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Analytics" category . |
cookielawinfo-checkbox-functional | 1 year | The cookie is set by the GDPR Cookie Consent plugin to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 1 year | Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Necessary" category . |
CookieLawInfoConsent | 1 year | Records the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie. |
elementor | never | This cookie is used by the website's WordPress theme. It allows the website owner to implement or change the website's content in real-time. |
Cookie | Duration | Description |
---|---|---|
_ga | 2 years | The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors. |
_gat_gtag_UA_129335665_2 | 1 minute | Set by Google to distinguish users. |
_gid | 1 day | Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously. |