Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zuhra031/3d2bc8503093092142f1614967ae8889 to your computer and use it in GitHub Desktop.
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.
<?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