Skip to content

Commit f9a1601

Browse files
authored
Add files via upload
1 parent cc223f0 commit f9a1601

3 files changed

+80
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- This is a code snippets export file generated by the Code Snippets WordPress plugin. -->
3+
<!-- https://wordpress.org/plugins/code-snippets -->
4+
<!-- To import these snippets a WordPress site follow these steps: -->
5+
<!-- 1. Log in to that site as an administrator. -->
6+
<!-- 2. Install the Code Snippets plugin using the directions provided at the above link. -->
7+
<!-- 3. Go to 'Tools: Import' in the WordPress admin panel. -->
8+
<!-- 4. Click on the "Code Snippets" importer in the list -->
9+
<!-- 5. Upload this file using the form provided on that page. -->
10+
<!-- 6. Code Snippets will then import all of the snippets and associated information contained in this file into your site. -->
11+
<!-- 7. You will then have to visit the 'Snippets: All Snippets' admin menu and activate desired snippets. -->
12+
<!-- generator="Code Snippets/2.8.6" created="2017-09-05 19:21" -->
13+
<snippets>
14+
<snippet scope="1">
15+
<name>Auto complete all WooCommerce orders</name>
16+
<desc></desc>
17+
<tags>woocommerce, auto, complete, orders</tags>
18+
<code>add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' );&#13;
19+
function custom_woocommerce_auto_complete_order( $order_id ) { &#13;
20+
if ( ! $order_id ) {&#13;
21+
return;&#13;
22+
}&#13;
23+
&#13;
24+
$order = wc_get_order( $order_id );&#13;
25+
$order-&gt;update_status( 'completed' );&#13;
26+
}</code>
27+
</snippet>
28+
</snippets>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- This is a code snippets export file generated by the Code Snippets WordPress plugin. -->
3+
<!-- https://wordpress.org/plugins/code-snippets -->
4+
<!-- To import these snippets a WordPress site follow these steps: -->
5+
<!-- 1. Log in to that site as an administrator. -->
6+
<!-- 2. Install the Code Snippets plugin using the directions provided at the above link. -->
7+
<!-- 3. Go to 'Tools: Import' in the WordPress admin panel. -->
8+
<!-- 4. Click on the "Code Snippets" importer in the list -->
9+
<!-- 5. Upload this file using the form provided on that page. -->
10+
<!-- 6. Code Snippets will then import all of the snippets and associated information contained in this file into your site. -->
11+
<!-- 7. You will then have to visit the 'Snippets: All Snippets' admin menu and activate desired snippets. -->
12+
<!-- generator="Code Snippets/2.8.6" created="2017-09-05 19:16" -->
13+
<snippets>
14+
<snippet scope="2">
15+
<name>Change the add to cart text on product archives in WooCommerce</name>
16+
<desc></desc>
17+
<tags>add, to, cart, woocommerce, text, product, archive</tags>
18+
<code>add_filter( 'woocommerce_product_add_to_cart_text', 'woo_archive_custom_cart_button_text' ); // 2.1 +&#13;
19+
&#13;
20+
function woo_archive_custom_cart_button_text() {&#13;
21+
&#13;
22+
return __( 'Order Now', 'woocommerce' );&#13;
23+
&#13;
24+
}</code>
25+
</snippet>
26+
</snippets>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- This is a code snippets export file generated by the Code Snippets WordPress plugin. -->
3+
<!-- https://wordpress.org/plugins/code-snippets -->
4+
<!-- To import these snippets a WordPress site follow these steps: -->
5+
<!-- 1. Log in to that site as an administrator. -->
6+
<!-- 2. Install the Code Snippets plugin using the directions provided at the above link. -->
7+
<!-- 3. Go to 'Tools: Import' in the WordPress admin panel. -->
8+
<!-- 4. Click on the "Code Snippets" importer in the list -->
9+
<!-- 5. Upload this file using the form provided on that page. -->
10+
<!-- 6. Code Snippets will then import all of the snippets and associated information contained in this file into your site. -->
11+
<!-- 7. You will then have to visit the 'Snippets: All Snippets' admin menu and activate desired snippets. -->
12+
<!-- generator="Code Snippets/2.8.6" created="2017-09-05 19:13" -->
13+
<snippets>
14+
<snippet scope="2">
15+
<name>Change the add to cart text on single products in WooCommerce</name>
16+
<desc></desc>
17+
<tags>add, to, cart, text, woocommerce, single, product</tags>
18+
<code>add_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text' ); // 2.1 +&#13;
19+
&#13;
20+
function woo_custom_cart_button_text() {&#13;
21+
&#13;
22+
return __( 'Order Now', 'woocommerce' );&#13;
23+
&#13;
24+
}</code>
25+
</snippet>
26+
</snippets>

0 commit comments

Comments
 (0)