This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function extensions_list($extensions = array()) { | |
$extensions['guestcheckout'] = array( | |
'name' => "Guest Checkout", | |
'link' => "http://domain.com", | |
'image' => plugins_url() . '/mypmethod/images/icon.png', | |
'description' => __("My Payment Method for the Shopping Cart plugin.", 'mypmethod'), | |
'slug' => 'mypmethod', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('checkout_extensions_list', 'extensions_list', 10, 1); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('checkout_admin_extensions_settings_saved', 'extensions_settings_saved', 10, 1); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function extensions_settings_saved($data = null) { | |
// Do something with the $_POST data as needed | |
// print_r($data); | |
} | |
add_action('checkout_admin_extensions_settings_saved', 'extensions_settings_saved', 10, 1); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$cart_url = wpco_cart_url(); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('checkout_admin_supplier_saved', 'supplier_saved', 10, 2); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function supplier_saved($insertid = null, $data = null) { | |
// Do something with $insertid or $data | |
global $wpcoDb, $Supplier; | |
$wpcoDb -> model = $Supplier -> model; | |
$supplier = $wpcoDb -> find(array('id' => $insertid)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function order_finished($order_id = null, $pmethod = null, $paid = null) { | |
//an order was finished, now we can do something with it | |
if ($order = wpco_get_order($order_id)) { | |
//we now have all the data of the order to work with | |
//print_r($order); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// $attributes = apply_filters('checkout_image_attributes', false, $image, $width, $height, $class); | |
function attributes($attributes = array(), $image = null, $width = null, $height = null, $class = null) { | |
$attributes['data-foo'] = "foo-value"; // <img data-foo="foo-value" /> | |
$attributes['rel'] = "overlaybox"; // <img rel="overlaybox" /> | |
} | |
add_filter('checkout_image_attributes', 'attributes', 10, 5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function image_attributes($attributes, $image, $width, $height, $class) { | |
$attributes['data-zoom-image'] = $attributes['src']; | |
return $attributes; | |
} | |
add_filter('checkout_image_attributes', 'image_attributes', 10, 5); | |
?> |
OlderNewer