Bin e padrões para validação de cartão de crédito.
| Bandeira | Começa com | Máximo de número | Máximo de número cvc |
|---|---|---|---|
| Visa | 4 | 13,16 | 3 |
| Mastercard | 5 | 16 | 3 |
| <?php | |
| $serverName = "sqlserver.example.com"; | |
| $database = "myDbName"; | |
| $uid = 'sqlserver_username'; | |
| $pwd = 'password'; | |
| try { | |
| $conn = new PDO( | |
| "sqlsrv:server=$serverName;Database=$database", | |
| $uid, |
| function mysite_pending($order_id) { | |
| error_log("$order_id set to PENDING", 0); | |
| } | |
| function mysite_failed($order_id) { | |
| error_log("$order_id set to FAILED", 0); | |
| } | |
| function mysite_hold($order_id) { | |
| error_log("$order_id set to ON HOLD", 0); | |
| } | |
| function mysite_processing($order_id) { |
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| $('.dragger').mousedown(function (event) { | |
| $(this) | |
| .data('down', true) | |
| .data('x', event.clientX) | |
| .data('scrollLeft', this.scrollLeft) | |
| .addClass("dragging"); | |
| return false; |
| <?php | |
| // [wp insert user « WordPress Codex](http://codex.wordpress.org/Function_Reference/wp_insert_user) | |
| require_once "wordpress/wp-load.php"; | |
| $user_info = array( | |
| "user_pass" => "test123", | |
| "user_login" => "username", | |
| "user_nicename" => "username", | |
| "user_email" => "[email protected]", |
| <?php | |
| /** | |
| * Add checkbox field to the checkout | |
| **/ | |
| add_action('woocommerce_after_order_notes', 'my_custom_checkout_field'); | |
| function my_custom_checkout_field( $checkout ) { | |
| echo '<div id="my-new-field"><h3>'.__('My Checkbox: ').'</h3>'; |