Forked from manospsyx/woocommerce-composites-append-component-options.php
Created
February 4, 2017 16:20
-
-
Save zuhra031/3d2bc8503093092142f1614967ae8889 to your computer and use it in GitHub Desktop.
Use this snippet to display a “Load More” button for appending additional component options, instead of using pagination.
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 | |
/** | |
* Plugin Name: WooCommerce Composite Products - Append Component Options | |
* Plugin URI: http://www.woothemes.com/products/composite-products/ | |
* Description: Use this snippet to display a “Load More” button for appending additional component options, instead of using pagination. | |
* Version: 1.0 | |
* Author: SomewhereWarm | |
* Author URI: http://www.somewherewarm.net/ | |
* Developer: Manos Psychogyiopoulos | |
* | |
* Requires at least: 3.8 | |
* Tested up to: 4.2 | |
* | |
* Copyright: © 2015 Manos Psychogyiopoulos (psyx@somewherewarm.net). | |
* License: GNU General Public License v3.0 | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html | |
*/ | |
// To use this snippet, download this file into your plugins directory and activate it, or copy the code under this line into the functions.php file of your (child) theme. | |
add_filter( 'woocommerce_component_options_paginate_results', 'wc_cp_append_component_options', 10, 3 ); | |
function wc_cp_append_component_options( $paginate, $component_id, $composite ) { | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment